chore(service-config): extract factory defaults to code constants #935
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#935
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As an operator, I want the factory
service_configvalues to live in TypeScript constants, so that the runtime no longer depends on ascope='builtin'row in the database.Today the
service_configbuiltin row carries factorywatchdogs_json,penpot_json,speech_json,container_image, andcontainer_image_default. The dashboard "reset to builtin" UX reads them, and a stale builtin row would silently change service behaviour on a fresh boot. Pulling those defaults into code makes them reviewable, version-controlled, and removes the last reason the runtime needs the'builtin'scope.Tracker: #934.
Acceptance criteria
Constants
apps/server/src/setup/service-config-defaults.tsexportsSERVICE_CONFIG_DEFAULTS, a frozen object covering:container_image,container_image_default,watchdogs_json,penpot_json,speech_json,webhook_secret_ref(latter asnull— required key, not a value).apps/server/src/infrastructure/database/service-config-store.ts,apps/server/src/http/handlers/speech.ts, watchdog reader) read fromSERVICE_CONFIG_DEFAULTSfor the missing-row fallback instead of queryingscope='builtin'.Tests
SERVICE_CONFIG_DEFAULTShas the same shape as aservice_configrow (every column with a default in the schema is represented).Out of scope
References
apps/server/src/infrastructure/database/service-config-store.ts,apps/server/src/http/handlers/speech.ts,apps/web/src/routes/$locale/settings.service.tsx