Repository navigation
Description
Proposed classification: bug, store-security, severity:medium. Labels require maintainer permissions; these are suggestions for your triage.
For maintainer triage and approval of scope. Reviewed main at bf9f4d2, still current when these proposals were prepared. Review probes use synthetic temporary stores; this is not a report of a production incident. No implementation or assignment is implied by this issue.
SEC-02: memory_merge_review skips loser authorization when the loser row is blocklisted, so a session can retire another repository's row
- src/index.ts:1035 — loserRow resolved from loadAll(), which drops blocklisted rows (src/memory.ts:174-185)
- src/index.ts:1043 —
if (loserRow && !isVisibleTo(...)): an undefined loserRow skips the check - src/index.ts:1049 — markSuperseded(args.loser) then rewrites the raw line in any day file regardless of repo or blocklist
Reproduction: test/review-probes/probe-merge-blocked.probe.ts: seed a repo-B row and a repo-A row. addBlock(bRow). From a repo-A plugin session, call memory_merge_review({loser: bRow, survivor: aRow, reason}). Then removeBlock(bRow).
Observed: Reply: 'Resolved merge: is canonical; superseded ...'. B's on-disk row now carries superseded_by=, reason=cross-repo, symbol/from/to. After unblocking, B's row stays superseded, so it is withheld from B's recall/injection.
Effect: Cross-repository integrity violation of the documented #131 contract ('a row belonging to another repository is refused in either seat'; README: 'a row id it merely knows is not authority to retire another repo's memory'). Practical impact is limited: the row is already hidden while blocked, and supersession is recoverable (memory_undo, or viewer inspection). The effect appears when a human later unblocks the row, which then silently stays retired, pointing at a foreign survivor.
Preconditions: The attacker session must know the exact ts of a blocklisted foreign row. #212 (SEC-03) shows one way such ids reach other repositories (viewer evidence lines).
Limits: The same pattern (authorize only if found by loadAll) was not found in other tools: update, prune, and undo filter raw lines or visible rows directly.
Proposed scope / decision requested
Require an authorized, resolvable loser before mutation. Test an explicit repo-A tool call against a blocked repo-B loser, missing losers, and normal valid merges. This is the blocked-row residual of #131, not the stale-review decision in #126.
Please accept, narrow, defer, or decline this independently of the other review findings. We will wait for your direction before taking implementation. Happy to supply a checked-in regression reproducer with an accepted fix; the review report and probe artifacts are preserved locally.
Activity
WhollyMindless commentedon Nov 2, 2026
Claiming #204 per our coordination agreement. No agent:ready label or existing claim is present. I will reproduce the blocked-loser case on current main, keep the fix scoped to requiring a resolvable and authorized loser, and add regression coverage for blocked/missing losers and valid merges. I will leave automation labels alone and post a PR for your consideration; please feel free to defer or reject it.
WhollyMindless commentedon Nov 2, 2026
Ready for consideration in #259. Confirmed on current main: blocked foreign/own/global losers all reach the raw mutation path. The PR requires a resolvable loser first, with explicit-session regression tests. Focused ownership tests: base 5 pass / 3 fail; fixed 8/8 on Windows and Linux. Full Windows gate: 862 pass / 26 skip unit tests and 30/30 E2E. Automation labels left unchanged; please feel free to defer or reject.
abogartz-opencode-self-improvement commentedon Nov 2, 2026
🎉 This issue has been resolved in version 0.15.10 🎉
The release is available on:
Your semantic-release bot 📦🚀