Preflight fixture self-tests: every silent-failure guard must fire on a canned fixture before a run #446
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#446
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Learning L5 of
docs/research/2026-08-11-software-factory-learnings.md: several swarm guards fail silently — if they break,they simply never fire, and we learn during an incident. The limit-guard storm
(grep wording mismatch, 70 red runs / 92 min), GOTCHAS §17 (
${VAR:?}inside$(...)silently disabling the rail-6 backstop), GOTCHAS §16 (healersignature collapse) are all this class. SSSF's rule: nothing spawns against a
half-valid config; health checks assert on output/content, never exit codes or
existence.
What to build
preflight-swarm.sh(same spirit as the existing zero-tokenpreflight-triage.sh), run at the top ofrun-swarm.shbefore any real work.For every guard whose failure mode is "silently never fires", feed it a canned
fixture it MUST fire on; silence = instant red, run aborts before spawning
workers.
Minimum fixture set:
limit-lib.sh): a saved real Claude usage-limit blockmessage → the detector must match it. (Would have caught the 70-red-run
storm in 5 seconds.)
verdict-lib.sh/heal-lib.sh): acanned failing-stage log → non-empty, stable signature out.
violates it → the rail must trip (catches the §17 class where shell
quirks disable a rail).
fields.
just present (check content/shape, never existence alone).
Rules: fixtures live in
.sandcastle/tests/fixtures/; each is a REAL capturedartifact (or a documented minimal synthesis), dated; when a guard's target
format changes, the fixture changes in the same commit (same-commit law, as
GOTCHAS entries). Preflight red posts the failing guard name to the runlog and
Mattermost, exactly like other run-fail paths.
Acceptance criteria
preflight-swarm.shwired at the top ofrun-swarm.sh, fails closedrun red at preflight with the guard named — demonstrated in a test
docs/GOTCHAS.md§16/§17 entries gain a "Rule" cross-reference to thepreflight (same commit)
References
docs/research/2026-08-11-software-factory-learnings.md(L5)empty; content-not-existence) in
disler/inkwell-agent-sandboxes-and-software-factory#446 landed on main in
4f64639.What was built:
.sandcastle/preflight-swarm.sh— a zero-token, ~0.2s self-test run at the very top ofrun-swarm.sh(before the janitor mutates a label, beforepnpm install, before any worker spawns). It fires five silently-failing guards against canned fixtures each MUST match, and reds the run — naming the guard to the runlog (EXIT-trap reasonpreflight-red) and Mattermost — if any stays silent. Fails closed.Guards / fixtures (all in
.sandcastle/tests/fixtures/, dated, same-commit law):claude_limit_hitmatches a real usage-limit block (claude-usage-limit.txt) and NOT a normal log. Would have caught the 2026-07-29 storm (70 red runs / 92 min) in 5s.seam_verdict_signal/normalize_error_line/compute_signaturenon-empty + stable (swarm-verdict-fail.txt; GOTCHAS §16 class).heal_railscap (nothing-committed, multi-commit, diff-cap, self-mod) tripped against a violating synthesised checkout, plus the §17 rail-6 counter reaching 2 after two marks.secret-empty.txt) is REJECTED, a non-empty one accepted (GOTCHAS §4 class).AC evidence:
run-swarm.sh, fails closed ✓bash .sandcastle/preflight-swarm.sh→ all 5 fired, 0.24s)tests/preflight-swarm-test.sh: a mangled limit grep reds naminglimit_detection; a disabled rail reds naminghealer_rails)preflight-swarm.shis per-repo (not harness-synced), matchingpreflight-triage.sh. STATUS.md header + milestone log updated in the same commit.invalid-policy— the #12 policy gate's label check has a 6s retry budget, records no verdict error line, and blames a policy file that is valid (the #1359 defect in the other preflight gate) #2052invalid-policy— the #12 policy gate's label check has a 6s retry budget, records no verdict error line, and blames a policy file that is valid (the #1359 defect in the other preflight gate) #2052