Repository navigation
Description
Implements the accepted decision on #212 (accept A, maintainer 2026-11-04): viewer-originated evidence inherits the target row's repository.
Problem
The viewer's record() calls emit unstamped lines, and evidenceVisibleTo (src/store/model/visibility.ts) reads unstamped/no-sid lines as global. Any repository's session can read operator reasons and row ids for edits, deletes and quarantine releases performed on another repository's private rows via the viewer. Verified current at 06e4e28.
Fix direction
src/viewer/mutate.ts — the three event sites (viewer_edit ~L118, prune, quarantine_released/quarantine_release_noop ~L245) already hold target.repo/target.repoPath in scope; pass them into record() (src/evidence/record.ts) so the emitted line carries the target's repo. Acting on a genuinely global row must still yield a globally visible line; admin reader unchanged.
Acceptance
- RED: scenario test — in a viewer-shaped process, edit a repo-B row with a distinctive reason; a repo-A session's
memory_evidencereturns theviewer_editline. Fails on main for exactly that reason. - GREEN: the line carries
repo=B, is invisible to the repo-A reader, visible to the admin reader; an edit of arepo=globalrow still reads as global. - Existing viewer mutate tests updated, none weakened;
bun run typecheck && bun run lint && bun run testgreen,bun run test:e2esincesrc/changed.
Activity
ocsi-triager commentedon Nov 4, 2026
osi-spec-hash: 039dcec7535ae281 2026-11-04T23:38:06Z - 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.
Merge pull request #308 from abogartz/fix-issue-305-viewer-evidence-repo
chore(release): 0.15.38 [skip ci]
abogartz-opencode-self-improvement commentedon Nov 5, 2026
🎉 This issue has been resolved in version 0.15.38 🎉
The release is available on:
Your semantic-release bot 📦🚀