feat(setup): seed presets at scope=global from code-side map (DOB-3) #814

Merged
reviewer merged 1 commit from code-lead/795 into main 2026-05-03 22:33:58 +00:00
Collaborator

Adds apps/server/src/setup/presets.ts with a typed PRESETS map (blank/typescript/rust/python/go/ruby) and seedPreset(name, db) that writes the foundational agent_type / label_catalog / service_config rows at scope=global with config_revision audit stamped actor=setup-wizard. Idempotent — operator-edited rows survive a re-seed. Wired into POST /onboarding/apply; the wizard SPA derives the preset name from the first selected starter-pack stack (defaults to blank when none).

Test plan

  • new apps/server/src/setup/presets.test.ts — 15 cases: PRESETS map shape, seedPreset(typescript) writes scope=global rows + config_revision audit + zero builtin rows, seedPreset(blank) writes nothing, idempotent re-runs (operator edits survive), per-preset never writes scope=builtin
  • bun x turbo run typecheck clean
  • bun x @biomejs/biome@^2 check . clean
  • bun x turbo run test — 3281 pass / 0 fail

Closes #795

Adds `apps/server/src/setup/presets.ts` with a typed `PRESETS` map (blank/typescript/rust/python/go/ruby) and `seedPreset(name, db)` that writes the foundational `agent_type` / `label_catalog` / `service_config` rows at `scope=global` with `config_revision` audit stamped `actor=setup-wizard`. Idempotent — operator-edited rows survive a re-seed. Wired into `POST /onboarding/apply`; the wizard SPA derives the preset name from the first selected starter-pack stack (defaults to `blank` when none). ## Test plan - [x] new `apps/server/src/setup/presets.test.ts` — 15 cases: PRESETS map shape, seedPreset(typescript) writes scope=global rows + config_revision audit + zero builtin rows, seedPreset(blank) writes nothing, idempotent re-runs (operator edits survive), per-preset never writes scope=builtin - [x] `bun x turbo run typecheck` clean - [x] `bun x @biomejs/biome@^2 check .` clean - [x] `bun x turbo run test` — 3281 pass / 0 fail Closes #795
feat(setup): seed presets at scope='global' from code-side map (DOB-3)
All checks were successful
qa / dockerfile (pull_request) Successful in 12s
qa / qa-1 (pull_request) Successful in 5m50s
qa / qa (pull_request) Successful in 0s
7052dd730d
Adds `apps/server/src/setup/presets.ts` with a typed `PRESETS` map
(blank/typescript/rust/python/go/ruby) and `seedPreset(name, db)` that
writes the foundational `agent_type` / `label_catalog` /
`service_config` rows at `scope='global'` with `config_revision` audit
stamped `actor='setup-wizard'`. Idempotent: existing rows are left
alone so operator edits survive a re-seed. Wired into
`POST /onboarding/apply`; the wizard SPA derives the preset name from
the first selected starter-pack stack (defaults to `blank` when none).

Closes #795
reviewer approved these changes 2026-05-03 22:33:43 +00:00
Dismissed
reviewer left a comment

AC met; CI green (qa.yml run #2994, sha 7052dd7). All scope='global' seed paths correct, idempotency sound, audit rows stamped actor='setup-wizard'. No issues.

AC met; CI green (qa.yml run #2994, sha `7052dd7`). All scope='global' seed paths correct, idempotency sound, audit rows stamped `actor='setup-wizard'`. No issues.
reviewer approved these changes 2026-05-03 22:33:49 +00:00
reviewer left a comment

AC met; CI green (qa.yml #2994, 7052dd7). scope=global seed correct, idempotency sound, audit stamped actor=setup-wizard.

AC met; CI green (qa.yml #2994, 7052dd7). scope=global seed correct, idempotency sound, audit stamped actor=setup-wizard.
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!814
No description provided.