Context
This is the GPT-owned Cluster B follow-up under #12461 / #12456 after the operator flagged per-leaf B3 ticket proliferation as backlog friction.
Live coordination evidence:
- PR #12547 is the agreed final already-open per-leaf exception and is approved/green at head
6f67fe05c.
- @neo-opus-grace and @neo-opus-ada locked the two-cluster shape: no more per-leaf #12461 tickets.
- Ownership lock: @neo-opus-ada owns Cluster A (
memory-core + MCP/runtime); @neo-gpt owns Cluster B (KB/vector/graph/daemon); @neo-opus-grace reviews/closes/resolves.
- This ticket was updated in place after the ownership lock landed, rather than creating another ticket, to preserve the backlog-friction correction.
V-B-A before filing/update:
origin/dev grep shows Cluster B candidates in KnowledgeBaseIngestionService, VectorService, SemanticGraphExtractor, TopologyInferenceEngine, and DreamService.
ai/mcp/server/knowledge-base/config.template.mjs declares defaultTenantId, defaultRepoSlug, defaultVisibility, logPath, and mcpSyncMaxChunks leaves.
ai/config.template.mjs declares graphProvider, provider subtrees, localModels.chat.*, and orchestrator.intervals.* leaves.
- Exact GitHub searches for the earlier overlapping MCP runtime boundary returned no open issue/PR; after the ownership lock, MCP/runtime moved to Cluster A and this ticket now only covers the locked Cluster B files.
Problem
The KB/vector/graph/daemon cluster still contains consumer-side defensive reads and hidden defaults around AiConfig-owned leaves, including:
aiConfig.defaultTenantId || 'neo-shared'
aiConfig.defaultRepoSlug || 'neo'
aiConfig.defaultVisibility || 'team'
aiConfig.logPath || `${aiConfig.neoRootDir}/.neo-ai-data/logs`
aiConfig[graphProvider]?.model
aiConfig.remSleepBatchLimit || 10
aiConfig.summarizationBatchLimit || 2000Under ADR 0019, resolved AiConfig leaves are the use-site source of truth. Consumers should read the Provider-resolved leaf directly when the template owns the default, and missing config shape should fail loudly instead of silently reintroducing local defaults.
Some candidates need validation rather than blind deletion. In particular, remSleepBatchLimit does not appear as a declared leaf in the current template grep, so implementation must either route that site to the correct existing leaf or prove it needs a template leaf before removing the fallback.
Architectural Reality
Cluster B is the non-MCP-runtime half of the remaining B3 sweep:
KnowledgeBaseIngestionService consumes Knowledge Base tenant/repo/visibility defaults.
VectorService consumes Knowledge Base logging and sync-volume config.
SemanticGraphExtractor and TopologyInferenceEngine consume graph-provider config.
DreamService consumes Memory Core / orchestrator REM batch limits.
These services are consumers of config leaves, not owners of local defaults. They should not re-implement defaults already declared in the template.
Fix
Update the Cluster B files in one PR:
ai/services/knowledge-base/KnowledgeBaseIngestionService.mjs
ai/services/knowledge-base/VectorService.mjs
ai/services/graph/SemanticGraphExtractor.mjs
ai/services/graph/TopologyInferenceEngine.mjs
ai/daemons/orchestrator/services/DreamService.mjs
For each candidate:
- Replace defensive AiConfig reads with direct Provider-resolved leaf reads when the leaf exists.
- Preserve meaningful payload fallbacks that are not AiConfig defaults, such as explicit request payload overrides.
- Do not add local fallbacks, aliases, env reads, or subtree defenses.
- If a current fallback corresponds to no declared leaf, either route it to an existing correct leaf or document/add the missing template leaf as part of this cluster.
Contract Ledger Applicability
Contract Ledger matrix is not required: this is a pure internal refactor of existing config consumers. It does not add, rename, remove, or deprecate an MCP tool, OpenAPI field, config key, CLI flag, env var, or public runtime contract unless implementation proves a missing leaf must be added.
Decision Record impact
Aligned with ADR 0019. The reactive Provider-backed AiConfig singleton remains the SSOT; this ticket removes consumer-side defensive reads and hidden defaults in the KB/vector/graph/daemon cluster.
Acceptance Criteria
Out of Scope
- Cluster A memory-core + MCP/runtime work owned by @neo-opus-ada.
- Open PR #12528 GitLab HealthService B3 work.
- Open PR #12547 auth-only TransportService cleanup and its human merge.
- Open PR #12532 memory-sharing work and any
MemoryService.mjs overlap.
Logger.mjs, BaseServer.mjs, TransportService.mjs, SessionService.mjs, SummaryService.mjs, TextEmbeddingService.mjs, and CollectionProxy.mjs.
Related
Origin Session ID
dcdaac0b-9ae0-45b5-b4da-da39541af497
Retrieval Hint
KB vector graph daemon AiConfig B3 ADR 0019 cluster B
Context
This is the GPT-owned Cluster B follow-up under #12461 / #12456 after the operator flagged per-leaf B3 ticket proliferation as backlog friction.
Live coordination evidence:
6f67fe05c.memory-core+ MCP/runtime); @neo-gpt owns Cluster B (KB/vector/graph/daemon); @neo-opus-grace reviews/closes/resolves.V-B-A before filing/update:
origin/devgrep shows Cluster B candidates inKnowledgeBaseIngestionService,VectorService,SemanticGraphExtractor,TopologyInferenceEngine, andDreamService.ai/mcp/server/knowledge-base/config.template.mjsdeclaresdefaultTenantId,defaultRepoSlug,defaultVisibility,logPath, andmcpSyncMaxChunksleaves.ai/config.template.mjsdeclaresgraphProvider, provider subtrees,localModels.chat.*, andorchestrator.intervals.*leaves.Problem
The KB/vector/graph/daemon cluster still contains consumer-side defensive reads and hidden defaults around AiConfig-owned leaves, including:
aiConfig.defaultTenantId || 'neo-shared' aiConfig.defaultRepoSlug || 'neo' aiConfig.defaultVisibility || 'team' aiConfig.logPath || `${aiConfig.neoRootDir}/.neo-ai-data/logs` aiConfig[graphProvider]?.model aiConfig.remSleepBatchLimit || 10 aiConfig.summarizationBatchLimit || 2000Under ADR 0019, resolved AiConfig leaves are the use-site source of truth. Consumers should read the Provider-resolved leaf directly when the template owns the default, and missing config shape should fail loudly instead of silently reintroducing local defaults.
Some candidates need validation rather than blind deletion. In particular,
remSleepBatchLimitdoes not appear as a declared leaf in the current template grep, so implementation must either route that site to the correct existing leaf or prove it needs a template leaf before removing the fallback.Architectural Reality
Cluster B is the non-MCP-runtime half of the remaining B3 sweep:
KnowledgeBaseIngestionServiceconsumes Knowledge Base tenant/repo/visibility defaults.VectorServiceconsumes Knowledge Base logging and sync-volume config.SemanticGraphExtractorandTopologyInferenceEngineconsume graph-provider config.DreamServiceconsumes Memory Core / orchestrator REM batch limits.These services are consumers of config leaves, not owners of local defaults. They should not re-implement defaults already declared in the template.
Fix
Update the Cluster B files in one PR:
ai/services/knowledge-base/KnowledgeBaseIngestionService.mjsai/services/knowledge-base/VectorService.mjsai/services/graph/SemanticGraphExtractor.mjsai/services/graph/TopologyInferenceEngine.mjsai/daemons/orchestrator/services/DreamService.mjsFor each candidate:
Contract Ledger Applicability
Contract Ledger matrix is not required: this is a pure internal refactor of existing config consumers. It does not add, rename, remove, or deprecate an MCP tool, OpenAPI field, config key, CLI flag, env var, or public runtime contract unless implementation proves a missing leaf must be added.
Decision Record impact
Aligned with ADR 0019. The reactive Provider-backed AiConfig singleton remains the SSOT; this ticket removes consumer-side defensive reads and hidden defaults in the KB/vector/graph/daemon cluster.
Acceptance Criteria
KnowledgeBaseIngestionServicekeeps payload/request fallbacks but no longer re-defaults AiConfig-owned tenant/repo/visibility leaves.VectorServiceno longer re-deriveslogPathwhen the template owns it.DreamServicebatch-limit handling is resolved through declared config leaves or a documented missing-leaf fix.Out of Scope
MemoryService.mjsoverlap.Logger.mjs,BaseServer.mjs,TransportService.mjs,SessionService.mjs,SummaryService.mjs,TextEmbeddingService.mjs, andCollectionProxy.mjs.Related
learn/agentos/decisions/0019-aiconfig-reactive-provider-ssot.mdOrigin Session ID
dcdaac0b-9ae0-45b5-b4da-da39541af497Retrieval Hint
KB vector graph daemon AiConfig B3 ADR 0019 cluster B