Security-gate drift check — npm run selftest:gate-list-drift (T707, retargeted 2026-09-07)
The security/data-integrity smoke list froze on 2026-08-22 in two hand-maintained copies (the CI gate
loop and the git-workflow rule's precondition 3), and ten security smokes shipped afterwards without
entering either — including selftest:daily-cap-reservation, which guards the fix for a real
$12.18-of-a-$10-cap overshoot.
npm run selftest:gate-list-driftscripts/selftest-manifest.json is the single declaration. Since the 2026-09-07 code-only CI cut
the smoke asserts:
- every declared name is a registered
selftest:*script; - precondition 3 in
.claude/rules/push-gates.md(tracked) equals the declared set; .github/workflows/ci.ymlruns NO runtime smoke — nofor t inloop, nonpm run sweep, and everyselftest:<name>it invokes is one of the static drift checks (gate-list-drift,claude-md-drift,dep-audit);- every
expectedSkipsentry names a real script; - the local wiring exists:
scripts/selftest-sweep.mjswrites the per-SHA stamp,.githooks/pre-pushis executable, guardsrefs/heads/mainagainst a skip-ci token and no longer reads the stamp, andpackage.json'spreparescript pointscore.hooksPathat.githooks.
CI runs this smoke in its gate job, so a runtime smoke added back to the workflow, or a security
smoke added to the manifest but not to the rule, goes red on the next push.
Extend recipe — adding a security smoke: add its bare name to security in
scripts/selftest-manifest.json (keep the array sorted) and to precondition 3 in
.claude/rules/push-gates.md — both in one commit. npm run sweep -- --security runs exactly
that class locally.
Known limitations and deferred work: the check compares NAMES, not behaviour — it cannot tell you
that a smoke in the list has stopped guarding anything. It also only inspects run: lines of
ci.yml with comments stripped, so a runtime smoke hidden behind an indirection (a script CI
calls that itself runs npm run selftest:...) would not be caught; keep CI steps as direct
npm run invocations.
Selftest sweep with a real SKIP channel — npm run sweep (T707)
This project has no test framework; the selftest: smokes ARE the test suite, and the sweep is how you run all of them before a push. It replaced ~15 lines of bash that lived inside...
Sweep stamp and pre-push hook — .githooks/pre-push (2026-09-07, gate removed 2026-09-30)
Operator decision: CI catches code; real tests run on the developer machine, which has every CLI and key. A full npm run sweep (no --only / --security) records its verdict in...