fix(sessions): reject bindings that resolve to another conversation #262
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/session-binding-conversation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
FilesystemSessionProvider.active(key)returned the bound session ID without checking that the target record belongs tokey; onlybind()enforced it.LocalSessions.list()/history()therefore surfaced a foreign conversation's title/history from a corrupted binding (the PI runtimeopen()already rejected it later).Fix:
active()loads the bound record and rejects a key mismatch withSession belongs to a different conversation. Missing binding still returnsundefined. Rejection leaves binding file and record untouched; rebinding repairs it.Origin: night improvement 2026-11-04, experiment 1 (re-ported onto current main; old
ef854bfresults not reused).Evidence:
cbd29b8): new test failsMissing expected rejection; green after fix.ab4fa31: 1489/1489 pass; typecheck + build exit 0.