Repository navigation
Screen init's repo-derived rows for injection-shaped text - #372
Conversation
Auto-capture and import screen their candidate for injection-shaped text; init went straight to the write gate. Both halves of an init row are external text: the scope is the checkout directory basename and the command comes from the manifest, so a clone in a directory named "eval (x)" promoted a row with no quarantine tag and no [via ...] marker, into every later session of the repo. Init now calls quarantineCandidate, the same shape import uses. The stamp row is screened too: it interpolates the same basename, and leaving it unscreened would keep one untagged injection-shaped row per init. Screening does not break idempotency — init still reads its own quarantined stamp.
Adversarial self-review (author-side, not independent)Followed the quarantined row through the gate and through Verified clean:
Findings:
Verdict: approve the code; finding 1 needs a follow-up ticket before #302 closes the risk, and finding 2 needs a merge order, not a code change. |
|
🎉 This PR is included in version 0.22.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [0.23.1](v0.23.0...v0.23.1) (2026-11-12) ### Bug Fixes * **init:** finish the re-tag when the gate collapses or retirement rejects ([61cc019](61cc019)), closes [#378](#378) [#155](#155) * **init:** keep the init stamp out of the memory store ([#374](#374)) ([27e74e8](27e74e8)) * **init:** make the legacy init-stamp row inert, and make its migration report the truth ([805bc6c](805bc6c)), closes [pre-#374](https://github.com/pre-/issues/374) * **init:** re-tag rows stored before the injection screen ([#375](#375)) ([ab1b3ac](ab1b3ac)), closes [#372](#372) [#372](#372)
What this does
Three paths write memories from text the plugin did not compose: auto-capture (mines the conversation), import (reads a portable file), and
/repo-init(reads the repository). The first two scan their candidate for injection-shaped text and tag a matchquarantine, which keeps the row out of recall and out of the prompt. Init did not — it went straight to the write gate.That matters because both halves of an init row are external text:
package.json/Makefile.So a clone sitting in a directory named
eval (x)— which matches thedynamic_executeinjection pattern — produced a memory that was promoted with noquarantinetag, and because init rows carry no[via ...]provenance marker it rode into every later session of that repository with nothing to distinguish it from a command the plugin had verified.Init now calls the same
quarantineCandidatescan the import path calls. A match is still stored — nothing is silently dropped — but it is tagged and withheld, exactly like a quarantined capture or import row, and it shows up in the viewer's quarantined filter for a human.One extension beyond the ticket
The ticket named the script rows. The init stamp row interpolates the same directory name (
Init stamp: repo=eval (x), head=…), so it gets the same scan; leaving it unscreened would have left one untagged injection-shaped row per init. The test pins that this does not break idempotency: init still reads its own quarantined stamp and reportsAlready initializedon the second run.Tests
eval (x), the promoted script row carried["init", "package.json"]— no quarantine tag.quarantineplus the matchingquarantine:<id>tag, the stamp row is screened too, and the second init is still a no-op.repodirectory, ordinary scripts) still promotes untagged rows, so nothing changed for a normal checkout.bun run gategreen: 1131 unit tests + 30 terminal/BDD tests against a real host, 0 fail.bunx tsc --noEmitclean; lint and format identical to main's baseline.Closes #302.