Repository navigation
Description
Part of #291.
Problem
Init is the only capture path that never runs the quarantine scan. quarantineCandidate is applied to auto-capture (src/capture/runtime.ts:268) and to import (src/portable/import.ts:86), but init rows are built at src/init/run.ts:164 from repo-derived text and go straight to runWriteGate unscreened. Both parts of the row are external text: scope is the checkout directory basename (src/init/run.ts:105) and s.cmd comes from the file detectors. A row whose content or scope matches an injection pattern — e.g. a clone directory named eval (x), which matches the dynamic_execute pattern in src/store/quarantine/quarantine.ts — is promoted with no quarantine tag and injected with no marker (src/inject/format.ts:17 limits provenance markers to auto-capture/import). Verified at sha 7405dc61d919e7eee7033dea6e4324eda58ee669.
Fix direction
In src/init/run.ts, wrap the candidate object passed to runWriteGate for each detected script in quarantineCandidate — the same call shape as src/portable/import.ts:86. quarantineCandidate already scans both content and scope (see its #205 comment). Test coverage in test/init.test.ts.
Acceptance
- RED: on main
7405dc6, a test that runsmemory_initin a fixture repo whose directory basename containseval (and asserts the promoted script row carries thequarantinetag fails — on main the row is promoted without it. - GREEN:
bun test test/init.test.tspasses; an init-promoted row whose content or scope matches a quarantine pattern carriesquarantineplus thequarantine:<id>tag(s), and the existing clean fixture (plainrepodirectory, clean scripts) still promotes untagged rows.
Activity
chore(release): 0.22.1 [skip ci]
abogartz-opencode-self-improvement commentedon Nov 9, 2026
🎉 This issue has been resolved in version 0.22.1 🎉
The release is available on:
Your semantic-release bot 📦🚀