feat(setup): wizard seeds label_catalog + service_config at scope='global' #945

Merged
reviewer merged 1 commit from dev/938 into main 2026-05-08 09:16:36 +00:00
Collaborator

Exports LABEL_PRESETS from defaults.ts and updates seedPreset to unconditionally seed one service_config row from SERVICE_CONFIG_DEFAULTS (with janitor_json populated) and one label_catalog row per LABEL_PRESETS entry — both idempotent. The blank preset now also seeds labels and service_config. All writes carry a config_revision audit row.

Test plan

  • 22 tests in presets.test.ts pass (3 new describe blocks for AC coverage)
  • Blank preset test updated: expects labelsInserted = LABEL_PRESETS.length, serviceConfigInserted = true
  • Idempotency: re-run skips all rows, serviceConfigSkipped = true, no extra revision rows
  • Smoke test: getServiceConfig() returns janitor = JANITOR_CONFIG_DEFAULTS after wizard
  • Full suite: 3269 tests pass, 0 fail

Closes #938

Exports `LABEL_PRESETS` from `defaults.ts` and updates `seedPreset` to unconditionally seed one `service_config` row from `SERVICE_CONFIG_DEFAULTS` (with `janitor_json` populated) and one `label_catalog` row per `LABEL_PRESETS` entry — both idempotent. The blank preset now also seeds labels and service_config. All writes carry a `config_revision` audit row. ## Test plan - 22 tests in `presets.test.ts` pass (3 new describe blocks for AC coverage) - Blank preset test updated: expects `labelsInserted = LABEL_PRESETS.length`, `serviceConfigInserted = true` - Idempotency: re-run skips all rows, `serviceConfigSkipped = true`, no extra revision rows - Smoke test: `getServiceConfig()` returns `janitor = JANITOR_CONFIG_DEFAULTS` after wizard - Full suite: 3269 tests pass, 0 fail Closes #938
dev self-assigned this 2026-05-08 09:12:17 +00:00
feat(setup): wizard seeds label_catalog + service_config at scope='global'
All checks were successful
qa / dockerfile (pull_request) Successful in 10s
qa / sql-layer-check (pull_request) Successful in 10s
qa / i18n-string-check (pull_request) Successful in 12s
qa / db-schema (pull_request) Successful in 44s
qa / qa-1 (pull_request) Successful in 2m2s
qa / qa (pull_request) Successful in 0s
31e2e4ea85
- Export LABEL_PRESETS from defaults.ts (canonical factory label set)
- seedPreset always inserts one service_config row from SERVICE_CONFIG_DEFAULTS
  (including janitor_json); previously skipped when no container_image override
- seedPreset always seeds label_catalog from LABEL_PRESETS regardless of preset
  (blank preset previously seeded zero labels)
- Each new insert writes a config_revision row with comment='Seeded by setup wizard'
- Update + extend presets.test.ts: blank preset, idempotency, builtin-scope guard,
  and three new describe blocks covering the AC for #938

Closes #938

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev requested review from reviewer 2026-05-08 09:15:18 +00:00
reviewer approved these changes 2026-05-08 09:16:29 +00:00
reviewer left a comment

All AC met: insertServiceConfigIfAbsent unconditionally seeds from SERVICE_CONFIG_DEFAULTS (idempotent), LABEL_PRESETS replaces per-preset label lists, config_revision rows written for both. 22 tests cover fresh-DB, idempotency, and smoke-test paths. CI green.

All AC met: `insertServiceConfigIfAbsent` unconditionally seeds from `SERVICE_CONFIG_DEFAULTS` (idempotent), `LABEL_PRESETS` replaces per-preset label lists, `config_revision` rows written for both. 22 tests cover fresh-DB, idempotency, and smoke-test paths. CI green.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!945
No description provided.