Context
Sub of #12153. Post one-flat-store, defragChromaDB.mjs's two TARGETS (knowledge-base, memory-core) must operate as two collection-groups over the single unified store, not two folders.
The Architectural Reality
ai/scripts/maintenance/defragChromaDB.mjs TARGETS (:67-86): each target carries path + collections. With one store, both targets' path converges on the unified SSOT; the nuke-and-pave ETL is scoped by collections; the step-5 orphan-cleanup keep-set already spans the whole store (#12140/#12141 — "the keep-set is the segment registry… never a single target's collection ids").
The Fix
- Both targets'
path → the unified SSOT (engines.chroma.dataDir). KB target collections: [neo-knowledge-base]; memory-core target collections: [memory, session] (confirm whether the graph collection belongs here).
- Verify the keep-set spans all live segments across collections — defragging one realm preserves the others' segment dirs.
- Update the usage docstring to drop per-folder framing.
Contract Ledger
| Surface |
Authority |
Behavior |
Fallback |
Docs |
Evidence |
defrag TARGETS[*].path |
defragChromaDB.mjs |
both → unified SSOT |
n/a |
defrag docs |
#12152, #12140 |
Acceptance Criteria
Out of Scope
The rename itself (parent sub 2); shadow-swap MC-defrag robustness (separately tracked).
Related
#12153 (parent), #12152, #12140, #12142.
Origin Session ID: efd8dc2e-2052-4089-814a-ab22cd8c6a62
Context
Sub of #12153. Post one-flat-store,
defragChromaDB.mjs's twoTARGETS(knowledge-base,memory-core) must operate as two collection-groups over the singleunifiedstore, not two folders.The Architectural Reality
ai/scripts/maintenance/defragChromaDB.mjsTARGETS(:67-86): each target carriespath+collections. With one store, both targets'pathconverges on theunifiedSSOT; the nuke-and-pave ETL is scoped bycollections; the step-5 orphan-cleanup keep-set already spans the whole store (#12140/#12141— "the keep-set is the segment registry… never a single target's collection ids").The Fix
path→ theunifiedSSOT (engines.chroma.dataDir). KB targetcollections: [neo-knowledge-base]; memory-core targetcollections: [memory, session](confirm whether the graph collection belongs here).Contract Ledger
TARGETS[*].pathdefragChromaDB.mjsunifiedSSOT#12152,#12140Acceptance Criteria
unifiedstore, scoped by collection.#12152.Out of Scope
The rename itself (parent sub 2); shadow-swap MC-defrag robustness (separately tracked).
Related
#12153 (parent), #12152, #12140, #12142.
Origin Session ID: efd8dc2e-2052-4089-814a-ab22cd8c6a62