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
tool-path writes (remember/update/import) still resolve session identity from ambient getCurrent() #121
Follow-up from #118's approval review (note 2): the capture path got its session threading (#116 → #118), but the three tool-path runWriteGate sites in src/index.ts (remember / update / import) still resolve identity from the ambient getCurrent().
The window is fs-sized rather than model-sized - the hooks dispatch with current bound to the calling session, and there is no long await before gateContext() is constructed - but between setCurrent in execute.before and the gate's OWN awaits (analysis, locked append), another session's dispatch can still move current and attribute the write: stamp, evidence, liveRoot. Same disease, smaller dose.
Right seam (deliberately not rushed in #118): the tool hooks carry sessionID per event; the execute bodies get identity only via the global. Either a per-callID binding (the before-hook already sees callID) or reading the sid off the tool execution ctx - whichever keeps gateContext(sid)'s call-site shape.
A red pin needs the same deterministic interleave as #118's (a park seam at a fs await inside the gate rather than the model call - the harness seam already exists), and must show BOTH shapes #118 established: gate judged the hijacker, and the row stamped the hijacker's repo.
The identity threading this issue asked for ships in #133: toolIds(context) reads sessionID/id off the host's per-call ToolContext synchronously at tool entry (src/index.ts), gateContext(sid) carries it into the gate, importMemories takes the importing session explicitly, and the gate's dedup/stale reads partition on the write's session (loadScope(scope, readerForSession(ctx.sessionID))). All three sites named here (remember / update / import) plus list/recall/status are covered.
One acceptance line from this issue is not delivered: the deterministic write-hijack red pin — "gate judged the hijacker, and the row stamped the hijacker's repo". #133's test/security-session-isolation.test.ts pins the injection shape (3 tests: mid-read ambient move, unbound fail-closed, single-session guard); the capture write path keeps #118's pin, but the tool-write hijack shape has no red test anywhere.
Maintainer call on #133 merge: close as fixed-by-#133 accepting the injection pins as sufficient, or keep open as a test-integrity follow-up for the tool-write hijack pin.
toolIds (src/index.ts:340-355) reads sessionID/callID off the tool execution ctx via toolIdentity() and binds a provisional session→dir mapping for a session this instance has not yet seen — the "read the sid off the tool execution ctx" seam this ticket named. getCurrent() survives only as the documented fallback when the ctx carries no sid, and gateContext's comment now states that contract explicitly.
Remaining sub-item, if you want it as its own ticket: a red pin with #118-style deterministic interleave at a gate fs await is still not committed for the tool paths (no test file names #121). That is a test-integrity child, not a correctness gap.
Severity triage 2026-10-30 — reviewed against main @ 525ed89 (v0.14.24). Labeled verified-on-main: the behavior this ticket describes no longer exists, so there is nothing to build. Full-suite baseline at that commit: 722 pass / 12 skip / 0 fail. Closing is your call; the evidence is here so the claim is checkable rather than asserted.
Activity
fix(evidence): gate-authored lines name the session the gate runs FOR
chore(release): 0.14.9 [skip ci]
abogartz commentedon Oct 27, 2026
The identity threading this issue asked for ships in #133:
toolIds(context)readssessionID/idoff the host's per-callToolContextsynchronously at tool entry (src/index.ts),gateContext(sid)carries it into the gate,importMemoriestakes the importing session explicitly, and the gate's dedup/stale reads partition on the write's session (loadScope(scope, readerForSession(ctx.sessionID))). All three sites named here (remember / update / import) plus list/recall/status are covered.One acceptance line from this issue is not delivered: the deterministic write-hijack red pin — "gate judged the hijacker, and the row stamped the hijacker's repo". #133's
test/security-session-isolation.test.tspins the injection shape (3 tests: mid-read ambient move, unbound fail-closed, single-session guard); the capture write path keeps #118's pin, but the tool-write hijack shape has no red test anywhere.Maintainer call on #133 merge: close as fixed-by-#133 accepting the injection pins as sufficient, or keep open as a test-integrity follow-up for the tool-write hijack pin.
abogartz commentedon Oct 30, 2026
Fixed — every tool-path gate now receives a per-call session id
grep -n "gateContext()" src/index.tsreturns zero hits: each of the fourrunWriteGatesites passes an explicit sid.memory_remember→src/index.ts:442runWriteGate(candidate, gateContext(sid)), sid fromtoolIds(context)(line 424)memory_update→src/index.ts:692{ ...gateContext(sid), reader, supersedesTs, durable }memory_import→src/index.ts:1142const importGate = gateContext(sid)src/index.ts:1535const captureGate = gateContext(sid)toolIds(src/index.ts:340-355) readssessionID/callIDoff the tool execution ctx viatoolIdentity()and binds a provisional session→dir mapping for a session this instance has not yet seen — the "read the sid off the tool execution ctx" seam this ticket named.getCurrent()survives only as the documented fallback when the ctx carries no sid, andgateContext's comment now states that contract explicitly.Remaining sub-item, if you want it as its own ticket: a red pin with #118-style deterministic interleave at a gate fs await is still not committed for the tool paths (no test file names #121). That is a test-integrity child, not a correctness gap.
Severity triage 2026-10-30 — reviewed against
main@525ed89(v0.14.24). Labeledverified-on-main: the behavior this ticket describes no longer exists, so there is nothing to build. Full-suite baseline at that commit: 722 pass / 12 skip / 0 fail. Closing is your call; the evidence is here so the claim is checkable rather than asserted.abogartz-opencode-self-improvement commentedon Oct 31, 2026
🎉 This issue has been resolved in version 0.14.27 🎉
The release is available on:
Your semantic-release bot 📦🚀