Context
Surfaced during #10001 ticket-intake (PR #10121, merged 2026-04-20) while mapping the Memory Core's ChromaDB client wiring. Two call sites read aiConfig.architecture, but the config template exposes the key as engine. The || 'hybrid' fallback in both call sites silently masks the mismatch — the config key is effectively non-functional today.
The Problem
ai/mcp/server/memory-core/config.template.mjs:155 defines engine: 'hybrid' with JSDoc explaining it as "The target Storage Architecture to use."
ai/mcp/server/memory-core/managers/CollectionProxy.mjs:22 reads aiConfig.architecture || 'hybrid' inside getManagers().
ai/mcp/server/memory-core/services/lifecycle/ChromaLifecycleService.mjs:53 reads aiConfig.architecture === 'chroma' || aiConfig.architecture === 'hybrid' inside initAsync().
- Neither call site consults
aiConfig.engine. A curator flipping engine: 'chroma' in a custom config would observe no behavior change; the fallback to 'hybrid' wins either way.
The drift was noted in PR #10121's intake sweep but left out-of-scope for that work. Filing now per the follow-up commitment documented in that PR's body.
The Architectural Reality
The engine config key was introduced during #9922 Two-Pillar Hybrid RAG (per the template JSDoc: "The default is explicitly 'hybrid' per Epic #9922 Two-Pillar RAG architecture."). The read path was authored against aiConfig.architecture — likely an earlier key name that survived in the consumers while the canonical key renamed. No consumer today actually gates on the value; both branches of the OR always evaluate to 'hybrid'.
This is a latent mis-wiring, not a live bug. But any future work that depends on the flag (e.g., flipping to 'chroma'-only mode, or introducing a third value) will silently no-op until the mismatch is resolved.
The Fix
Pick one canonical key and align both sides. Options:
- A: Align consumers to
engine — edit CollectionProxy.mjs + ChromaLifecycleService.mjs to read aiConfig.engine. Smaller diff; respects the config template's naming.
- B: Align config to
architecture — rename engine → architecture in both config templates + gitignored config.mjs mirrors. Preserves consumer code; more surface area.
Recommended: Option A. The config template is the documentation surface for operators; its key name should not change. Consumers are the outliers.
Acceptance Criteria
Out of Scope
- Introducing new
engine values beyond 'hybrid' and 'chroma' — this ticket is pure reconciliation.
- Refactoring
CollectionProxy / ChromaLifecycleService beyond the name fix. Any hybrid-vs-chroma behavioral cleanup is a separate ticket.
Related
- Surfaced in PR #10121 (#10001) intake sweep
- Config template:
ai/mcp/server/memory-core/config.template.mjs:155
- Consumers:
ai/mcp/server/memory-core/managers/CollectionProxy.mjs:22, ai/mcp/server/memory-core/services/lifecycle/ChromaLifecycleService.mjs:53
- Introduced by Epic #9922 (Two-Pillar Hybrid RAG)
Origin Session ID: 1c001810-be28-4554-bb56-c98f9b91bbfb
Context
Surfaced during #10001 ticket-intake (PR #10121, merged 2026-04-20) while mapping the Memory Core's ChromaDB client wiring. Two call sites read
aiConfig.architecture, but the config template exposes the key asengine. The|| 'hybrid'fallback in both call sites silently masks the mismatch — the config key is effectively non-functional today.The Problem
ai/mcp/server/memory-core/config.template.mjs:155definesengine: 'hybrid'with JSDoc explaining it as "The target Storage Architecture to use."ai/mcp/server/memory-core/managers/CollectionProxy.mjs:22readsaiConfig.architecture || 'hybrid'insidegetManagers().ai/mcp/server/memory-core/services/lifecycle/ChromaLifecycleService.mjs:53readsaiConfig.architecture === 'chroma' || aiConfig.architecture === 'hybrid'insideinitAsync().aiConfig.engine. A curator flippingengine: 'chroma'in a custom config would observe no behavior change; the fallback to'hybrid'wins either way.The drift was noted in PR #10121's intake sweep but left out-of-scope for that work. Filing now per the follow-up commitment documented in that PR's body.
The Architectural Reality
The
engineconfig key was introduced during #9922 Two-Pillar Hybrid RAG (per the template JSDoc: "The default is explicitly 'hybrid' per Epic #9922 Two-Pillar RAG architecture."). The read path was authored againstaiConfig.architecture— likely an earlier key name that survived in the consumers while the canonical key renamed. No consumer today actually gates on the value; both branches of the OR always evaluate to'hybrid'.This is a latent mis-wiring, not a live bug. But any future work that depends on the flag (e.g., flipping to
'chroma'-only mode, or introducing a third value) will silently no-op until the mismatch is resolved.The Fix
Pick one canonical key and align both sides. Options:
engine— editCollectionProxy.mjs+ChromaLifecycleService.mjsto readaiConfig.engine. Smaller diff; respects the config template's naming.architecture— renameengine→architecturein both config templates + gitignoredconfig.mjsmirrors. Preserves consumer code; more surface area.Recommended: Option A. The config template is the documentation surface for operators; its key name should not change. Consumers are the outliers.
Acceptance Criteria
CollectionProxy.mjsreadsaiConfig.engine(notaiConfig.architecture).ChromaLifecycleService.mjsreadsaiConfig.engine(notaiConfig.architecture).aiConfig.architectureremains — verified via grep acrossai/andtest/.'hybrid'via the fallback.aiConfig.engineflip (e.g. to'chroma') actually changes observable behavior ingetManagers()andChromaLifecycleService.initAsync().Out of Scope
enginevalues beyond'hybrid'and'chroma'— this ticket is pure reconciliation.CollectionProxy/ChromaLifecycleServicebeyond the name fix. Anyhybrid-vs-chromabehavioral cleanup is a separate ticket.Related
ai/mcp/server/memory-core/config.template.mjs:155ai/mcp/server/memory-core/managers/CollectionProxy.mjs:22,ai/mcp/server/memory-core/services/lifecycle/ChromaLifecycleService.mjs:53Origin Session ID: 1c001810-be28-4554-bb56-c98f9b91bbfb