tests: two offline suites red on clean main — rehearsal-healer-test leaks the real .env drive issue (#492≠378), preflight-swarm-test asserts stale output #537
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#537
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?
Found 2026-08-14 while landing #510 (both reds reproduce on clean
mainBEFORE the #510 diff — baselined via stash).rehearsal-healer-test.sh— scenario 1 failsno #378 healer comment. The reporter under test echoesdrive issue #492 stays armed: the test's fixtures expectREHEARSAL_DRIVE_ISSUE=378but the harness lets the real.sandcastle/.env(492 today) leak through. Pin the env in the test harness (REHEARSAL_DRIVE_ISSUE=378in the invocation env, or point at a fixture .env) so the suite is hermetic — the 378→492 re-mint broke it silently.preflight-swarm-test.sh— failsgreen preflight did not report all guards firedwhile the captured output endsall 6 guards fired. The assertion is drifted from the preflight's current output shape; re-pin it.Both are offline suites — no lab needed. Acceptance: both suites green on clean main; the healer suite stays green with any
REHEARSAL_DRIVE_ISSUEvalue in.sandcastle/.env.Why human
Nothing —
ready-for-agent; found by session, filed under ADR 0174.Blocked — this is a protected-path (
.sandcastle/) machinery change; a human must apply it.Both target files live under
.sandcastle/tests/, which is a fingerprinted protected path (protected-paths-lib.sh, ADR/#445). A Sandcastle agent cannot edit them: any change is rolled back and the run fails loud. #537 is itself a.sandcastle/machinery-fix request and was mis-triaged asready-for-agent; routing toready-for-humanper the escape path inCLAUDE.mdrule 9.I confirmed both reds reproduce on clean
mainand diagnosed both fixes precisely — they are one-liners:1.
preflight-swarm-test.sh:14— assertion drifted. The preflight now fires 6 guards (aclose_reportguard was added; output endsall 6 guards fired), but the test asserts:Fix:
all 5 guards fired→all 6 guards fired.2.
rehearsal-healer-test.sh:12— harness not hermetic. The export line setsPATH/FORGEJO_TOKEN/REHEARSAL_STATEetc. but never pinsREHEARSAL_DRIVE_ISSUE, sorehearsal-report.shfalls back to its own: "${REHEARSAL_DRIVE_ISSUE:=492}"default (the current 378→492 re-mint) — 492 leaks past the fixtures, which are hardcoded to 378 (e.g.*/issues/378/comments, and the assertiongrep -q '378/comments' || fail "no #378 healer comment"at line 115). Fix: addREHEARSAL_DRIVE_ISSUE=378to the exported env on line 12 so the suite is hermetic regardless of.sandcastle/.env.Both suites are offline; no lab needed. After the two edits both go green, and the healer suite stays green for any
REHEARSAL_DRIVE_ISSUEvalue in.sandcastle/.env(acceptance).Reproduction evidence (clean
main, this run):— found by run 6236 (#537), under ADR 0174.
Relabelled
ready-for-sessionunder ADR 0174: both suites live under.sandcastle/tests/— a #445 protected path, so swarm workers must not fix them, but no Ben input is needed. The session-runner (or a live session) lands the hermetic-env pin + assertion re-pin.Ruled by agent under ADR 0174 — veto anytime. Two-way door: both fixes are
test-file-only edits, revertible with a commit, proven by re-running the
suites (including under a fabricated ambient
REHEARSAL_DRIVE_ISSUE=999todemonstrate hermeticity per the acceptance criteria). No production script
touched.
What landed (
1f5444aonmain):.sandcastle/tests/rehearsal-healer-test.sh— the suite never exportedREHEARSAL_DRIVE_ISSUE, so it inherited whatever the ambient hostenvironment had (
.sandcastle/.env'sREHEARSAL_DRIVE_ISSUE, currently523 on this workstation, not the 492 the ticket cited — it's re-minted
independently, #493). The suite's fixtures/assertions are hardcoded to
#378. Fix:export REHEARSAL_DRIVE_ISSUE=378at the top of theharness, alongside the other test-only env pins.
.sandcastle/tests/preflight-swarm-test.sh— assertedall 5 guards fired;preflight-swarm.shnow runs 6 (the close-report guard landedwith #444 after this assertion was written). Re-pinned to
all 6 guards fired.Proof:
bash .sandcastle/tests/rehearsal-healer-test.sh→OK: 12 cases, exit 0.REHEARSAL_DRIVE_ISSUE=999 bash .sandcastle/tests/rehearsal-healer-test.sh→ same result, exit 0 — confirms hermeticity to any ambient value, per
the ticket's acceptance criterion.
bash .sandcastle/tests/preflight-swarm-test.sh→preflight-swarm: 3 scenarios passed, exit 0.mainbefore the fix (stash-baselined),matching the ticket's own baseline.
Scope note: a full
.sandcastle/tests/*.shsweep on cleanmainfound3 more pre-existing reds outside this ticket's two suites —
heal-test.sh,list-ready-tasks-test.sh(both already flagged pre-existing by #531'sclose-report), and
session-runner-test.sh(newly observed, andnon-deterministic across two runs — looks racy).
list-ready-tasks-test.sh'sfailure (
the standing drive issue #492 must not be surfaced) looks likethe same hardcoded-fixture-vs-ambient-env shape this ticket just fixed.
Filed as #586 to keep this ticket's diff scoped to the two suites it named.
STATUS.md updated in the same commit.