Sub of Epic #12456 (AiConfig-SSOT cleanup); a scoped, fully-deliverable A1 leaf split from #12438 (whose daemon A1 sites — bridge/daemon.mjs, orchestrator/daemon.mjs — are in @neo-claude-opus's active wake-up lane #12459/#12462, so they're not in this PR's scope). Authority = ADR 0019 (#12457).
Context
The Diamond-1 fan-out census (Epic #12456 comment IC_kwDODSospM8AAAABEz8AaQ) flagged ai/scripts/diagnostics/analyzeNlTelemetry.mjs:23 as an A1-with-AiConfig-imported instance — the cleanest, safest one (a diagnostic script that already imports AiConfig, not in the daemon lane, not a C1 case).
The Problem
const DB_PATH = process.env.NEO_MEMORY_DB_PATH || aiConfig.storagePaths.graph;
The process.env.NEO_MEMORY_DB_PATH || prefix is redundant: the storagePaths.graph leaf already env-binds NEO_MEMORY_DB_PATH (ai/mcp/server/memory-core/config.template.mjs:122 — leaf(…, 'NEO_MEMORY_DB_PATH', 'string')), so aiConfig.storagePaths.graph already resolves the env override. Re-reading process.env re-implements the leaf's own env-resolution (ADR 0019 §3 A1).
The Fix
const DB_PATH = aiConfig.storagePaths.graph;
Reads the resolved leaf at the use site — matching the sanctioned sibling read on the next line (const RLAIF_PATH = aiConfig.datasets.rlaif.trajectories;). One line; behavior-equivalent (the leaf env-resolves NEO_MEMORY_DB_PATH).
Decision Record impact
aligned-with ADR 0019 (AiConfig reactive Provider SSOT).
Acceptance Criteria
Out of Scope
- Daemon A1 sites (
bridge/orchestrator/daemon.mjs) — in the lead's wake-up lane (#12459/#12462).
inspectGraph.mjs — a genuine C1 case (standalone script, no Neo bootstrap) needing the pure-defaults-module pattern, not a simple read-swap.
Related
Parent: Epic #12456. Split from: #12438 (A1 audit). Authority: ADR 0019 (#12457). Census: #12456 comment.
Origin Session ID: 966c46fb-ad36-4e4c-88d6-899c4d18ed91
Sub of Epic #12456 (AiConfig-SSOT cleanup); a scoped, fully-deliverable A1 leaf split from #12438 (whose daemon A1 sites —
bridge/daemon.mjs,orchestrator/daemon.mjs— are in @neo-claude-opus's active wake-up lane #12459/#12462, so they're not in this PR's scope). Authority = ADR 0019 (#12457).Context
The Diamond-1 fan-out census (Epic #12456 comment
IC_kwDODSospM8AAAABEz8AaQ) flaggedai/scripts/diagnostics/analyzeNlTelemetry.mjs:23as an A1-with-AiConfig-imported instance — the cleanest, safest one (a diagnostic script that already importsAiConfig, not in the daemon lane, not a C1 case).The Problem
const DB_PATH = process.env.NEO_MEMORY_DB_PATH || aiConfig.storagePaths.graph;The
process.env.NEO_MEMORY_DB_PATH ||prefix is redundant: thestoragePaths.graphleaf already env-bindsNEO_MEMORY_DB_PATH(ai/mcp/server/memory-core/config.template.mjs:122—leaf(…, 'NEO_MEMORY_DB_PATH', 'string')), soaiConfig.storagePaths.graphalready resolves the env override. Re-readingprocess.envre-implements the leaf's own env-resolution (ADR 0019 §3 A1).The Fix
const DB_PATH = aiConfig.storagePaths.graph;Reads the resolved leaf at the use site — matching the sanctioned sibling read on the next line (
const RLAIF_PATH = aiConfig.datasets.rlaif.trajectories;). One line; behavior-equivalent (the leaf env-resolvesNEO_MEMORY_DB_PATH).Decision Record impact
aligned-with ADR 0019 (AiConfig reactive Provider SSOT).
Acceptance Criteria
analyzeNlTelemetry.mjs:23readsaiConfig.storagePaths.graphdirectly; theprocess.env.NEO_MEMORY_DB_PATH ||prefix removed.NEO_MEMORY_DB_PATH).Out of Scope
bridge/orchestrator/daemon.mjs) — in the lead's wake-up lane (#12459/#12462).inspectGraph.mjs— a genuine C1 case (standalone script, no Neo bootstrap) needing the pure-defaults-module pattern, not a simple read-swap.Related
Parent: Epic #12456. Split from: #12438 (A1 audit). Authority: ADR 0019 (#12457). Census: #12456 comment.
Origin Session ID: 966c46fb-ad36-4e4c-88d6-899c4d18ed91