rehearsal: an untracked file wedges the cycle's sync gate — the drive rides a STALE checkout and re-fires already-healed reds (drive 20260825T022044Z) #766
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.
Blocks
Reference
Matou/idss#766
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?
Failure
The droplet drive
20260825T022044Zwent red on leginvite-memberwith:There is no product defect and no live harness defect. That assertion was already fixed on
origin/mainbefore the drive started. The drive ran ~51-minute-stale code.Evidence
The red is the PRE-heal assertion.
test-results/drive-droplet/20260825T022044Z/report/data/ac26d1e03d…mdquotes the throwing source atprovision.ts:875with the old wording"with no redirect and no access-denied marker"and the old two-signal check (redirectedAway/deniedCountonly, status interpolated but never gated).HEAD's
app/tests/e2e/fixtures/provision.ts:871-905isreadMemberAdminDenial— 403 is a first-class denial — and its failure text reads"with no 403, no redirect and no access-denied marker". The strings do not match, so the drive did not run HEAD.The heal predates the drive.
a9bc6b5d("sandcastle: #765 — assertMemberIsNotAdmin gates on 403") authored2026-08-25 02:19:12. The drive'sartifacts/verdict.jsonhasstartedAt: 2026-08-25T02:21:50Z.The drive checkout never synced.
git -C /home/dev/swarm/Matou/idss reflog— lastreset --hard origin/mainat2026-08-25 01:29:28, landing onc9d0c61c. No entry after it.c9d0c61cisa9bc6b5d's parent.The sync gate is the cause.
scripts/rehearsal-cycle.sh:157:git status --porcelain(no-uno) counts untracked files as dirt. The drive checkout carries two untracked strays:.sandcastle/.env.bak-20260822T113103Z(mtime Aug 22 — written by the harness's own token-sync path, not a human's work-in-flight)docs/adr/0194-host-baseline-is-a-property-of-the-host-shape-not-the-install-mode.mdSo the gate takes the else branch every tick.
/home/dev/swarm/rehearsal-executor.logshows the flip: the last twelve==> rehearsal cycle: syncing mainlines are followed by nine consecutive==> rehearsal cycle: tree dirty or not on main — driving as-is (no sync).Only the reporter rescues the checkout.
.sandcastle/rehearsal-report.sh:165(git -C "$co" reset -q --hard origin/main) is the ONLY thing still advancing that checkout — every reflog entry above is its. It runs post-drive, so any commit landing between one report and the next drive is invisible to the drive. That is exactly the 01:29→02:21 windowa9bc6b5dfell into.Nothing in the run records what SHA was driven.
artifacts/verdict.json,artifacts/host.jsonandlogs/claude-env.txtcarry no commit SHA — grepped, zero hits. This is why a stale-code red is indistinguishable from a live red without reflog forensics, and why the healer loop can burn a paid droplet re-firing a defect that main already fixed.The rest of the drive was healthy: 24 green, 1 skip (
backup-honest-floor, planned), 1 red.Suspected layer
Harness orchestration — the rehearsal cycle's pre-drive checkout sync. Not the product, not the e2e assertion (already healed at
a9bc6b5d).What plugging it needs
Primary —
scripts/rehearsal-cycle.sh:157-162. The gate's stated intent (line 153-156) is "a dirty tree or a non-main branch means someone else's work is in flight — drive the tree as it stands rather than yanking it". Untracked files are not in-flight work that a sync can yank:git pull --ff-onlynever touches them. Gate on tracked dirt only:This opens ONE new failure mode that must be handled in the same change:
git pull --ff-onlyaborts ("untracked working tree files would be overwritten") when an incoming commit claims a path that exists untracked in the worktree — and underset -euo pipefail(line 27) that kills the cycle before it drives at all. So the pull must be non-fatal, falling through to the as-is path with a loud note rather than exiting:This is a live hazard, not hypothetical:
docs/adr/0194-host-baseline-…mdsits untracked at a path a future ADR commit could claim.Factor the gate decision into a pure function in
scripts/lib/(arehearsal_should_sync <tracked-porcelain> <branch>shape) with an offline test inscripts/tests/— that is the established convention for this layer (scripts/lib/rehearsal-queue-lib.sh+scripts/tests/rehearsal-queue-test.sh), and it makes the gate regressible without a droplet.Secondary — record the driven SHA. Write
git rev-parse HEAD(and whether the sync succeeded) intoartifacts/verdict.jsonat drive start, so a red carries the code it actually ran. Point 6 above shows the current evidence bundle cannot answer "was this a live defect or stale code?" at all — which is what makes this failure mode expensive rather than merely annoying.Operational, outside this repo (do NOT do it from a swarm worker): the two stray files in
/home/dev/swarm/Matou/idssare what tripped the gate..sandcastle/.env.bak-20260822T113103Zlooks like harness litter and should be swept or gitignored at its source; the untracked ADR is someone's draft and is not the swarm's to delete. Note that with the primary fix in place neither file wedges the sync any more, so this is hygiene, not the plug.Note for whoever re-drives:
invite-memberneeds no product change. Once the drive checkout reachesa9bc6b5dor later, that leg should green — HEAD'spnpm --filter app exec vitest run tests/e2e/fixtures/provision.test.tspasses 13/13 on this machine.Related:
a9bc6b5d's own commit message flags a neighbouring hazard in the same family — a healer reportingaction=healedwith a SHA no ref carries silently reconverts a diagnosed red into a repeating one — as a candidatedocs/GOTCHAS.mdentry. This ticket is the second instance of the same class (a heal that exists but does not reach the drive), and both deserve one GOTCHAS entry: a green heal is not a landed heal until the drive checkout provably carries it.drive
20260825T022044Zred atinvite-member:member landed cleanly on /settings/admin (HTTP 403, url "https://files.rehearsal-b.idss.nz/settings/admin") with no redirect and no access-denied marker — a plain member must never reach the admin sevidence:
test-results/…/20260825T022044Z/on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)swarm-claim host=elitebook-distributed-server-03 run=9984
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #766 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope