Summary
PR B of #12139 — the external-only Chroma lifecycle cleanup, completing the ticket. With the orchestrator daemon as the sole Chroma driver (#12065) and the manage_database MCP tool retired (PR A / #12197), the per-server lifecycle services carried only dead managed-mode surface. This collapses them to readiness/observability gates and drops the now-dead managed/strategy healthcheck branching.
Deltas
ChromaLifecycleService (MC) + DatabaseLifecycleService (KB) — deleted startDatabase / stopDatabase / waitForHeartbeat / manageDatabase / cleanup (grep-confirmed 0 prod callers), the spawn/child_process + unused aiConfig imports, the KB chromaProcess config member, and the Observable mixin + processActive event (no listener anywhere). Kept initAsync (boot ordering, awaited by SystemLifecycleService + ChromaManager via ready()) and getDatabaseStatus (healthcheck), simplified to {running: false}.
HealthService (MC) — dropped the database.process.managed / strategy branching. The only downstream reader consumes .running (KB Server); nothing read managed/strategy. Reports external-only now.
- Tests — rewrote the two lifecycle specs to the kept surface; removed dead
aiConfig.<retired-flag> = false setup-lines across 9 specs (autoDream/autoSummarize/realTimeMemoryParsing/autoIngestFileSystem no longer exist post-#12139) + the 4 now-orphaned import aiConfig lines they left behind.
ChromaManagers needed no change — they only await <Lifecycle>.ready(), which is preserved; AC6's "ChromaManagers simplified" was already satisfied (no lifecycle coupling beyond the readiness gate).
Test Evidence
Evidence: L2 (executed) — npm run test-unit over the 12 affected spec files exits 0 with 124 passing (incl. the 51-test HealthService suite confirming the managed/strategy removal is non-breaking, and the 2 rewritten lifecycle specs).
node --check clean on all 14 changed files (disk-truth — confirms no duplicate/orphaned imports). Both pre-commit gates (check-whitespace, check-shorthand) pass. The retired-primitive guard (#12198) still passes on this branch. grep confirms 0 remaining retired-flag setup-lines + 0 orphaned aiConfig imports across test/.
Post-Merge Validation
Behaviour-preserving: the deleted methods had no callers; getDatabaseStatus keeps the running field its sole consumer reads; the healthcheck details now states "Connected to the orchestrator-managed ChromaDB instance" instead of the managed/external conditional. On merge this closes #12139 (ACs 1–5 + 7 satisfied by PRs #12197 + #12200; AC6 satisfied here).
Decision Record impact
aligned-with ADR 0003 (unified Chroma topology) — establishes the orchestrator as the sole Chroma lifecycle authority for both MCP servers; the services retain only a readiness gate.
FAIR-band: n/a — operator-directed lane (#12139 PR B).
Resolves #12139.
Authored by Claude Opus 4.8 (Claude Code, 1M context).
Summary
PR B of #12139 — the external-only Chroma lifecycle cleanup, completing the ticket. With the orchestrator daemon as the sole Chroma driver (#12065) and the
manage_databaseMCP tool retired (PR A / #12197), the per-server lifecycle services carried only dead managed-mode surface. This collapses them to readiness/observability gates and drops the now-dead managed/strategy healthcheck branching.Deltas
ChromaLifecycleService(MC) +DatabaseLifecycleService(KB) — deletedstartDatabase/stopDatabase/waitForHeartbeat/manageDatabase/cleanup(grep-confirmed 0 prod callers), thespawn/child_process+ unusedaiConfigimports, the KBchromaProcessconfig member, and theObservablemixin +processActiveevent (no listener anywhere). KeptinitAsync(boot ordering, awaited bySystemLifecycleService+ChromaManagerviaready()) andgetDatabaseStatus(healthcheck), simplified to{running: false}.HealthService(MC) — dropped thedatabase.process.managed/strategybranching. The only downstream reader consumes.running(KB Server); nothing readmanaged/strategy. Reports external-only now.aiConfig.<retired-flag> = falsesetup-lines across 9 specs (autoDream/autoSummarize/realTimeMemoryParsing/autoIngestFileSystemno longer exist post-#12139) + the 4 now-orphanedimport aiConfiglines they left behind.ChromaManagers needed no change — they onlyawait <Lifecycle>.ready(), which is preserved; AC6's "ChromaManagers simplified" was already satisfied (no lifecycle coupling beyond the readiness gate).Test Evidence
Evidence: L2 (executed) —
npm run test-unitover the 12 affected spec files exits 0 with 124 passing (incl. the 51-test HealthService suite confirming the managed/strategy removal is non-breaking, and the 2 rewritten lifecycle specs).node --checkclean on all 14 changed files (disk-truth — confirms no duplicate/orphaned imports). Both pre-commit gates (check-whitespace,check-shorthand) pass. The retired-primitive guard (#12198) still passes on this branch.grepconfirms 0 remaining retired-flag setup-lines + 0 orphanedaiConfigimports acrosstest/.Post-Merge Validation
Behaviour-preserving: the deleted methods had no callers;
getDatabaseStatuskeeps therunningfield its sole consumer reads; the healthcheckdetailsnow states "Connected to the orchestrator-managed ChromaDB instance" instead of the managed/external conditional. On merge this closes #12139 (ACs 1–5 + 7 satisfied by PRs #12197 + #12200; AC6 satisfied here).Decision Record impact
aligned-with ADR 0003(unified Chroma topology) — establishes the orchestrator as the sole Chroma lifecycle authority for both MCP servers; the services retain only a readiness gate.FAIR-band: n/a — operator-directed lane (#12139 PR B).
Resolves #12139.
Authored by Claude Opus 4.8 (Claude Code, 1M context).