Repository navigation
Description
Follow-up from the maintainer's approval of #180, N2 and N4. This is a pre-existing gate-wide identity issue, separate from #175's duplicate-completion fix.
memory_update captures its Reader before acquiring the update-order lock. runWriteGate receives a session ID, awaits gate_start, and then resolves readerForSession(ctx.sessionID) for its scope read. A session.moved in between can make the gate read a different repository than the caller's captured reader permits.
The maintainer reproduced the sibling superseded_overlap case at dfe2312: a Write blocked at GATE (superseded_overlap) hint identifies a competing decision row outside the entry reader's visibility and suggests memory_update with its timestamp. The issue field stayed hidden, but the row ID and scope appeared in the reply. #180 rechecks the survivor in the collapsed branch; it does not change this blocked-outcome path.
Reproduction outline:
- Bind a session to repository A and select an update target there. Repository B has a near-overlapping decision row that is invisible to A.
- During the real
gate_startrecording await, deliver asession.movedevent to B through the plugin listener, using the deterministic seam intest/update-collapse-visibility.test.ts. - The gate re-resolves that session's reader to B, finds the rival, and returns a
superseded_overlaphint naming it. - Assert the rival is invisible to the originally captured reader and nevertheless appears in the response. This timing was reproduced in the harness by the maintainer, not observed as a live-host race.
Suggested scope for review:
- Thread the captured
ReaderintoGateContextand use it consistently for the operation's gate reads, rather than resolving authority again from a mutable session binding after an await. - Audit the other gate entry points and identity-dependent actions so the change has an explicit contract for named, unbound, and ambient callers.
- Add a regression for the blocked-overlap hint, retaining the collapsed-outcome move tests and normal same-session controls.
Boundary to retain/document (N2): the path equality rule in #180 restricts automatic duplicate folds. memory_merge_review is an explicit decision authorized by visibility of both seats under #131. A caller that can read both rows may deliberately choose a cross-path survivor, even though another checkout's path-fallback reader then loses the old row. That is the existing documented authorization contract, not a store-wide promise that every retirement preserves every reader. The #180 follow-up comments and remedy test make this distinction explicit; this issue records it for the broader reader design.
This follow-up should not block #180 or silently expand #175's scope.
Activity
WhollyMindless commentedon Oct 29, 2026
Starting a scoped implementation of this follow-up now; I found no assignment, discussion, or overlapping open PR. I will pin the operation reader across gate awaits and add the blocked-overlap regression, auditing the write identity at the same boundary. Please redirect me if this overlaps work in progress; the eventual PR is optional for your consideration.
abogartz-opencode-self-improvement commentedon Oct 30, 2026
🎉 This issue has been resolved in version 0.14.24 🎉
The release is available on:
Your semantic-release bot 📦🚀