LearnNewsExamplesServices
Frontmatter
id10825
titleAudit dead config fields for substrate cleanup
stateClosed
labels
enhancementairefactoringarchitecturemodel-experience
assigneesneo-gpt
createdAtMay 6, 2026, 6:10 PM
updatedAtMay 7, 2026, 12:47 AM
githubUrlhttps://github.com/neomjs/neo/issues/10825
authorneo-gpt
commentsCount0
parentIssue10822
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 7, 2026, 12:47 AM

Audit dead config fields for substrate cleanup

Closedenhancementairefactoringarchitecturemodel-experience
neo-gpt
neo-gpt commented on May 6, 2026, 6:10 PM

Context

Epic #10822 Phase 1 AC4 requires dead config fields to be audited and removed before the three-tier substrate is reshaped. Claude's A2A lane handoff (MESSAGE:ecb64615-491c-4a87-bd9d-b735bcd4a5d0) assigned this read-only audit lane to @neo-gpt alongside the env-var inventory.

Duplicate sweep evidence:

  • Knowledge Base semantic ticket sweep for duplicate ticket dead config field audit config substrate cleanup AC4 returned no relevant documents.
  • GitHub exact sweeps found #10822 only for dead-config terms, with no standalone AC4 ticket.
  • Local grep found the AC4 parent text in resources/content/issues/issue-10822.md:102.

The Problem

The config substrate contains fields and scripts whose current consumer status is unclear. Some are likely dead, stale, or only present because prior migration work accumulated compatibility scaffolding. Leaving them in place undermines the #10822 KISS cleanup because later PRs must preserve, document, and validate config keys that may no longer serve a runtime consumer.

The audit needs to separate actually live config from obsolete fields before deletion PRs touch shared templates or docs.

The Architectural Reality

Empirical starter scan on current dev:

  • ai/mcp/server/knowledge-base/services/SearchService.mjs:63 initializes this.embeddingModel from aiConfig.embeddingModel; this is explicitly named in #10822 AC4 as a suspected dead instantiation.
  • package.json:30 still exposes ai:migrate-memory.
  • buildScripts/README.md documents npm run ai:migrate-memory, while the current #10822 cleanup direction favors one-shot migration scripts with deletion after completion.
  • ai/mcp/server/memory-core/config.template.mjs:181 and ai/mcp/server/knowledge-base/config.template.mjs:200 both define embeddingModel defaults; the audit must prove which consumers are live before any removal.
  • ai/mcp/server/memory-core/managers/CollectionProxy.mjs:22 reads aiConfig.engine, while surrounding storage-router comments refer to aiConfig.architecture, so config-key drift needs explicit review.

These are starter anchors, not a complete list. The implementation pass must search broadly across ai/**, buildScripts/**, docs, package scripts, and config templates.

The Fix

Produce a dead-config audit table and remove only fields/scripts proven dead inside the same PR.

Suggested table columns:

candidate defining surface current readers verdict action

Use live, dead-remove, defer-to-Phase-1.5, or needs-design verdicts. Removal is allowed only for dead-remove rows with empirical reader evidence.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
Dead config/script audit #10822 AC4 Config keys, package scripts, and docs with no live consumer are identified before removal Ambiguous candidates are marked needs-design and not removed PR body includes the audit table and removal summary rg reader scans plus targeted source review
Removed config fields/scripts #10822 KISS cleanup Only proven-dead entries are deleted Live or Phase-1.5-bound entries remain with rationale Docs updated when public commands or config keys disappear Tests or syntax checks covering touched files

Acceptance Criteria

  • Audit table covers at least the #10822 seed candidates: KB embeddingModel in SearchService.mjs:63 and ai:migrate-memory in package.json.
  • Audit searches config templates, package scripts, build scripts, server services, and docs for each candidate before assigning a verdict.
  • Proven-dead fields/scripts are removed in the same PR.
  • Ambiguous or Phase-1.5-bound config is left in place with an explicit defer or needs-design rationale.
  • Public docs are updated if a command or documented config key is removed.
  • The PR body includes exact scan commands and the dead/live/deferred count summary.

Out of Scope

  • Global env-var inventory. That belongs to the sibling AC1 audit ticket.
  • Legacy env-var alias deletion. That belongs to #10823.
  • Tier 1 shared config creation or per-MC template slimming.
  • Operator-side Chroma migration or unified-topology deletion.

Avoided Traps

  • Deleting by suspicion: a field is not dead until reader scans prove it.
  • Preserving stale scripts indefinitely: one-shot migration discipline requires removal once no longer part of the active operator path.
  • Confusing Phase 1.5 relocation with dead code: some fields may move to Tier 1 rather than disappear.

Related

  • Parent: #10822
  • Sibling: #10823
  • Originating Discussion: #10819
  • Origin A2A Message: MESSAGE:ecb64615-491c-4a87-bd9d-b735bcd4a5d0

Handoff Retrieval Hints

  • query_raw_memories(query="config substrate cleanup dead config field audit embeddingModel ai:migrate-memory")
  • query_raw_memories(query="Phase 1 AC4 dead config fields audited removed")
  • GitHub archaeological source: Discussion #10819 and Epic #10822
tobiu referenced in commit 4f3258a - "fix(ai): remove dead config substrate surfaces (#10825) (#10849) on May 7, 2026, 12:47 AM
tobiu closed this issue on May 7, 2026, 12:47 AM