Skip to content

Re-tag rows stored before #372 that match the injection screen #375

Done

Description

@abogartz

What this is about

PR #372 makes /repo-init screen the rows it writes for injection-shaped text: a checkout sitting in a directory named eval (x) now gets its command memories stored with a quarantine tag, so they never reach the prompt.

But that fix only covers writes that happen after it ships. A store that already holds an untagged poisoned row from an earlier init keeps it, and re-running init cannot fix it: the write gate's exact-duplicate check compares type and text only, so the new quarantined candidate collapses into the old untagged row. force: true does not help either — force skips the stamp check, not the dedup.

What needs doing

A one-time remediation that re-tags existing rows, so a store poisoned before #372 gets clean without the user hunting for rows:

  1. run the existing quarantinePatterns scan over every active row's content and scope;
  2. add quarantine plus the matching quarantine:<id> tag to any row that hits, through the normal write path so the change is audited;
  3. report how many rows were re-tagged.

Where it lives is a design call: inside memory_init with force: true, or a small maintenance script. Option 1 fits the existing "init repairs the repo's memory" shape.

If a scan is judged too invasive, the minimum acceptable outcome is documenting the operator remedy — memory_forget the row by ts, then re-run init — in the README troubleshooting table. That is worse: the whole point of #302 was that a poisoned row is invisible to the user.

Where the finding came from

Adversarial self-review on #372: #372 (comment) — finding 1. The dedup match is the exactPoll comparison in src/gate/gate.ts: type + content decide a collapse, tags do not.

Activity

  1. added a commit that references this issue on Nov 12, 2026
  2. abogartz commented on Nov 12, 2026

    @abogartz
    OwnerAuthor

    The repair landed in 374-init-stamp-file via PR #378 (merged 2026-11-12, reviewer-verified with a real lock-contention replay): gate collapse completes the retirement, a rejecting retirement reports partial + retag_failures, and the retry finishes the job. It reaches main when #376 merges; keeping this open until it does.

  3. abogartz-opencode-self-improvement commented on Nov 12, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.23.1 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  4. ocsi-architect commented on Nov 25, 2026

    @ocsi-architect

    Closing: init re-tags legacy rows. src/init/retag.ts scans readable rows and replaces injection-shape hits through the gated supersede write path, reporting the count — pre-#372 rows no longer keep their untagged shape. Verified against main a573a3b.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions