You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
memory_merge_review: stale review erases a later memory_update's supersession and revives the retired row #126
agent:readyHuman-approved for autonomous work by ocsi-fixerbugSomething isn't workingfix:pr-openocsi-fixer opened a PR for this ticketreleasedseverity:mediumReal but narrow: robustness, hygiene, or gated behind multiple preconditionsstore-securityStore boundary: path containment, exposure docs, redaction, trust tiers, durable rejection
memory_merge_review clears the survivor's supersession marker unconditionally. If a memory_update superseded the survivor after the review was filed (S→S2), applying the stale review revives S next to live S2 — two active rows, and the update's supersession is erased. Mechanism: the merge handler runs markSuperseded(loser, by=survivor) then clearSuperseded(survivor) (src/store/files/supersede.ts:121 deletes the marker fields with no provenance check). Deterministic sequential behavior, no race needed. Original repro preserved in the thread and in the 2026-11-04 review of this ticket.
Fix direction
clearSuperseded gains a provenance guard: the marker is cleared only when it points at this review's loser (or carries the review's reason); a survivor superseded by anything else refuses the apply with a message naming the later supersession and the current live row. The loser is left untouched on refusal — a half-applied merge is the state this ticket exists to prevent.
Acceptance
RED: scenario test — file review L -> S; memory_update(query=S, …) retires S in favor of S2; memory_merge_review(loser=L, survivor=S) revives S as active alongside S2. Fails on main for exactly that reason.
GREEN: the merge refuses, naming S2 as the later supersession; S stays retired, S2 stays live and active, L is untouched; the normal case (survivor carries no later supersession) still merges — every existing merge test stays green.
bun run typecheck && bun run lint && bun run test green; bun run test:e2e since src/ changed.
Still open (the ruling this issue exists for): the stale sequence needs no interleaving — an update supersedes the survivor before the merge acquires the lock; the merge then reads the survivor as "superseded" and clearSuperseded erases the update's marker, reviving the retired row. fix(security): date-shaped evidence reads, ownership-checked merges, redact-before-crop capture (#130 #131 #132) #135 revalidates visibility under the lock, not "was this row superseded after the review was written". Options (a/b/c) and the lean (b: clear only when superseded_by == loser) stand; the pinned survivor-revival test remains the tripwire for whatever contract change is chosen.
osi-spec-hash: 71775e914782dce2 2026-11-03T22:31:44Z - acceptance criteria frozen at this text. A later edit to the body changes this hash, and the reviewer will withhold approval until a maintainer replies spec ok.
osi-spec-hash mismatch: computed body hash 6d4a3a800a988f6f, newest anchor 71775e914782dce2 (2026-11-03T22:31:44Z). The acceptance criteria were edited after the ticket was queued. Maintainer: reply spec ok to re-queue, or update the anchor.
osi-fixer: spec anchor mismatch — computed 6d4a3a800a988f6f, newest osi-spec-hash comment 71775e914782dce2. The body was edited after the criteria were frozen. Maintainer: please reply "spec ok" to re-queue.
osi-fixer: spec anchor mismatch — recomputed body hash 6d4a3a800a988f6f, newest anchor comment says 71775e914782dce2. The body was edited after the anchor was written. Maintainer: reply spec ok to re-queue, or the triager should refresh the anchor. Skipping build against an unverifiable spec.
Spec anchor mismatch: current body hash 6d4a3a800a988f6f, newest osi-spec-hash anchor 71775e914782dce2. The acceptance criteria were edited after the ticket was queued. Maintainer: reply spec ok to re-authorise, then a fixer run will pick this up.
agent:readyHuman-approved for autonomous work by ocsi-fixerbugSomething isn't workingfix:pr-openocsi-fixer opened a PR for this ticketreleasedseverity:mediumReal but narrow: robustness, hygiene, or gated behind multiple preconditionsstore-securityStore boundary: path containment, exposure docs, redaction, trust tiers, durable rejection
Activity
abogartz commentedon Oct 27, 2026
Status note after the #135 review (2026-10-26): #135 narrows this but does not close it.
memory_updateserializes on, so a concurrent update can no longer slip between the merge's resolve and itsclearSuperseded.clearSupersedederases the update's marker, reviving the retired row. fix(security): date-shaped evidence reads, ownership-checked merges, redact-before-crop capture (#130 #131 #132) #135 revalidates visibility under the lock, not "was this row superseded after the review was written". Options (a/b/c) and the lean (b: clear only whensuperseded_by == loser) stand; the pinned survivor-revival test remains the tripwire for whatever contract change is chosen.ocsi-triager commentedon Nov 3, 2026
osi-spec-hash: 71775e914782dce2 2026-11-03T22:31:44Z - acceptance criteria frozen at this text. A later edit to the body changes this hash, and the reviewer will withhold approval until a maintainer replies spec ok.
ocsi-triager commentedon Nov 5, 2026
Spec moved after the ready-anchor: 71775e914782dce2 -> 6d4a3a800a988f6f. The reviewer will not approve on the old contract.
ocsi-fixer commentedon Nov 5, 2026
osi-spec-hash mismatch: computed body hash
6d4a3a800a988f6f, newest anchor71775e914782dce2(2026-11-03T22:31:44Z). The acceptance criteria were edited after the ticket was queued. Maintainer: replyspec okto re-queue, or update the anchor.abogartz commentedon Nov 5, 2026
spec ok
ocsi-fixer commentedon Nov 5, 2026
osi-fixer: spec anchor mismatch — computed 6d4a3a800a988f6f, newest osi-spec-hash comment 71775e914782dce2. The body was edited after the criteria were frozen. Maintainer: please reply "spec ok" to re-queue.
ocsi-fixer commentedon Nov 5, 2026
osi-fixer: spec anchor mismatch — recomputed body hash
6d4a3a800a988f6f, newest anchor comment says71775e914782dce2. The body was edited after the anchor was written. Maintainer: replyspec okto re-queue, or the triager should refresh the anchor. Skipping build against an unverifiable spec.ocsi-fixer commentedon Nov 5, 2026
Spec anchor mismatch: current body hash 6d4a3a800a988f6f, newest osi-spec-hash anchor 71775e914782dce2. The acceptance criteria were edited after the ticket was queued. Maintainer: reply
spec okto re-authorise, then a fixer run will pick this up.Merge pull request #314 from abogartz/fix-issue-126-20261105T0545Z
chore(release): 0.15.35 [skip ci]
abogartz-opencode-self-improvement commentedon Nov 5, 2026
🎉 This issue has been resolved in version 0.15.35 🎉
The release is available on:
Your semantic-release bot 📦🚀
fix(merge_review): refuse a stale survivor's revival (abogartz#126)