LearnNewsExamplesServices
Frontmatter
id13639
titleGuard graph-node inserts outside UNIT_TEST_MODE (inserts have no guard twin)
stateClosed
labels
bugaiarchitecturemodel-experience
assigneesneo-opus-ada
createdAtJun 20, 2026, 5:28 PM
updatedAtJun 20, 2026, 10:27 PM
githubUrlhttps://github.com/neomjs/neo/issues/13639
authorneo-opus-vega
commentsCount2
parentIssue13624
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[ ] 12435 aiConfig Provider singleton mutated without restore across ~11 test setups — add snapshot/restore isolation
blocking[]
closedAtJun 20, 2026, 10:27 PM

Guard graph-node inserts outside UNIT_TEST_MODE (inserts have no guard twin)

Closed v13.1.0/archive-v13-1-0-chunk-4 bugaiarchitecturemodel-experience
neo-opus-vega
neo-opus-vega commented on Jun 20, 2026, 5:28 PM

Context

Sub of #13624 (axis 3 of the 3-axis decomposition — see issuecomment-4758705660). This is the operator's "room for future corruptions + new daemons" thread, surfaced as @neo-opus-grace's V-B-A finding (2026-06-20).

Authorship note: this ticket captures @neo-opus-grace's finding so it's tracked per the operator's "we need the tickets now" directive — assigned to her to refine with the exact insert-paths + the guard-twin design. Created by Vega from her A2A; grace owns the substance.

The Problem (per @neo-opus-grace's V-B-A)

Graph-node inserts to the live Memory-Core graph are unguarded under any non-UNIT_TEST_MODE run. The existing safety guards are destructive-only (deleteCollection + guardProductionWipe) — there is no insert twin. So a future daemon, a bad migration, or new code can write corrupting/garbage nodes into the live graph with no guard, no validation gate, no production-write protection. As the orchestrator gains daemons (the #13624 arc), this is the latent corruption surface.

The Fix (direction — @neo-opus-grace to refine)

A symmetric insert/write guard twin for the destructive guards — a production-write protection / validation gate on the graph-node insert path (mirroring guardProductionWipe's shape for the write/insert direction). Exact insert-paths, the guard contract, and the UNIT_TEST_MODE interaction: grace's V-B-A to specify.

Acceptance Criteria (seed — @neo-opus-grace to refine)

  • Live-graph node inserts pass a production-write guard outside UNIT_TEST_MODE (twin of the destructive-op guard).
  • The exact unguarded insert-paths are enumerated (the V-B-A surface).
  • Test coverage: an unguarded insert outside test-mode is rejected/gated; the guard is inert under UNIT_TEST_MODE.

Out of Scope

  • Session-summary churn/marker (#13637, axis 1) + miniSummary throughput (#13638, axis 2). This axis is purely the insert-guard / corruption-prevention surface.

Related

Parent epic: #13624 (axis 3). Surfaced by @neo-opus-grace's V-B-A (A2A, 2026-06-20). Existing destructive guards: deleteCollection, guardProductionWipe.

Origin Session ID: a0f40f62-6d2f-4f83-b035-9a6342ec9fdc Retrieval Hint: "graph-node insert guard twin unguarded production-write guardProductionWipe #13624 axis-3"