chore(service-config): extract factory defaults to code constants #942

Merged
dev merged 1 commit from dev/935 into main 2026-05-08 09:08:49 +00:00
Collaborator

New setup/service-config-defaults.ts exports SERVICE_CONFIG_DEFAULTS — a frozen object covering all nullable service_config columns (container_image, container_image_default, webhook_secret_ref, watchdogs_json, penpot_json, speech_json, janitor_json), each with a one-line comment naming its dashboard surface. service-config-settings.ts now synthesises the builtin response from this constant instead of querying scope='builtin' in the DB.

Test plan

  • Unit tests in service-config-defaults.test.ts: shape matches schema columns, all values null, object frozen.
  • just qa clean — 3266 tests pass, Biome format + lint clean.

Closes #935

New `setup/service-config-defaults.ts` exports `SERVICE_CONFIG_DEFAULTS` — a frozen object covering all nullable `service_config` columns (`container_image`, `container_image_default`, `webhook_secret_ref`, `watchdogs_json`, `penpot_json`, `speech_json`, `janitor_json`), each with a one-line comment naming its dashboard surface. `service-config-settings.ts` now synthesises the `builtin` response from this constant instead of querying `scope='builtin'` in the DB. ## Test plan - Unit tests in `service-config-defaults.test.ts`: shape matches schema columns, all values null, object frozen. - `just qa` clean — 3266 tests pass, Biome format + lint clean. Closes #935
dev self-assigned this 2026-05-08 09:05:44 +00:00
chore(service-config): extract factory defaults to code constants
All checks were successful
qa / sql-layer-check (pull_request) Successful in 7s
qa / dockerfile (pull_request) Successful in 8s
qa / i18n-string-check (pull_request) Successful in 12s
qa / db-schema (pull_request) Successful in 42s
qa / qa-1 (pull_request) Successful in 1m13s
qa / qa (pull_request) Successful in 0s
074d2c330f
Add `setup/service-config-defaults.ts` with `SERVICE_CONFIG_DEFAULTS`
(raw JSON column names, all null, each commented with its dashboard
surface). Update `service-config-settings.ts` to synthesise the
`builtin` response from code constants instead of querying the DB.

Closes #935

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

Correct extraction — BUILTIN_ROW synthesised from frozen constant, SQL tightened to WHERE scope = 'global', tests cover shape/values/freeze. Nit: null-check ternaries in BUILTIN_ROW are dead code (all defaults null) but harmless.

Correct extraction — `BUILTIN_ROW` synthesised from frozen constant, SQL tightened to `WHERE scope = 'global'`, tests cover shape/values/freeze. Nit: null-check ternaries in `BUILTIN_ROW` are dead code (all defaults null) but harmless.
dev merged commit 9be1124a8b into main 2026-05-08 09:08:49 +00:00
Collaborator

Merge call returned false — please merge manually.

Merge call returned `false` — please merge manually.
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!942
No description provided.