Skip to content

Viewer restore: retain quarantine, provenance, and deleted-row metadata #207

Closed

Description

@WhollyMindless

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-05: Deletion audit drops tags, so the viewer's restore of a deleted quarantined row silently releases quarantine and loses import provenance

Reproduction: test/review-probes/probe-restore-entry-quarantine.probe.ts: store a repo-stamped row tagged import,quarantine,quarantine:instruction_override with injection-shaped content. deleteMemory it. Read /api/data and post exactly what page.html's restore button sends to /api/restore-entry.

Observed: /api/data's deleted entry carries no tags or quarantine indicator. restore-entry returns 200. The restored row has tags=undefined and isInjectable=true. The '[via import]' marker, kw, issue and open status are also gone.

Effect: Release-quarantine is meant to be a deliberate, reason-required, audited approval. Restoring a deleted entry gets the same effect with no indication to the operator that the row was quarantined. The same applies to rows removed via memory_forget. Import provenance, which drives the injected '[via import]' discount, is also lost.

Preconditions: A human clicks 'restore' on a deleted entry in the viewer. No agent-only path was found.

Limits: This needs a human action, so it is not an autonomous bypass. It is reported because the operator is given no signal that the restore releases quarantine.

Proposed scope / decision requested

Preserve tags, provenance, keywords, issue and status in both deletion paths and restore them through the viewer. Make quarantine visible in deleted-entry UI and avoid implicitly treating restore as quarantine approval. Please choose a fallback for old audit entries without this metadata; rescanning alone cannot reconstruct provenance. Resolve authoritative deletion data where possible rather than trusting client-supplied provenance. Separate from PR #203's append publication.

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

  1. added
    bug
    store-security
    severity:medium
    agent:ready
    on Nov 1, 2026
  2. ocsi-triager commented on Nov 3, 2026

    @ocsi-triager

    osi-spec-hash: 62be5c1748331af2 2026-11-03T23:42:41Z - 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.

  3. added
    fix:pr-open
    on Nov 4, 2026
  4. added
    fix:blocked
    on Nov 4, 2026
  5. ocsi-fixer commented on Nov 4, 2026

    @ocsi-fixer

    fix:blocked on the rework loop for PR #280: three trusted CHANGES_REQUESTED verdicts have accumulated there (WhollyMindless at 9b2dfcf and 4c18678, ocsi-reviewer at head 9c754ce), and the fixer protocol forbids a third cycle. Nothing in the diff remains unmet: ocsi-reviewer verified at 9c754ce that both WhollyMindless findings (F1 quarantine badge rendering, F2 restore preserving quarantine on omitted/unknown ts) are closed, with a mutation-pinned test. What remains is two things no push can settle: (1) WhollyMindless should dismiss the two now-stale CHANGES_REQUESTED reviews, whose findings were verified resolved at head; (2) ocsi-reviewer's head verdict is solely the required check test-windows being red at 9c754ce from the known capture_lag race on main (test\capture.test.ts:978, run 41768508972, untouched by this diff) — the reviewer stated they will dismiss that CR once the failure no longer reproduces, which needs main's flake fixed or #277 landed plus a rebase. fix:pr-open stays; the implementation is complete and awaiting review-state cleanup and green CI.

  6. added
    spec:incomplete
    on Nov 4, 2026
  7. added a commit that references this issue on Nov 4, 2026
  8. abogartz-opencode-self-improvement commented on Nov 4, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.15.23 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:readybugfix:blockedfix:pr-openreleasedseverity:mediumspec:incompletestore-security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions