feat: build daemon command registry from descriptors, delete the hand table — Phase 1 step 2
What
Phase 1 step 2 of the command-descriptor migration (ADR-0008), stacked on #906 (feat/command-descriptor-registry).
The daemon command registry now builds from the derived descriptors instead of a hand-authored literal:
src/daemon/daemon-command-registry.ts— replaced theDAEMON_COMMAND_DESCRIPTORSarray literal (plus its privatedescriptor/descriptorsbuilders and theisRecordingStartRequest/isShardedTestRequestclosures, now living indescriptor/registry.ts) with:
The hand literal is deleted. Theexport const DAEMON_COMMAND_DESCRIPTORS: readonly DaemonCommandDescriptor[] = deriveDaemonCommandDescriptors(commandDescriptors);DaemonCommandDescriptortype, the predicate accessors, andbuildDaemonCommandRegistryare unchanged and consumeDAEMON_COMMAND_DESCRIPTORSas before.src/commands/descriptor/__tests__/parity.test.ts— the slice-1 DAEMON parity assertion would now be a tautology (derived-vs-derived), so it was replaced with an invariant assertion: no duplicate command names, every descriptor has a route, and the derived command set still covers every public command (minus the two intentionally unroutedapp-switcher/install-from-source). The capability-matrix and batch-name parity tests are kept as-is (those hand tables still exist for later slices).
Behaviorless
The daemon registry's routes + request-policy traits are identical — #906's parity test proved deriveDaemonCommandDescriptors(commandDescriptors) is byte-equal to the deleted literal. No predicate accessor or consumer changed.
Cycle check
No runtime import cycle: daemon-command-registry.ts (value) → descriptor/derive.ts + descriptor/registry.ts (values); the back-edges from derive.ts and descriptor/types.ts to this module's DaemonCommandDescriptor are type-only imports, erased at runtime. tsc --noEmit is clean (exit 0) and a runtime import() of the module loads cleanly (57 descriptors).
Verification
tsc -p tsconfig.json --noEmit: exit 0oxfmt --write+oxlint --deny-warningson changed files: exit 0vitest run daemon: 94 files, 902 tests passedvitest run commands/descriptor: 1 file, 5 tests passed
Stacked on #906 — merge that first.