Skip to content

memory_undo force omits tombstoned rejections (decision #214 A) #307

Closed

Description

@abogartz

Implements the accepted decision on #214 (accept A, maintainer 2026-11-04): rejection is absolute — memory_undo force omits tombstoned values.

Problem

restoreSnapshot (src/store/undo.ts) consults no tombstone in any mode: force reinstates a value that memory_forget tombstoned, leaving the store holding an active row it also records as rejected. This contradicts #35's stated property that no tool lifts a rejection. Verified current at 06e4e28.

Fix direction

In restoreSnapshot, before publishing in force mode, consult the rejection tombstones (src/store/tombstones/rejection.ts / tombstone.ts) and omit keys that carry one; report them in a new rejectedOmitted list on the result, separate from the existing deletedOmitted. Update the check-mode reply and the memory_undo tool description in src/index.ts so the contract is stated where agents read it. Tombstone lines themselves are never edited or deleted; mis-forget recovery stays human (remove the tombstone, then plain undo).

Acceptance

  • RED: scenario test — store a decision, snapshot its day file, memory_forget it, then memory_undo with force=true: the row comes back recallable. Fails on main for exactly that reason.
  • GREEN: force omits the tombstoned row, names it in rejectedOmitted, and the row stays non-recallable; a force undo of a snapshot containing rows deleted by ordinary means still restores those; blocklisted rows stay hidden in every mode; the tombstone evidence line is byte-identical before and after.
  • No existing assertion weakened; bun run typecheck && bun run lint && bun run test green, bun run test:e2e since src/ changed.

Activity

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

    @ocsi-triager

    osi-spec-hash: 9cae4ed762e6a814 2026-11-04T23:38:09Z - 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:working
    fix:pr-open
    and removed
    fix:working
    on Nov 5, 2026
  4. added 2 commits that reference this issue on Nov 5, 2026
  5. abogartz-opencode-self-improvement commented on Nov 5, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.15.36 🎉

    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:readyfix:pr-openreleasedseverity:mediumstore-security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions