Context
Sub of Epic #12461 (Eliminate B3 defensive reads of the AiConfig SSOT in production source). Authority: ADR 0019 (#12457). Continues the per-surface B3 cleanup after the KB-daemon (#12529 / PR #12530), GitLab (#12526 / PR #12528), ProtoSource (#12504), and orchestrator (#12515) legs. Lane surfaced by @neo-gpt's collision-aware [lanes-available] DM (graph/ingestion cluster, unclaimed).
The Problem
ai/services/ingestion/ConceptDiscoveryService.mjs defends SSOT-guaranteed AiConfig subtree reads with optional-chaining ?., masking fail-loud per ADR 0019 §3. V-B-A'd instances on dev (4):
- L157
aiConfig.conceptDiscovery?.minSourceLength
- L163-165
aiConfig.openAiCompatible?.{model, host, keep_alive}
- L289
aiConfig.conceptDiscovery?.prScanLimit
The Fix
Per ADR 0019 §5: read the resolved leaf at the use site (aiConfig.conceptDiscovery.minSourceLength, aiConfig.openAiCompatible.model, …), letting it fail loud — the Provider SSOT guarantees the resolved subtree. The this.prScanLimit ?? aiConfig… explicit-override-else-SSOT pattern stays (compliant; not a hidden default).
Acceptance Criteria
Contract Ledger
Not required — pure internal refactoring under the existing ADR-0019 contract, no new or changed observable public surface (learn/agentos/contract-ledger.md trigger-exclusion: "pure refactoring that does not change the observable public shape"). Sibling B3 legs (#12529 → PR #12530) set this precedent. Stated explicitly per the contract-ledger pre-filing discipline.
Related
Epic: #12461 / #12456. Authority: ADR 0019 (#12457).
Context
Sub of Epic #12461 (Eliminate B3 defensive reads of the AiConfig SSOT in production source). Authority: ADR 0019 (#12457). Continues the per-surface B3 cleanup after the KB-daemon (#12529 / PR #12530), GitLab (#12526 / PR #12528), ProtoSource (#12504), and orchestrator (#12515) legs. Lane surfaced by @neo-gpt's collision-aware
[lanes-available]DM (graph/ingestion cluster, unclaimed).The Problem
ai/services/ingestion/ConceptDiscoveryService.mjsdefends SSOT-guaranteed AiConfig subtree reads with optional-chaining?., masking fail-loud per ADR 0019 §3. V-B-A'd instances ondev(4):aiConfig.conceptDiscovery?.minSourceLengthaiConfig.openAiCompatible?.{model, host, keep_alive}aiConfig.conceptDiscovery?.prScanLimitThe Fix
Per ADR 0019 §5: read the resolved leaf at the use site (
aiConfig.conceptDiscovery.minSourceLength,aiConfig.openAiCompatible.model, …), letting it fail loud — the Provider SSOT guarantees the resolved subtree. Thethis.prScanLimit ?? aiConfig…explicit-override-else-SSOT pattern stays (compliant; not a hidden default).Acceptance Criteria
aiConfig.*?.defensive reads inConceptDiscoveryService.mjsread the resolved leaf directly.||/??-literal introduced.Contract Ledger
Not required — pure internal refactoring under the existing ADR-0019 contract, no new or changed observable public surface (
learn/agentos/contract-ledger.mdtrigger-exclusion: "pure refactoring that does not change the observable public shape"). Sibling B3 legs (#12529 → PR #12530) set this precedent. Stated explicitly per the contract-ledger pre-filing discipline.Related
Epic: #12461 / #12456. Authority: ADR 0019 (#12457).