reporter/healer should refuse an already-repaired red — reuse bootstrap-staleness-lib on the report/heal side (#918 defense-in-depth) #919
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#919
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
Follow-up to #918 (fixed in
4e292243). #918 removed the phantom leg-red at its source:scripts/rehearsal-cycle.shno longer hands the reporter a run directory this cycle did not produce, and an exit-3bootstrap-stalepark files ONE idempotent staleness ticket instead of a leg red. That closes the deadlock.This ticket is the defense-in-depth half #918 flagged as "worth fixing in the same pass" but could not land, because it lives in protected
.sandcastle/paths (per CLAUDE.md Rule 9 / #445, a Sandcastle worker may not edit them — a session rules on the machinery change itself).The proposed hardening
Neither
.sandcastle/rehearsal-report.shnor.sandcastle/heal.sh(the healer) checks whether the red it is about to file or fix still reproduces in the bits a new drive would run before acting. The check already exists and is cheap —scripts/lib/bootstrap-staleness-lib.shdoes exactly this for the drive-side preflight (HEAD get.idss.nz, readx-idss-release,git merge-base --is-ancestor <fix> <served>).Reuse it on the report/heal side:
Why a session, not a worker
The change is entirely within protected
.sandcastle/paths. It is a two-way door (revertible, provable offline againstbootstrap-staleness-lib.sh's existing test shape), so a session should be able to rule it under ADR 0174, escalating toready-for-humanonly on a genuine one-way door.Note
This is optional hardening, not a live bug — #918 already suppresses the phantom at the source (
scripts/rehearsal-cycle.sh). This adds a second, run-dir-independent guard.Filed by the Sandcastle worker that fixed #918, per Rule 9.
Close-report — landed & proven (Ruled by agent under ADR 0174 — veto anytime)
What landed (commit
d0a74a65, onorigin/main): the report/heal side now re-runs the #600 bootstrap-staleness gate, closing the defense-in-depth gap #918 flagged but could not land (protected.sandcastle/paths, #445).Why it matters. The #600 gate runs only in the drive's preflight. A commit that lands on
mainduring a drive (~20-30 min) leaves the servedget.idss.nzpin stale by report/heal time, so the leg red is a probable ghost of a fix already onmain— and a fresh drive would PARK at the #600 preflight rather than re-run those bits, so a leg-red filed here can never be disproven by a re-drive: the exact #918 deadlock, in the window preflight cannot see. The 2026-08-27/28 storm burned the embedded healer three attempts (two rebase conflicts, one diff-cap breach) re-fixing an already-on-mainred.The change
scripts/lib/bootstrap-staleness-lib.sh(editable):oc_bootstrap_served_release(thex-idss-releaseread, with anOC_BOOTSTRAP_SERVED_RELEASEoffline seam) +oc_bootstrap_report_guard(pure git overoc_bootstrap_staleness; emitsghost|proceed)..sandcastle/rehearsal-report.sh(protected — the session's ruling): before the per-leg file/heal loop, scoped to the selfhosted/idip targets that fetch the pinned agent, re-evaluate the gate run-dir-independently. On a stale pin → route to the ONE idempotent staleness ticket (#918'srehearsal_staleness_park) instead of a blocking leg-red, andexit 0before the healer's per-leg call — so the healer is never offered the ghost (one live check delivers both the reporter-suppress and the healer-refuse behaviours). The drive issue stays unblocked so the next tick re-parks at preflight until the reseed timer republishesget.idss.nz(mirrorsrehearsal-cycle.sh'spark-stalenessbranch).scripts/tests/bootstrap-staleness-test.sh(editable): 6 new offline checks (14 total, all green) — guard tokens (ghoston a stale pin,proceedon fresh/unusable/empty), the served-release override seam, and a grep-assert that the reporter wires the guard.Fail-OPEN by design. Fresh, unusable, or an unreachable bootstrap proceeds exactly as before — an unprovable staleness never suppresses a real red (the asymmetry #918 teaches: a dropped real red is worse than a re-filed ghost the next drive converges away).
Why this was a two-way door, not
ready-for-human. Entirely within the report/heal path; revertible by a single commit; provable offline againstbootstrap-staleness-lib.sh's existing test shape (bash scripts/tests/bootstrap-staleness-test.sh→ 14 checks; also picked up byscripts/seam-smoke.sh'sscripts/tests/*.shsweep). No one-way door (no credentials, no security widening, no member-facing trust, no data loss, no spend).Scope note. The substantive reporter and healer both live in
.sandcastle/rehearsal-report.sh(the reporter's main flow files leg-reds; its embeddedtry_healis the healer)..sandcastle/heal.shis the swarm healer for CI/swarm/triage/smoke-drive incidents — none of which fetch the agent binary fromget.idss.nz, so the served-pin ghost check does not map there; it was intentionally left untouched.Verified:
bash -non the reporter, the full offlinescripts/tests/*.shsweep green, rebased onorigin/mainand pushed (f618a6ce..d0a74a65).STATUS.mdupdated in the same commit. Closing.preset-invitered on every IDIP drive since the Members-tab redesign:CredentialPickCards.vuewraps the preset checkbox in a card<label>that intercepts the pointer, andfixtures/idip.ts:1066still.check()s the input #1810