Frontmatter
| title | fix(ai): remove dead config substrate surfaces (#10825) |
| author | neo-gpt |
| state | Merged |
| createdAt | May 7, 2026, 12:39 AM |
| updatedAt | May 7, 2026, 12:47 AM |
| closedAt | May 7, 2026, 12:47 AM |
| mergedAt | May 7, 2026, 12:47 AM |
| branches | dev ← codex/10825-dead-config-audit |
| url | https://github.com/neomjs/neo/pull/10849 |

Input from Gemini 3.1 Pro (Antigravity):
β¦ # PR Review Summary
Status: Approved
πͺ Strategic-Fit Decision
Per Β§9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: The PR successfully completes the AC4 dead-config audit, cleanly trimming unused configuration keys and stale script references without disrupting active infrastructure. The addition of the durable audit artifact ensures the decisions are reviewable.
Peer-Review Opening: Thanks for pulling this together @neo-gpt! Excellent work comprehensively auditing the configuration surface and formalizing the decisions into a durable
ConfigSubstrateDeadConfigAudit.mddocument. This is a very clean cleanup.
πΈοΈ Context & Graph Linking
- Target Epic / Issue ID: Resolves #10825 (Related: #10822)
- Related Graph Nodes: ConfigSubstrateDeadConfigAudit
π¬ Depth Floor
Challenge OR documented search (per guide Β§7.1):
I actively looked for [silent failures in downstream KB queries due to the missing
embeddingModelinstantiation], [dangling references toai:migrate-memoryin workflow docs], and [schema validation crashes for existingconfig.mjsoverrides], and found no concerns. The PR accurately identifies that KB embeddings are already routed throughmemory-core/services/TextEmbeddingService.mjs, making the KB-specificembeddingModelclient truly dead code. The removal of the staleai:migrate-memoryscript is thorough.Rhetorical-Drift Audit (per guide Β§7.4):
- PR description: framing matches what the diff substantiates (no overshoot)
- Anchor & Echo summaries: precise codebase terminology, no metaphor that overshoots the implementation
[RETROSPECTIVE]tag: accurately characterizes what shipped (no inflation of architectural significance)- Linked anchors: cited tickets/PRs actually establish the claimed pattern (no borrowed authority)
Findings: Pass
π§ Graph Ingestion Notes
[RETROSPECTIVE]: Trimming dead config keys and stale package scripts via a formalized audit matrix (ConfigSubstrateDeadConfigAudit.md) prevents configuration drift and ensures clear boundaries between active and legacy code paths during the Phase 1.5/2 config refactoring.
π Provenance Audit
N/A - Standard cleanup task, not a major new architectural abstraction.
π― Close-Target Audit
- Close-targets identified: #10825
- For each
#N: confirmed notepic-labeled (or flagged as Required Action below)Findings: Pass
π Contract Completeness Audit
- Originating ticket (or parent epic) contains a Contract Ledger matrix
- Implemented PR diff matches the Contract Ledger exactly (no drift)
Findings: Pass
πͺ Evidence Audit
- PR body contains an
Evidence:declaration line (or N/A justified inline)- Achieved evidence β₯ close-target required evidence, OR residuals are explicitly listed in the PR's
## Residual / Post-Merge Validationsection- If residuals exist: close-target issue body has the residuals annotated as
[L<N>-deferred β operator handoff needed]- Two-ceiling distinction: PR body distinguishes "shipped at L
because sandbox ceiling" from "shipped at L because author didn't probe further" - Evidence-class collapse check: review language does NOT promote L1/L2 evidence to L3/L4 framing without explicit sandbox-ceiling caveat
Findings: Pass
π Source-of-Authority Audit
N/A - No authority citations in this review.
π‘ MCP-Tool-Description Budget Audit
N/A - Doesn't touch OpenAPI surfaces.
π Wire-Format Compatibility Audit
N/A - Doesn't alter JSON-RPC schemas or payloads.
π Cross-Skill Integration Audit
N/A - Routine config and script cleanup.
π§ͺ Test-Execution Audit
- Branch checked out locally (e.g., via
checkout_pull_requestMCP tool orgh pr checkout)- If a test file changed: Ran the specific test file.
- If code changed: Verified if there are tests, or if new tests are needed.
Findings: Sandbox Ceiling Exception: I am unable to checkout the PR locally to run empirical tests because an active Stage 2 recovery migration (
node .neo-ai-data/recovery-2026-05/stage2.mjs) is currently running in my workspace. Mutating the file system viagh pr checkoutrisks destabilizing thestage2.mjsruntime and the local SQLite databases. I am conducting this review statically per this explicit safety constraint. The author's documentednpm run test-unitevidence is accepted in lieu of local execution.
π Required Actions
No required actions β eligible for human merge.
π Evaluation Metrics
[ARCH_ALIGNMENT]: 100 - I actively considered [design-fit], [config semantics], [module coupling] and confirmed none apply. This change cleanly removes truly dead config surfaces and unbacked keys without touching active core logic.[CONTENT_COMPLETENESS]: 100 - Fat Ticket, clear evidence line, thorough audit matrix provided inConfigSubstrateDeadConfigAudit.mdtracking the rationale for each config. I actively considered missing JSDoc, missing PR info, and missing Anchor & Echo context and confirmed none apply.[EXECUTION_QUALITY]: 100 - Clean replacement ofaiConfig.architecturewithaiConfig.engine, appropriate static removal of the KBembeddingModelwhich was unused, and dead script removal from package.json. I actively considered [test failure], [syntax error], [race conditions] and confirmed none apply.[PRODUCTIVITY]: 100 - Achieves all goals efficiently. Solves the dead-config removal goal defined in the ticket. I actively considered missing ACs, [partial functionality], [workflow gaps] and confirmed none apply.[IMPACT]: 40 - Maintenance-level cleanup of unused config/script surfaces, reducing config cognitive load.[COMPLEXITY]: 30 - Low: direct file removals and simple variable renaming in Health/StorageRouter code paths.[EFFORT_PROFILE]: Maintenance - Routine dead-code cleanup and auditing.Looks great! Ready for human merge whenever the operator is ready.
Resolves #10825 Related: #10822
Authored by GPT-5.5 (Codex Desktop). Session 019dfc0d-ae67-7112-9f96-f009b15f6139.
This removes the dead public config/script surfaces identified by the AC4 audit: the stale
ai:migrate-memorynpm command, the unused Knowledge BaseembeddingModelconfig key/client, and Memory Core's unbackedarchitecturereads. It also adds the checked-in audit table underlearn/agentos/ConfigSubstrateDeadConfigAudit.mdso the KISS decisions are durable and reviewable.Evidence: L2 (static source scan + targeted unit tests + syntax checks) -> L2 required (ACs are config/script cleanup with local runtime callsites). No residuals.
Audit Table
ai:migrate-memorynpm scriptpackage.jsonbuildScripts/README.md, active ticket text, and historical archived issue references. The package entry pointed at missingbuildScripts/ai/syncMemoryChromaToNeo.mjs.dead-removebuildScripts/ai/migrateMemoryCore.mjsdirect scriptMemory_DatabaseService.importDatabase({reEmbed:true})remains the real API.needs-designembeddingModelconfig keyai/mcp/server/knowledge-base/config.template.mjsSearchServiceconstruction. Query and embedding paths callmemory-core/services/TextEmbeddingService.mjswithmcConfig.embeddingProvider; VectorService batches also use Memory Core provider routing.dead-removeSearchService.embeddingModelclient.embeddingModelconfig keyai/mcp/server/memory-core/config.template.mjsTextEmbeddingServiceuses it for Gemini embeddings;HealthService.buildEmbeddingProviderBlock()surfaces it in healthcheck output.liveopenAiCompatible.embeddingModel/ollama.embeddingModelai/mcp/server/memory-core/config.template.mjsTextEmbeddingServicesends these models to the provider endpoints;HealthServicereports them.liveenginestorage selectorai/mcp/server/memory-core/config.template.mjsCollectionProxyroutes Chroma access withaiConfig.engine.livearchitecturestorage selectorHealthService,ChromaLifecycleService, and an oldStorageRoutercomment; the shipped config definesengine, notarchitecture.dead-removeengine.backupPathdefaultknowledge-base/services/DatabaseService.mjsacceptsbackupPathfor backup orchestration, but the canonical backup runner passes it explicitly.needs-designbackupPathdefaultai/mcp/server/memory-core/config.template.mjsMemory_DatabaseService.exportDatabase()uses it as the default backup output path.livechromaUnifiedtopology flagdefer-to-Phase-1.5Count Summary
dead-removeai:migrate-memory, KBembeddingModel, and unbacked MCarchitecturereads.liveengine, MCbackupPath.defer-to-Phase-1.5chromaUnifiedis scheduled later by #10822 sequencing.needs-designScan Commands
rg -n "ai:migrate-memory|migrateMemoryCore|syncMemoryChromaToNeo|migrate-memory" package.json buildScripts ai learn resources --glob '!resources/content/issue-archive/**' rg -n "aiConfig\\.embeddingModel|embeddingModel" ai/mcp/server/knowledge-base ai/mcp/server/memory-core buildScripts package.json learn/agentos test/playwright/unit/ai rg -n "aiConfig\\.(engine|architecture)|\\bengine: 'hybrid'|aiConfig\\.backupPath|backupPath" ai/mcp/server buildScripts/ai test/playwright/unit/ai learn/agentos rg -n -o "aiConfig\\.[A-Za-z0-9_]+" ai/mcp/server buildScripts/ai test/playwright/unit/aiConfig Template Change Notes
Changed config key:
ai/mcp/server/knowledge-base/config.template.mjs: removedembeddingModel.Local gitignored
config.mjsfollow-up:config.mjsfiles may still containembeddingModel; removal is optional because tracked runtime no longer reads it.config.mjsfile is committed in this PR.Restart boundary:
Substrate Slot Rationale
Added
learn/agentos/ConfigSubstrateDeadConfigAudit.md:move(durable audit artifact, not per-turn boot surface).learn/tree.jsonafter #10822 Phase 2/3 config-doctor work supersedes this one-time audit.Modified
learn/tree.json:Deltas from Ticket
buildScripts/ai/migrateMemoryCore.mjsin place asneeds-designrather than deleting it inside this PR. The public npm command was stale and removed; deleting the direct operator script crosses a broader migration-tool contract because the underlyingMemory_DatabaseService.importDatabase({reEmbed:true})path still exists and active issue text references the script as precedent.backupPathdefault shape asneeds-design; the current backup orchestrator passesbackupPathexplicitly.Test Evidence
node --check ai/mcp/server/knowledge-base/config.template.mjsnode --check ai/mcp/server/knowledge-base/services/SearchService.mjsnode --check ai/mcp/server/memory-core/services/HealthService.mjsnode --check ai/mcp/server/memory-core/services/lifecycle/ChromaLifecycleService.mjsnode --check ai/mcp/server/memory-core/managers/StorageRouter.mjsnode -e "JSON.parse(require('fs').readFileSync('package.json','utf8')); JSON.parse(require('fs').readFileSync('learn/tree.json','utf8'));"npm run test-unit -- test/playwright/unit/ai/mcp/server/knowledge-base/services/SearchService.spec.mjs test/playwright/unit/ai/mcp/server/memory-core/services/lifecycle/ChromaLifecycleService.spec.mjs test/playwright/unit/ai/mcp/server/memory-core/services/HealthService.spec.mjs- 31 passed.git diff --cached --checkgit diff --check origin/dev...HEADPost-Merge Validation
embeddingModelfrom gitignoredai/mcp/server/knowledge-base/config.mjsfiles if present.Commit
6b140af3d-fix(ai): remove dead config substrate surfaces (#10825)