LearnNewsExamplesServices
Frontmatter
id12550
titleB3 cluster A: eliminate memory-core + MCP/runtime AiConfig defensive reads (#12461)
stateClosed
labels
enhancementai
assigneesneo-opus-ada
createdAtJun 4, 2026, 11:36 PM
updatedAtJun 7, 2026, 7:18 PM
githubUrlhttps://github.com/neomjs/neo/issues/12550
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 5, 2026, 3:52 AM

B3 cluster A: eliminate memory-core + MCP/runtime AiConfig defensive reads (#12461)

neo-opus-ada
neo-opus-ada commented on Jun 4, 2026, 11:36 PM

Context

Cluster A of the consolidated #12461 B3 cleanup — the 2-cluster reshape that replaces the per-leaf fragmentation (per @tobiu's ticket-proliferation friction: closures up, creation capped at 2 cluster tickets). Authority: ADR 0019. ONE ticket + ONE PR. Cluster B (KB/vector/graph/daemon) = @neo-gpt; review/close/resolve = @neo-opus-grace. Owner: @neo-opus-ada.

Scope — V-B-A'd B3 reads on origin/dev (source-grep ledger)

Clean — read the resolved leaf directly (confirm each leaf's template default in the PR):

  • ai/services/memory-core/TextEmbeddingService.mjs:245aiConfig.ollama || {}
  • ai/services/memory-core/managers/CollectionProxy.mjs:23aiConfig.engine || 'hybrid'; :100aiConfig.engines?.chroma || {}
  • ai/services/memory-core/SessionService.mjs:326aiConfig.summarizationBatchLimit || 2000
  • ai/services/memory-core/SummaryService.mjs:221aiConfig.summarizationBatchLimit || 2000
  • ai/mcp/server/shared/services/TransportService.mjs:262aiConfig.mcpHttpPort || 3000validation nuance: may need the resolveMcpHttpPort range-check (cf. #12420), not a bare strip. (Auth read at :57 already done by #12547.)

Validate-first (may NOT be B3 — exclude with rationale if confirmed legit):

  • ai/mcp/server/BaseServer.mjs:238/469this.aiConfig?.load / this.aiConfig?.transport read the instance property this.aiConfig, not the global SSOT — likely a legit init-time guard, not a B3 SSOT defense.
  • ai/mcp/server/shared/Logger.mjs:30aiConfig?.data ?? aiConfig ?? {} — intentional dual-shape (Provider vs raw) adapter; likely keep.

Deferred behind #12532 (memorySharing overlap — do NOT sweep until #12532 lands/supersedes):

  • ai/services/memory-core/SummaryService.mjs:207/380aiConfig?.memorySharing?.defaultPolicy || 'legacy'
  • ai/services/memory-core/MemoryService.mjs — entire file deferred.

Excluded (display-only log fallbacks / resolution, not behavior B3 — assess, don't reflexively strip):

  • SessionService.mjs:256/592|| '<unset>' / || 'unset' (log strings); model-name resolution at :579-580.

Acceptance Criteria

  • The "clean" B3 reads read resolved leaves directly; each leaf's template default confirmed present (no hidden-default || introduced).
  • BaseServer + Logger reads validated; excluded with rationale if not B3 offenders.
  • SummaryService.memorySharing + MemoryService NOT touched (deferred behind #12532).
  • mcpHttpPort handled validation-aware (resolver or confirmed bare-safe).
  • Relevant memory-core/MCP unit specs green; ai:lint-config-template-ssot OK.

Contract Ledger

Not required — pure internal refactoring under the existing ADR-0019 contract (trigger-exclusion: refactor with no observable-public-shape change). The source-grep ledger above is the surface inventory.

Related

Epic #12461 / #12456. Authority: ADR 0019 (#12457). Deferral dependency: #12532 (memorySharing). Validation ref: #12420 (resolveMcpHttpPort).

tobiu closed this issue on Jun 5, 2026, 3:52 AM
tobiu referenced in commit 2b8277c - "fix(ai): remove memory-core + MCP/runtime B3 AiConfig defensive reads (#12550) (#12553) on Jun 5, 2026, 3:52 AM