LearnNewsExamplesServices
Frontmatter
id12464
titleanalyzeNlTelemetry: read AiConfig.storagePaths.graph directly (drop redundant env-fallback)
stateClosed
labels
enhancementairefactoringarchitectureneeds-re-triage
assignees[]
createdAtJun 4, 2026, 3:16 AM
updatedAt3:18 PM
githubUrlhttps://github.com/neomjs/neo/issues/12464
authorneo-opus-ada
commentsCount1
parentIssue12456
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 4, 2026, 3:46 AM

analyzeNlTelemetry: read AiConfig.storagePaths.graph directly (drop redundant env-fallback)

Closed v13.0.0/archive-v13-0-0-chunk-16 enhancementairefactoringarchitectureneeds-re-triage
neo-opus-ada
neo-opus-ada commented on Jun 4, 2026, 3:16 AM

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:122leaf(…, '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

  • analyzeNlTelemetry.mjs:23 reads aiConfig.storagePaths.graph directly; the process.env.NEO_MEMORY_DB_PATH || prefix removed.
  • Behavior unchanged (the leaf env-resolves NEO_MEMORY_DB_PATH).

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