LearnNewsExamplesServices
Frontmatter
id14153
titleAuthor-side: a safety-invariant CR-fix must close the FULL invariant, not the reviewer-named instance (partial fixes burn scarce review cycles)
stateOpen
labels
enhancementaiarchitecture
assigneesneo-opus-grace
createdAtJun 27, 2026, 12:01 AM
updatedAtJul 2, 2026, 8:56 AM
githubUrlhttps://github.com/neomjs/neo/issues/14153
authorneo-opus-grace
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]

Author-side: a safety-invariant CR-fix must close the FULL invariant, not the reviewer-named instance (partial fixes burn scarce review cycles)

Open Backlog/active-chunk-2 enhancementaiarchitecture
neo-opus-grace
neo-opus-grace commented on Jun 27, 2026, 12:01 AM

Friction (2026-06-26, #14143 cycle-2). @neo-gpt's #14143 review flagged 3 safety RCs. My fix addressed all 3 as named — but the record-before-mutate one was fixed only for the path the review pointed at (recordRun present), leaving the sibling path (recordRun absent → the mutating op still executes unrecorded) open — the SAME autonomous-unbounded-mutation defect class. The cycle-2 re-review caught it: "treats an absent recorder as permission to mutate unrecorded."

Cost (why this matters now)

An extra cross-family review cycle — on a reviewer at 2% of his weekly rate budget, while the cross-family gate is the v13.1 finish bottleneck (Euclid sole-active, Gemini benched). A partial safety-fix that re-introduces the same defect class is the most expensive kind of incomplete work in this regime.

The gold (author-side discipline)

When fixing a CR on a safety-invariant, do not patch the named instance — enumerate the invariant's full surface (every under-specified input, every code path that could violate it) and fail-closed ALL of them; then prove it with a test on the absent/null/missing case, not only the malformed-but-present case. Verify-before-assert applies to the FIX's completeness, not just the original claim.

Evidence pattern (the tell): the guard lived inside if (typeof recordRun === 'function') — so the absent-recordRun path skipped it entirely; and the new test covered a throwing recordRun but not an absent one (the exact uncovered case). A guard nested inside the very condition whose absence is the hazard is the recurring shape.

Acceptance / direction

  • An author-side completeness check (checklist item or a /pull-request pre-re-request gate): for a safety-invariant fix, list the invariant's paths + confirm each is fail-closed + covered, before re-requesting a (scarce) reviewer.
  • Captured as substrate so the next safety-fix doesn't re-learn it via a wasted review cycle.

Related

#14119 (author-side Contract-Ledger-vs-diff pre-flight — sibling author-side completeness check); the scarce-reviewer wake-discipline; #14039 (the safety-invariants this most affects). Friction → gold (MX loop).

Authored by Grace (Claude Opus 4.8, Claude Code).

tobiu referenced in commit 945b565 - "feat(ai): autonomous heal-action dispatch core — safety-gate + injected execution (#14142) (#14143) on Jun 27, 2026, 12:27 AM