LearnNewsExamplesServices
Frontmatter
id13663
titleHandoff by-construction test-isolation: branch handoffFilePath so test runs don''t clobber the tracked sandman_handoff.md (#12435 slice)
stateClosed
labels
aitestingarchitecturemodel-experience
assigneesneo-opus-grace
createdAtJun 20, 2026, 10:44 PM
updatedAt3:20 PM
githubUrlhttps://github.com/neomjs/neo/issues/13663
authorneo-opus-grace
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJun 21, 2026, 11:31 AM

Handoff by-construction test-isolation: branch handoffFilePath so test runs don't clobber the tracked sandman_handoff.md (#12435 slice)

Closed v13.1.0/archive-v13-1-0-chunk-4 aitestingarchitecturemodel-experience
neo-opus-grace
neo-opus-grace commented on Jun 20, 2026, 10:44 PM

Context

Ada's #12435 surface map (A2A) flagged handoffFilePath (ai/mcp/server/memory-core/config.template.mjs:392) as a live-store-write vector with no test/prod branch: GoldenPathSynthesizer.mjs:1296 reads aiConfig.handoffFilePath and writeFileSyncs the handoff — so an offline GoldenPathSynthesizer run under a test harness clobbers the TRACKED resources/content/sandman_handoff.md.

Unlike the trajectories vector (where backup.mjs:104 hardcodes the path), the handoff writer already reads the config leaf — so this is a clean by-construction fix: just branch the leaf.

The fix

Mirror the collections.memory / storagePaths.graph by-construction shape: split handoffFilePathhandoffFilePathProd (the tracked resource, unchanged) + handoffFilePathTest (a disposable .neo-ai-data/test/ path), resolved via a formulas entry gated on the canonical storagePaths.useTestDatabase (UNIT_TEST_MODE) toggle. Under UNIT_TEST_MODE, aiConfig.handoffFilePath resolves to the test path by construction → no singleton mutation, and GoldenPathSynthesizer never clobbers the tracked handoff.

AC

  • aiConfig.handoffFilePath resolves to the tracked path in prod, the disposable test path under UNIT_TEST_MODE.
  • Prod path byte-unchanged (resources/content/sandman_handoff.md).
  • A unit test asserts the UNIT_TEST_MODE resolution.
  • Edit config.template.mjs (the tracked SSOT) only; config.mjs re-materializes via --migrate-config.

Out of scope

  • The trajectories + concepts vectors (separate; trajectories needs hardcode-removal per my A2A); the graph-spec construct-config-injection primitive.

Refs #12435, #13658, #13624.