Executor debug↔prove-it loop — alternate debug-tail attempts with prove-it drives (ADR 0221) #1090
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.
Depends on
Reference
Matou/idss#1090
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
ADR 0221 (debug↔prove-it drive regime), grilled 2026-08-31. Depends on the IDIP debug-tail variant ticket (native dependency set).
Task
The workstation drive executor gains a debug mode implementing the alternation Ben ruled:
WORLD-DRIFTpark from the debug preflight routes to enqueue-prove-it, not to the healer.Acceptance
Close report — executor debug↔prove-it loop + adoption (ADR 0221)
Ruled by agent under ADR 0174 — veto anytime. This ticket is a two-way door: every change is revertible (new shell libs + a default-OFF executor branch + a TS helper + offline tests) and provable (offline test suites). The one live-infra touch — the adoption step's droplet reaper-exempt tag + previous-droplet broker-release — walks the same established rollback pattern
retire-standing.sh/rental-reap.shalready own (ADR 0174 rule 1 explicitly permits live-infra ops with an established rollback pattern), and it only ever runs behind the opt-inREHEARSAL_DEBUG_LOOP=1, never on the default path.What landed (commit
d7bd6a1c)scripts/lib/rehearsal-debug-loop-lib.sh— the pure alternation the executor now owns:rehearsal_debug_route— prove-it red at a debug-eligible tail leg → debug mode; prove-it red at a founding/provision leg → full-drive behaviour, unchanged; debug red → stay debug (heal against segregated evidence only, never the drive issue's green/close path); debug all-green → enqueue exactly one prove-it; anyWORLD-DRIFT→ enqueue a prove-it, never the healer.*/2cron (defaults prove-it, so an armed-but-fresh loop first proves from S1 and adopts — no hand-founded world needed), the run ledger that shows the alternation, theWORLD-DRIFT-wins verdict classifier, and themode:"debug"belt.rehearsal_debug_adopt_standing_world— tag the new droplet reaper-exempt (idss-rental-hold) first, rewrite the standing-world pointer where the debug preflight reads it, then offboard the previous standing droplet (order never leaves zero protected boxes).scripts/rehearsal-debug-loop.sh— the per-tick driver; wired intorehearsal-executor.shbehindREHEARSAL_DEBUG_LOOP=1(default OFF → the live default path is byte-identical). Defers the prove-it path torehearsal-cycle.sh, so a prove-it reports/closes exactly as today; only the debug attempts + adoption are new.app/tests/e2e/fixtures/idipDebug.ts—writeStandingWorldPointer(the pointer auto-persist #1089 drove against a hand-written file for).journey.idip.spec.tsnow emits the pointer from a fully-green journey's own run state (slug/IP/portal + the founder's twelve words off S6a, + deployedTreeKey/Sha).rehearsal-cycle.shgreen-close now refuses amode:"debug"verdict (ruling 1 — one missed flag-check must not leak a debug green into the record).Acceptance ↔ proof (offline)
rehearsal-debug-loop-test.sh§7 (ledger sequenceprove-it:red → debug:red → debug:red → debug:green → prove-it:green);rehearsal-debug-loop-driver-test.sh§4–5rehearsal-debug-loop-test.sh§8–11; driver §6mode:"debug"belt (§6), cycle green-close guardrehearsal-debug-loop-test.sh§2–3; driver §1–2Offline suites green:
rehearsal-debug-loop-test.sh11/11,rehearsal-debug-loop-driver-test.sh7/7,idipDebug.test.ts32 (+7), touched-file vitest 78, the eight cycle/executor-parsing offline tests, eslint + vue-tsc +bash -nclean, harness-drift OK (no.sandcastle/protected path touched).Next e2e sitting (the eyeball, not code owed here)
The live seeded-tail-bug alternation drive on a real standing droplet — debug attempts between fixes, exactly one prove-it after the tail greens, the ledger's alternation, and a real rotation (pointer/tag/offboard) — is the next-e2e-sitting proof, exactly as
journey.idip.debug.spec.tsis the next-sitting proof for #1089's debug half. Arming is one operator act:REHEARSAL_DEBUG_LOOP=1in the host env.#1091(generalDRIVE_RESUME_FROM, needs-design) is the ADR 0221 arc's remaining ticket.REOPENED — the first live arm deadlocked the drive lane
Armed on matou-workstation (
REHEARSAL_DEBUG_LOOP=1, targetidip, drive #1087)2026-09-01 ~03:56 UTC. This is the live proof this ticket deferred. It failed.
The prove-it half worked exactly as specified. First armed tick:
Drive
20260901T035205Zran from S1, reported/blocked on #1087 normally, and thehealer self-fixed
create-credential(a0f8350f) at 04:18. Ruling 1 held — theloop deferred to
rehearsal-cycle.sh, the record is undamaged, no debug greenreached the reporter.
The debug half deadlocked on its first attempt and never recovered — 13
consecutive
*/2ticks, 04:20→04:47:Mode pinned to
debug, so no prove-it could ever fire again — the IDIP lanewas dead, including the re-drive that would have retested the healer's 04:18 fix.
Ledger (all 13 identical):
Root cause — two defects that compound
A.
scripts/debug-idip-tail.sh:56omits theWORLD-DRIFTtoken. Themissing-pointer
die()reads "no standing-world pointer at …".rehearsal_debug_verdictclassifies drift by grepping the drive log for theliteral
WORLD-DRIFT, and its own comment asserts the token is stamped "intoevery drift message (the driver's die() and the spec's
WorldDriftError)" —this call is the exception. The classifier falls through to
red, so ruling 3("drift is a named park, never a red") fails at precisely the bootstrap case.
B.
enter-debugnever checks that a standing world exists. The pointer iswritten only by a green prove-it (adoption, ruling 2), but
rehearsal_debug_routeflips todebugon any prove-it red at a tail leg —so a fresh loop whose first prove-it reds enters debug with no world to drive
against. That is the common case, and the exact case the regime exists to serve.
Fixing A alone is not enough: it turns the hard deadlock into a 2-tick ping-pong
(debug → world-drift → prove-it → red at the same leg → debug → …) that burns a
full ~45–65 min prove-it every other tick. B is the real fix —
enter-debugmust require a readable pointer, else
report-full(stay prove-it, full-drivebehaviour unchanged). The debug tail is reachable only after a green prove-it
has founded and adopted a world.
Why the offline proof missed it
rehearsal_debug_routeis pure and was pinned against synthetic(mode, verdict, leg)triples that do not model pointer existence;rehearsal-debug-loop-driver-test.shstubsREHEARSAL_DEBUG_DRIVER_CMD, so thereal
debug-idip-tail.shdie-path never executed. Both halves proven, the joinunproven — which is what this ticket's own "the live seeded-bug drive is the
next-e2e-sitting proof" caveat was pointing at.
Acceptance to re-close
die()carriesWORLD-DRIFT(and a pin asserts the tokenon every drift exit path in the driver, not just the spec's).
enter-debugis guarded on a readable standing-world pointer; without one aprove-it tail red routes
report-fulland the mode staysprove-it.prove-it reds at a tail leg → the next tick fires a prove-it, never a debug
attempt. This is the case that deadlocked.
State
Disarmed (
REHEARSAL_DEBUG_LOOP=0on matou-workstation, mode file reset toprove-it); the plain cycle is restored and driving. Cost was ~30 min of deadticks — no droplets, no healer spend (it needs a run dir and there was none).
elitebook-03 (phase-5
devicelane) was never armed and is unaffected.Triage ruling —
enhancement+ready-for-sessionRuled by agent under ADR 0174 — veto anytime.
The reopen posted four re-close criteria. Checking them against the tree at
a7f39afb("debug loop: the bootstrap deadlock — a world you cannot enter is not a red (#1090)"), which landed after the reopen:die()carriesWORLD-DRIFT; every drift exit path pinnedscripts/debug-idip-tail.shnow has adrift()helper besidedie(); absent/garbled/hollow pointers all nameWORLD-DRIFT. Pinned by the NEWscripts/tests/debug-idip-tail-test.sh— 6/6 greenenter-debugguarded on a readable standing-world pointer; no world →report-full, mode staysprove-itrehearsal_debug_routetakes a 4thhas_worldarg defaulting tono;rehearsal_debug_has_standing_worldmirrors the driver's accept conditions. Plus the generalisedno-evidenceverdict denies every other silent early-exit the same deadlockrehearsal-debug-loop-test.sh13/13 (was 11),rehearsal-debug-loop-driver-test.sh12/12The three code defects are fixed and provable offline (re-ran here:
debug-idip-tail-test6/6,rehearsal-debug-loop-test13/13,rehearsal-debug-loop-driver-test12/12 — all green). What remains is only criterion 4: the live arm —REHEARSAL_DEBUG_LOOP=1on the host, a real standing droplet, and one observed debug→prove-it alternation in the run ledger.Why
ready-for-session, notready-for-agentCriterion 4 needs an interactive session's standing — arming the host env and driving a live prove-it against a real droplet. A swarm worker reads only
ready-for-agentand cannot arm a host; handed this, it would land nothing (the code is already in) and walk toagent-blockedon the live step. That is the exact conflationready-for-sessionexists to prevent. Added<!-- session-host: matou-workstation -->per #746 — the previous arm and the IDIP standing world (drive #1087) live there;elitebook-03is the phase-5devicelane and was never armed.Why this is a two-way door
The remaining live arm is revertible (disarm with
REHEARSAL_DEBUG_LOOP=0, mode file reset toprove-it— the exact disarm the reopen already performed) and provable (the run ledger's alternation sequence). It carries no one-way-door residue: no personal credentials, no security-posture widening, no member-facing trust accept, no data destruction, and no non-routine spend (the reopen recorded the deadlock cost "no droplets, no healer spend"; the live arm reuses the existing standing droplet and the routine prove-it drive). Live-infra ops with an established rollback pattern are explicitly a session's to run under ADR 0174 rule 1.Veto by dropping
ready-for-sessionback toready-for-humanif you want to run the live arm yourself.Both defects FIXED —
a7f39afbon mainAcceptance criteria 1–3 are met; 4 (the live arm) is still owed, and it is the
only thing standing between this ticket and closing.
1 — the WORLD-DRIFT token (
scripts/debug-idip-tail.sh)drift()now sits besidedie(). Every exit taken because the standing world ismissing or unusable — absent pointer, unparseable JSON, a pointer naming no
slug/dropletIp — emits
WORLD-DRIFTand its remedy. Faults that are not aboutthe world (a missing
jq) staydie(), so a real red still reaches the healer.The garbled-pointer case was a second latent hole:
jq -runderset -euo pipefailkilled the script before any message, so it could never have nameddrift either. The pointer is now validated with
jq -e .first.2 — the
enter-debugguard (rehearsal-debug-loop-lib.sh)New
rehearsal_debug_has_standing_worldmirrors the driver's own acceptconditions exactly (present, parseable, naming slug+dropletIp) — the gap
between what the router routed into and what the driver would drive was the
deadlock.
rehearsal_debug_routetakes a 4thhas_worldargument defaultingto
no: absent positive evidence of a world, never enter debug.3 — the stall breaker (the general form, beyond the filed defects)
Fixing only the token would have left every other silent early exit able to pin
mode=debugone step later. The rule is now: only averdict.jsoncan call adebug attempt red. An attempt leaving no evidence — no run dir (died before
mkdir: no pointer, no jq, no nix) or a run dir whose verdict.json was never
written (died after mkdir, before the first leg: a failed build, a failed
redeploy) — ran zero legs, classifies
no-evidence, and enqueues a prove-it.The pins that did not exist before
scripts/tests/debug-idip-tail-test.shrehearsal-debug-loop-test.shrehearsal-debug-loop-driver-test.shFull offline shell suite 43/43 from a pristine
git archiveexport of main.The bootstrap pin is the one that matters: armed loop, no pointer, first prove-it
reds at a tail leg → the next tick fires a prove-it, never the debug driver.
Both stall shapes are pinned too.
debug-idip-tail.shhaving had no test file at all is how defect 1 shipped —the TS half was correct throughout (every
idipDebug.tsdrift path alreadystamped the token); the gap was the shell wrapper that dies before the spec
loads. The offline pins covered both halves and never crossed the join.
Still owed — acceptance 4
The loop is disarmed on every host (
REHEARSAL_DEBUG_LOOP=0; workstation modefile reset to
prove-it). Re-arming is a human act. Nothing here has run againsta real droplet:
enter-debug's downstream — the debug tail itself, the hash-keyedredeploy, adoption, rotation — has still never executed once. The regime is
correct-by-pins, unproven-in-life.
Suggested re-arm shape, since the first attempt showed the failure mode is quiet:
arm the workstation IDIP lane, then watch
test-results/idip-debug/loop-ledger.jsonlfor a first line whose action is not
debug-red. A ledger of identicaldebug-redlines is the deadlock signature.Note on how this landed
The RED-phase test files were swept into
ea1b6e7d(a drive-report commit) by aconcurrent session sharing the checkout, so main briefly carried the tests without
the implementation — two failing suites.
a7f39afbcloses that; verified greenfrom a clean export. No CI gate runs
scripts/tests/*.sh, so no drive was blocked.The loop ran live — alternation PROVEN, debug attempts were FALSE GREENS. Fixed in
a47348ab.Re-armed on matou-workstation. It drove a complete alternation unattended:
What genuinely worked. The prove-it half is real — three drives, 36–37 legs,
13–19 min each. #1087 was closed by the 220410Z green, legitimately. Adoption
and rotation both executed. Ruling 1 held: no debug verdict ever reached the
record. The bootstrap deadlock did not recur — the guard from
a7f39afbheld.What was a lie. All three debug attempts:
{"verdict":"green","legs":{"total":0}}in about a second. The tail never ran a leg. Three layers failed together:
page.gotothrewnet::ERR_SSL_PROTOCOL_ERRORagainstrehearsal-b.idss.nz(I confirmed byhand:
tlsv1 alert internal error, no TLS at all).escaped
assertWorldHealthy— theWORLD-DRIFTpark never fired for the onecondition it exists to catch. The two inner probes had catches; "can we reach
the world at all" did not.
computeVerdictthen scored it green:legs.red > 0is vacuously falsewhen nothing ran.
Fixed (
a47348ab)legs.ts) —computeVerdictnever greens a run thatrecorded no leg, on either path, stamping
firstRedLeg: NO_LEGS_RAN. That tokenis deliberately not a real leg name, so a zero-leg red is never debug-eligible
and keeps full-drive behaviour rather than routing into a tail that would die
identically.
idipDebug.ts+ the spec) —WorldHealthReportgainsportalas its FIRST check and the spec RECORDS the navigation failure insteadof throwing past the gate. An unreachable world now parks as
WORLD-DRIFT: portal unreachable, zero legs, remedy named.legs.total == 0classifiesno-evidence, so the loop cannot act on a green no leg earned even if a verdictlies to it.
Pins:
legs.test.ts+3,idipDebug.test.ts+2 (35), driver 12→14 — includinga real 11-leg green still greens, so the floor cannot disable the regime it
protects. Shell 45/45, app vitest 1313/1313 (112 files), vue-tsc clean.
STILL OPEN — this one needs your ruling, not a patch
Every prove-it re-founds the SAME slug on a new droplet. Both greens founded
rehearsal-b, on different boxes, with different founder phrases:rehearsal-brehearsal-bSo the red prove-it at 21:30 destroyed and rebuilt the world the 20:32
adoption had recorded — and adoption only runs on green, so nothing invalidated
the stale pointer. The debug window is poisoned by the very drive that opens
it. ADR 0221 ruling 2 ("the standing world is founded once by a green prove-it;
every subsequent green adopts") cannot stand as written, because the drive that
sends the loop into debug mode is precisely the one that clobbers the world.
With
a47348abin, this now degrades honestly — a clobbered world parks asWORLD-DRIFTand enqueues a prove-it instead of faking a green. But the regimestill delivers zero speedup, because debug mode can never find a live world.
Two candidate rulings:
rehearsal-<stamp>;adoption promotes the green one to standing and offboards the previous. The
standing world survives a red drive. Costs a slug/cert per drive (watch the
Let's Encrypt 5-per-168h wall that bit
rehearsal-c, GOTCHAS #114).passed — that world is not only usable, it is the world where the bug
reproduces, which is the ideal thing to debug against. This inverts ruling 2:
adopt on any prove-it that reaches the tail, green or red.
I lean (b) — it needs no new slugs or certs, it makes the debug tail land on
the exact world that produced the red, and it removes the coupling between
"adoption" and "green" that caused this. But it rewrites ruling 2, so it is
yours to call.
The loop is DISARMED on every host pending that ruling.
Ruled (b) — ADR 0221 ruling 2 amended and implemented.
f52c409c.Any prove-it that REACHES THE TAIL adopts its world as the new standing world,
green or red. Reaching the tail is itself proof the world is usable (founding
and provisioning passed); on a red it is additionally the world where the bug
reproduces, which is the ideal thing to debug against.
Chosen over the rotating per-drive slug, which would have spent one of Let's
Encrypt's five-per-168h on every drive — the wall that already bit
rehearsal-c(GOTCHAS #114).
Landed
reason it could not stand: adoption was coupled to greenness while every
prove-it re-founds the SAME slug on a NEW droplet, so the red drive that sends
the loop into debug had already destroyed the world the last green adopted.
rehearsal_debug_routereturnsadopt-and-enter-debugon a tail red. Thehas_worldprecondition is gone — under (b) the red drive brings its ownworld, so requiring a pre-existing one was exactly backwards.
adoption and persists
debugonly when it succeeds; otherwise it recordsadopt-failedand stays on the full prove-it path. A debug attempt with noworld to re-enter is the 2026-09-01 deadlock, and that remains impossible.
Ledger and mode now persist after the case, so they record the FINAL action
rather than the routed one.
journey: operator-session). This is the subtle half: under (b) a tail REDadopts, and a red leg throws — so a harvest sited at the end of the journey
is unreachable exactly when it matters. Pinned by a scan test asserting the
harvest precedes the first tail leg and appears exactly once.
Checks
Offline shell 45/45; app vitest 1315/1315 across 112 files; vue-tsc clean.
One note on the vitest number: the truncated text summary rendered mid-run as
111 passed (112)/1313 passed (1315), which reads like skips. It is not —the JSON reporter confirms 1315 total, 1315 passed, 0 pending, 0 failed.
What is now unproven, and what would prove it
Every defect found so far was found by running this thing, not by reading it.
Three remain untested in life, and all three sit downstream of the point the
false greens hid:
green.
attempt so far died in the preflight.
The re-arm that would prove them needs a prove-it that reds at a tail leg. The
IDIP lane is currently drained (#1087 closed), so it needs a queued drive ticket
to have something to drive.
The loop stays DISARMED on every host until you want that run.
Triage ruling — resolve conflicting state roles →
enhancement+ready-for-sessionRuled by agent under ADR 0174 — veto anytime.
This ticket carries two state roles —
ready-for-humanandready-for-session— which the triage machine forbids (exactly one state role per issue). Headless CI can't ask, so ruling the conflict:The ruling — drop
ready-for-human, keepready-for-sessionThe timeline shows
ready-for-humanwas added by Ben at 2026-09-02T00:35:15Z, in the same minute as the "STILL OPEN — this one needs your ruling, not a patch" comment: the poisoned-world (a) rotating slug vs (b) adopt-the-red-world call, a genuine one-way door because it rewrites ADR 0221 ruling 2. Fifteen minutes later, at 2026-09-02T00:50:51Z, Ben made that ruling — ruled (b), amended ADR 0221, shippedf52c409c— but the now-satisfiedready-for-humanlabel was never removed. The one-way-door residue it marked is closed.What remains owed is acceptance criterion 4 and its newly-surfaced downstream (adoption of a red world, the debug tail's first real leg, the hash-keyed redeploy) — all of which need a live re-arm (
REHEARSAL_DEBUG_LOOP=1onmatou-workstation, a real prove-it that reds at a tail leg). That is an interactive session's standing, not Ben's hands or eyes: the body already carries<!-- session-host: matou-workstation -->(#746) placed for exactly this queue.Why this is a two-way door
The label change is revertible (re-add
ready-for-humanin one click) and provable (the timeline above + Ben's own 00:50 comment show the human-ruling residue is resolved; the remaining work is the live arm, which Ben's 20:42/00:50 comments describe as a re-arm against the existing standing droplet). No one-way-door residue remains: no personal credentials, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend (the arm is disarm-able withREHEARSAL_DEBUG_LOOP=0, reuses the standing droplet, and runs the routine prove-it drive). Live-infra ops with an established rollback pattern are a session's to run under ADR 0174 rule 1.Note for whoever picks it up
The live arm needs a queued IDIP drive that reds at a tail leg to have something to drive (the IDIP lane was drained when #1087 closed). Arranging that queued drive is part of the session's setup, not a separate human gate.
Veto by re-adding
ready-for-humanif you want to run the live arm yourself.Closed as moot — Ben's ruling, 2026-09-18
What landed stays landed. The debug↔prove-it loop (ADR 0221) is on
mainas a default-OFF executor branch (REHEARSAL_DEBUG_LOOP,scripts/rehearsal-debug-loop.sh,scripts/lib/rehearsal-debug-loop-lib.sh,scripts/debug-idip-tail.sh), with the bootstrap-deadlock fix (a7f39afb), the false-green fix (a47348ab) and the amended ruling 2 (f52c409c). Acceptance 1–3 were met on 2026-09-01.What is dropped: the live arm (criterion 4). It can no longer be run as written. The debug tail knows only the IDIP journey, and that lane drained when #1087 closed; the open standing drives (#1547
rented-services, #1400device, #1277local-brands) and the workstation's queue head are all other targets, so there is no prove-it that could red at a debug-eligible tail leg. The loop has not run since 2026-09-02 and stays DISARMED on every host (REHEARSAL_DEBUG_LOOP=0).Three things therefore remain unproven in life, recorded here so nobody arms the loop assuming otherwise: adoption of a RED world, the debug tail driving a real leg, and the hash-keyed redeploy. If tail-only debugging is wanted again, file a fresh ticket against the drive target of the day (the tail would need generalising beyond IDIP) rather than reopening this one.
Why it sat unclaimed: its
session-host: matou-workstationmarker matched no host — the runner on that box answers to its hostnamematou-dev-server-01— so every session-runner on all three hosts logged a skip each tick. Closing ends that noise too.