rehearsal drive checkout is wedged on a stale SHA — #766's sync-gate fix cannot reach the gate it fixes, so invite-member re-fires an already-healed red #768
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
2 participants
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#768
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
Drive
20260825T024644Z(targetdroplet, 24 green / 1 red / 1 skip,firstRedLeg: invite-member) red on:Product authorization is correct. Nextcloud 32 returned a bare
403— the member was refused. This is the same false red#765diagnosed anda9bc6b5healed at 02:19, and that#766diagnosed again at 02:44. It re-fired because the drive did not run the code onorigin/main.Evidence
1. The failure text is the pre-heal wording.
artifacts/journey.droplet-*/error-context.mdquotes the throw atprovision.ts:874-879readingwith no redirect and no access-denied marker. Onorigin/mainthat string iswith no 403, no redirect and no access-denied marker—app/tests/e2e/fixtures/provision.ts:928. The evidence bundle carries the old assertion body verbatim (noreadMemberAdminDenialcall;origin/mainhas it atprovision.ts:871and:916).2. The drive checkout is three commits stale.
origin/mainis actually2a37ef82. Missing from the drive checkout:a9bc6b5d(#765, the 403 heal, 02:19) and56ea196a(#766, the sync-gate heal, 02:44).3. The gate that should have pulled is the one
#766fixed — a bootstrap deadlock. In the drive checkout:Bare
--porcelaincounts untracked files. Two strays are present and make it read dirty:.sandcastle/.env.bak-20260822T113103Z(Aug 22, harness stray)docs/adr/0194-host-baseline-is-a-property-of-the-host-shape-not-the-install-mode.md(Aug 23, untracked draft)So the
ifnever fires,git fetchnever runs, and the checkout can never learn thatorigin/mainmoved. Meanwhile the drive checkout's tracked tree is clean and its branch ismain:which is exactly the state
#766's gate treats as syncable (scripts/lib/rehearsal-sync-lib.sh:19-22; caller atscripts/rehearsal-cycle.sh:165). The fix is correct and it is on main; it simply cannot reach the checkout, because the only path that would deliver it is the code it replaces. Every future cycle re-runs line 157, re-reads the strays as dirt, and re-drivesc9d0c61c.4. No path collision blocks the pull. The untracked
0194-host-baseline-*.mdis a different filename from the tracked0194-founding-asks-the-identity-question-idip-opt-in.md(number collision only), so agit pull --ff-onlywould fast-forward cleanly today. The wedge is purely the gate, not a merge conflict.5. The post-drive reporter is not an escape hatch.
.sandcastle/rehearsal-report.sh:218,231,238,246rungit -C "$co" reset --hard "$pre_head"— a rollback to the drive's own pre-run HEAD, to discard healer edits. It never fetches and never targetsorigin/main, so it cannot advance a stale checkout either.Suspected layer
Harness / rehearsal cycle (
scripts/rehearsal-cycle.sh). Not the product, and not the e2e assertion — both are already correct onorigin/main. Verified on this machine at2a37ef82:pnpm --filter app exec vitest run tests/e2e/fixtures/provision.test.ts→ 13/13 passed (includes the sixreadMemberAdminDenialcases; a bare 403 at/settings/adminreadsdenied).scripts/tests/rehearsal-sync-test.sh→ OK: 6 checks passed (rehearsal sync gate #766).This is the second instance of the class recorded as
docs/GOTCHAS.md#82 — "A green heal is not a LANDED heal until the drive checkout provably carries it".#766wrote the entry; this ticket is the follow-through, because the entry's own plug is what got stranded.What plugging it needs
(a) One-time unwedge — a prerequisite, and it is NOT something a worktree-scoped worker can do. The drive checkout is outside any worktree; someone (operator or the cycle runner on
matou-workstation) must run, once:Optionally remove the two strays. Until this runs, landing any further code on
mainchanges nothing — the next drive still re-fires this red and burns another paid droplet.(b) Make the gate bootstrap-proof, so a stray can never again pin the checkout to a revision.
git fetchwrites only to.git; it can never yank in-flight work, so it must not sit behind the dirt gate. Inscripts/rehearsal-cycle.sh, hoistgit fetch originabove therehearsal_should_syncdecision and let onlygit pull --ff-onlyremain gated. Then the checkout always knows whereorigin/mainis, whatever the worktree looks like.(c) Refuse to drive a knowingly-stale checkout. After the gate, compare
git rev-parse HEADtogit rev-parse origin/main. If they differ, do not spend a droplet on a revision main has already moved past — fail the cycle loudly with both SHAs, or at minimum escalate the existingTHE DRIVE MAY BE STALEwarning (scripts/rehearsal-cycle.sh:176) into the verdict.#766already addedVerdictJson.commit/driveCommit()(app/tests/e2e/fixtures/legs.ts) so the bundle can carry the driven SHA — note thatartifacts/verdict.jsonin THIS run has nocommitfield, which is itself the tell that the driven code predates56ea196a. Extend the decision inscripts/lib/rehearsal-sync-lib.shwith the offline test alongside it inscripts/tests/rehearsal-sync-test.sh, per the establishedscripts/lib+scripts/testsconvention.No product change. No
STATUS.mdmovement (harness-reliability fix, per#765/#766/#755).drive
20260825T024644Zred 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/…/20260825T024644Z/on matou-workstation (legs.json, droplet-journal.txt, trace) — a representative screenshot is attached here if one was captured (#596)Code portion landed — one operator step remains (part (a))
The two bootstrap-proofing fixes this ticket asks a worker to land are on
origin/mainat commit159c4b1:git fetch originnow runs unconditionally, above therehearsal_should_syncgate inscripts/rehearsal-cycle.sh— a fetch only writes.git, never the worktree, so it can never yank in-flight work and must not sit behind the dirt gate. Onlygit pull --ff-onlystays gated (still non-fatal on an untracked-path collision).rehearsal_refuse_staleinscripts/lib/rehearsal-sync-lib.sh: after the gate, when a sync was intended (tracked-clean main) butHEADstill differs fromorigin/main, the cycle exits FATAL with both SHAs rather than burning a droplet on a revision main has moved past. A dirty / non-main tree (intended==0) is intentional in-flight work and is exempt.Tests:
scripts/tests/rehearsal-sync-test.shextended 6 → 12 checks (fixed check 6 for the hoisted fetch; added 7–12 covering the un-gated fetch call site and the fourrehearsal_refuse_stalecases) — passes.bash -nclean on all three scripts.GOTCHAS #82gains a follow-through note.Why human — part (a), the one-time unwedge, is NOT worktree-scoped
Part (a) of the ticket is explicit: the drive checkout
/home/dev/swarm/Matou/idssis outside any worktree and unreachable from a Sandcastle worker's sandbox (verified:ls -d /home/dev/swarm/Matou/idss→ No such file or directory on this host). It needs the operator's hands on real hardware (the cycle runner onmatou-workstation) — theready-for-humanbar. Until it runs, the live checkout still executes stalec9d0c61code (which lacks even #766's and this fix), so the next drive re-fires the healed red and burns another paid droplet. This landed code cannot yet run itself — that is exactly the deadlock (b) breaks going forward.Run once, on the drive host:
After that pull, every future cycle is bootstrap-proof (the fetch is un-gated) and a stale checkout refuses loudly instead of driving. This issue can then be closed — the code half is already done and verified; only the operator action is outstanding.
Leaving open with
ready-for-human(per GOTCHAS #82's own rule: a green heal is not a LANDED heal until the drive checkout provably carries it — closing this while the live checkout provably does not yet carry it would repeat the exact anti-pattern this ticket exists to end).Operator step (a) complete — closing
Ruled by agent under ADR 0174 acting as the watch's hands (Ben's monitoring delegation tonight) — veto anytime.
Part (a) was done at ~03:55Z, minutes before this comment landed: the two wedging untracked files (
.sandcastle/.env.bak-20260822T113103Z, the straydocs/adr/0194-host-baseline-…mddraft whose number a landed ADR has since taken) were QUARANTINED — not deleted — to~/idss-untracked-quarantine/on matou-workstation, and the checkout fast-forwarded clean. Verified just now:git statusempty, HEAD =159c4b1b(this ticket's own (b)+(c) fix, so the refuse-stale gate is live for the next wedge too).#722 unblocks on this close; its re-drive rides current code with #765's status-aware assertion.