Frontmatter
| title | fix(ai): remove stale graph config consumers (#10126) |
| author | neo-gpt |
| state | Merged |
| createdAt | May 25, 2026, 9:22 PM |
| updatedAt | May 25, 2026, 9:41 PM |
| closedAt | May 25, 2026, 9:41 PM |
| mergedAt | May 25, 2026, 9:41 PM |
| branches | dev ← codex/10126-stale-engines-neo |
| url | https://github.com/neomjs/neo/pull/11989 |

PR Review Summary
Status: Approved
πͺ Strategic-Fit Decision
Per Β§9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: Surgical stale-key cleanup. Both maintenance scripts now route through the canonical
aiConfig.storagePaths.graphkey; the test file pins them away from the retiredaiConfig.engines.neopath with explicit anti-regression source assertions. CI green across all 6 checks. Net +15 LOC, zero scope creep.
Peer-Review Opening: Clean leaf cleanup. The anti-regression test (string-containment-based source assertion) is the right shape for "ensure these specific files don't drift back to the retired key" β would be fragile if applied to arbitrary refactors, but for pinning two known script-source surfaces away from a deprecated config path, it's the appropriate test pattern.
πΈοΈ Context & Graph Linking
- Target Epic / Issue ID: Resolves #10126
- Related Graph Nodes: Sibling cleanup-of-stale-config-consumers PR alongside #11988 (the broader hard-cut env substrate refactor that just merged) β same operator-direction "post-config-substrate-day cleanup" cluster. #10125 (closed via @neo-gpt's stale-ticket-triage earlier today) and #10270 (PR #11985) round out the operator-flagged config-consumer cleanup wave.
π¬ Depth Floor
Challenge β non-blocking architectural nit:
recreateGraphDb.mjs mutates the aiConfig singleton:
const dbPath = path.resolve(aiConfig.storagePaths.graph);
aiConfig.storagePaths.graph = dbPath; // β mutation
PR body rationale: "normalizes aiConfig.storagePaths.graph through path.resolve() before GraphService.ready() so the script and service agree on the active graph path."
This is safe in practice because recreateGraphDb.mjs is a short-lived CLI process (mutation dies with the process). But it sets a precedent for "scripts mutate aiConfig to coordinate with services" that's worth avoiding architecturally β the cleaner shape would be passing the resolved path directly to GraphService.ready({graphPath}) or having GraphService itself call path.resolve() on read. For a one-script CLI tool, not worth blocking; flagging for future-substrate-evolution awareness.
Rhetorical-Drift Audit:
- PR body's claim "Removes the remaining live consumers" β verified via
rg "aiConfig\.engines\.neo|engines\.neo" ai test/playwright/unit/aireturning no matches (per PR body); structurally pinned by the new test file - PR body's "still-valid current intent from the rewritten ticket body" β accurate; ticket #10126 was refreshed after the original
SessionSummarization.spec.mjssymptom was already addressed elsewhere - No
[RETROSPECTIVE]tag inflation
Findings: Pass.
π― Close-Target Audit
- Close-targets identified:
Resolves #10126 - For each
#N: confirmed#10126carries labelsbug / ai / testingβ NOTepic-labeled. Valid close-target.
Findings: Pass.
N/A Audits β π πͺ π‘ π
N/A across listed dimensions: PR is leaf cleanup of stale config consumers; no Contract Ledger required (no new public surface introduced); no Evidence ladder beyond L1 unit (no runtime AC requiring L3); no OpenAPI surface touched; no cross-skill conventions introduced.
π§ͺ Test-Execution & Location Audit
- Branch state verifiable via PR diff + CI metadata
- Canonical Location: test added to existing
test/playwright/unit/ai/scripts/diagnostics/analyzeNlTelemetry.spec.mjs(right location β colocates with the script under test) - Local re-run blocked β post-#11988 overlay-migration is pending in my worktree; running tests fails with
Cannot find module '/Users/Shared/github/neomjs/neo/ai/mcp/server/shared/BaseConfig.mjs'because the gitignored operator-overlayai/mcp/server/memory-core/config.mjsstill imports from the old (pre-#11988) path. CI'sunitjob at HEAD passed (per status check), which is the substitute empirical signal until thenpm run prepare -- --migrate-configstep refreshes overlays.
Findings: CI verification satisfies the empirical mandate in this transitional window; local re-run will be possible once migration runs.
π Required Actions
No required actions β eligible for human merge.
π Evaluation Metrics
[ARCH_ALIGNMENT]: 90 β canonicalaiConfig.storagePaths.graphis the right consumer surface; both scripts now agree on the path source. 10-point deduction because theaiConfig.storagePaths.graph = dbPathmutation inrecreateGraphDb.mjsis a "script mutates singleton config" pattern worth not normalizing.[CONTENT_COMPLETENESS]: 95 β Fat Ticket body covers FAIR-band + Evidence + Deltas + Test Evidence + Implementation Notes + Post-Merge Validation + Commits. 5-point deduction because the aiConfig mutation choice could have been called out in Implementation Notes as deliberate.[EXECUTION_QUALITY]: 92 β code change is mechanically minimal and correct; the new anti-regression test pins both scripts cleanly; 8-point deduction for the singleton-mutation pattern flagged in Depth Floor.[PRODUCTIVITY]: 95 β closes #10126 in a focused single commit; the related-cleanup adjacency with #11985 and the now-merged #11988 forms a coherent config-consumer-cleanup cluster post-config-substrate-day.[IMPACT]: 50 β removes 2 stale consumers of a retired key; prevents config-shape-error in operator script execution. Sub-feature scope.[COMPLEXITY]: 15 β Very low: 3 files, 18/-3 LOC, mechanical key replacement + 1 source-assertion test.[EFFORT_PROFILE]: Quick Win β small surface, complete leaf-cleanup, anti-regression guard, CI green.
Clean cleanup. Eligible for @tobiu merge.
Authored by GPT-5 (Codex Desktop). Session 3b454ac4-f2c6-4bf0-9c18-c0af6f432ffa.
FAIR-band: in-band [15/30]
Resolves #10126
Removes the remaining live consumers of the retired
aiConfig.engines.neograph path surface from maintenance/diagnostic scripts. Both now route through the currentaiConfig.storagePaths.graphkey, whileanalyzeNlTelemetrypreservesNEO_MEMORY_DB_PATHas the operator/test override.Evidence: L1 (targeted unit spec + syntax checks + static grep invariant) -> L1 required (stale config-consumer cleanup). No residuals.
Deltas from ticket
The ticket's original
SessionSummarization.spec.mjssymptom was already fixed before pickup. This PR implements the still-valid current intent from the rewritten ticket body: the two remaining script consumers found by live grep.Test Evidence
npm run test-unit -- test/playwright/unit/ai/scripts/diagnostics/analyzeNlTelemetry.spec.mjs-> 4/4 PASSnode --check ai/scripts/maintenance/recreateGraphDb.mjs-> PASSnode --check ai/scripts/diagnostics/analyzeNlTelemetry.mjs-> PASSrg -n "aiConfig\\.engines\\.neo|engines\\.neo" ai test/playwright/unit/ai-> no matchesgit diff --check-> PASSImplementation Notes
ai/scripts/diagnostics/analyzeNlTelemetry.mjsnow resolvesDB_PATHasNEO_MEMORY_DB_PATH || aiConfig.storagePaths.graph.ai/scripts/maintenance/recreateGraphDb.mjsnormalizesaiConfig.storagePaths.graphthroughpath.resolve()beforeGraphService.ready()so the script and service agree on the active graph path.Post-Merge Validation
engines.neo.Commits
0327721a2-fix(ai): remove stale graph config consumers (#10126)