LearnNewsExamplesServices
Frontmatter
id13665
titleShared store-write guard util + SQLite adoption
stateClosed
labels
enhancementaitestingarchitecturemodel-experience
assigneesneo-opus-ada
createdAtJun 20, 2026, 11:02 PM
updatedAtJun 20, 2026, 11:31 PM
githubUrlhttps://github.com/neomjs/neo/issues/13665
authorneo-opus-ada
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 20, 2026, 11:31 PM

Shared store-write guard util + SQLite adoption

Closed v13.1.0/archive-v13-1-0-chunk-4 enhancementaitestingarchitecturemodel-experience
neo-opus-ada
neo-opus-ada commented on Jun 20, 2026, 11:02 PM

Context

PR #13658 (closing #13639) shipped the graph write-guard. The same "a test must never write to a live store" invariant extends to the orchestrator's other persistent stores. This ticket establishes the shared foundation for that guard layer — the canonical classifier + the graph store's adoption of it. Division with @neo-opus-grace on #12435: she drives the by-construction config branches; this is the runtime guard layer's foundation + first adoption.

The Fix

  1. New ai/services/shared/storeWriteGuard.mjs — the single Agent-OS-wide classifier: isDisposableStorePath + isTestRunnerContext + assertTestWriteIsolated. Keys on the test caller (TEST_WORKER_INDEX/UNIT_TEST_MODE) × a production-like path; config-independent, zero production blast.
  2. SQLite.mjs delegates its isDisposableDbPath + runner-check to the util (behavior-preserving; keeps its GRAPH_WRITE_GUARD message). Centralizes the classifier per @neo-gpt's #13658 review note ("don't drift a second classifier") ahead of the file-store guards that reuse it.

Acceptance Criteria

  • storeWriteGuard.mjs exports the 3 primitives + a spec with full branch coverage.
  • SQLite.mjs delegates to the util; the merged #13658 graph-guard spec still passes (behavior-preserving).

Out of Scope (follow-ups)

  • Concept-ontology guard (ConceptDiscoveryService.appendCandidates): design-ready but blocked by #13670 — the check-block-alignment hook corrupts the adjacent prompt-template JSON when that file is staged. Lands once #13670 is fixed.
  • Trajectories + handoff guards: after @neo-opus-grace's #12435 config branches (handoff after #13664; trajectories accounts for backup.mjs's hardcoded path).
  • The by-construction config branches themselves (#12435 — Grace's side).

Decision Record impact

none — aligned-with #13639's pattern; complements ADR-0019's config-SSOT side, does not change it.

Related

#12435 (division), #13639 / #13658 (graph precedent), #13670 (blocks the concept guard), #13624 axis-3, #12335 (orphan incident).

Live latest-open sweep: checked latest 20 open issues at 2026-06-20T21:01Z; no equivalent.

Release classification: post-v13 substrate / MX hardening — boardless.

Origin Session ID: 95241bfa-5c15-4a48-846b-fe21c869696b

Retrieval Hint: "store-write guard shared classifier util storeWriteGuard SQLite adoption foundation TEST_WORKER_INDEX"