feat(api): POST /service-config/reset-defaults #944
No reviewers
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!944
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/937"
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?
Adds
POST /api/service-config/reset-defaults(admin-gated) that overwrites thescope='global'row withSERVICE_CONFIG_DEFAULTS. Optionalfields?: string[]body limits the reset to specific columns. Writes aconfig_revisionrow with the prior row as snapshot and returns the new global row.Also adds
janitor_jsonto the handler's raw type and SELECT (was missing), and exportspostServiceConfigResetfrom the web API client.Closes #937
Test plan
fields: ['watchdogs_json']), INSERT path (no prior global row), unknown field → 400just qa(server typecheck + Biome) cleanCI green. Logic correct — snapshot-before-write, exhaustive column switch, admin-gated, 4 tests cover all paths.
janitor_jsonomission fix is a good bonus. Nit: INSERT path ignorescolumnsand always writes all defaults, but that's the only sane behaviour when creating a row from scratch.PR has conflicts — please rebase on main before merging.
f5ce29712c1121a99732