rehearsal-cycle: wire the harness drive-holder/drive-log primitives and pre-mint the run dir so the fleet monitor can see a drive (slots, legs, verdict, history) #1058
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#1058
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?
Symptom
The fleet monitor (dev-factory
fleet-tui/, spec 2026-08-28 slot-aware fleet) cannot see a rehearsal drive: 2026-08-31 04:31Z thedropletdrive (#1051 regression run) was at leg 4 with boxclan-lab-rehearsal-72b0ecd4up, and the monitor showedlock held, no holder recordon both slots andno drive in flight. Same on thedevicehost. The Drive tab's history is empty by construction: no host has ever written adrive-log.jsonl.Cause
scripts/rehearsal-cycle.shacquires capacity withhost_capacity_acquire_exclusive/host_capacity_acquire_heavyand writes our owndrive-statusrecord, but never calls the harness's durable drive primitiveshost_capacity_drive_log_start/host_capacity_drive_log_end(.sandcastle/host-capacity-lib.sh, dev-factory #93 — the harness half landed; this one-liner consumer half never got a ticket). Those two calls are the ONLY writers of (a) thekind=driveslot-holder sidecars the monitor's slot rows read and (b)~/swarm/state/drive-log.jsonl, the append-only history the Drive tab's HISTORY table reads.Second gap: the holder can carry the run dir (
HOST_CAPACITY_DRIVE_RUN_DIR) so the monitor can tailartifacts/legs.jsonand readartifacts/verdict.jsonlive — but the stamp is minted insidescripts/smoke-private-path.sh(stamp="$(date -u +%Y%m%dT%H%M%SZ)"; run_dir=…/$stamp, ≈L557) after the cycle has already won capacity, so the cycle cannot name the run dir when the holder is written.Fix
In
scripts/rehearsal-cycle.sh, right after capacity is won anddrive_status_startruns (≈L157-175):date -u +%Y%m%dT%H%M%SZformat and setcycle_startto the SAME value (todaycycle_startis computed at ≈L381 immediately before the drive; #918's staleness comparestamp < cycle_startstays valid when they are equal). Computerun_dir="$root/test-results/drive-$target/$stamp"andexport HOST_CAPACITY_DRIVE_RUN_DIR="$run_dir". Keep the post-drivefind … | tail -1as the fallback only if the override was not honoured.scripts/smoke-private-path.shhonours an override:stamp="${REHEARSAL_RUN_STAMP:-$(date -u +%Y%m%dT%H%M%SZ)}"(or a fullREHEARSAL_RUN_DIR), so the cycle's pre-minted dir is the one the driver writeslegs.json/verdict.jsoninto.export HOST_CAPACITY_DRIVE_REPO="$REPO_SLUG"(the knob dev-factory #118 adds) and callhost_capacity_drive_log_start "$stamp" "${REHEARSAL_HOST:-$(hostname -s)}" "$target"—id= the run stamp so the monitor's row, the run dir and the reporter's evidence share one identifier. UnderDRIVE_EXCLUSIVE=slotthe harness (post-#118) labels whichever slotacquire_heavyactually won.host_capacity_drive_log_end "$stamp" "$verdict"after the verdict is known (green/red/park), andhost_capacity_drive_log_end "$stamp" endedin the EXIT trap as the crash/abandonment fallback (idempotent: the trap must skip when the explicit end already ran).drive_status_set_droplet's box name to nothing new — the monitor reads the box from thedrive-statusfile via the host registry'sdrive-status Matou/idss /tmp/matou-Matou-idss-rehearsal-drive-status.jsonline (added on both hosts 2026-08-31). Keepdrive-status-lib.shunchanged.Tests (same commit)
Offline test beside
scripts/tests/rehearsal-drive-exclusive-test.sh: with a shimmedhost_capacity_*/nixand a fake smoke script, assert (a)HOST_CAPACITY_DRIVE_RUN_DIRnames the dir the smoke shim actually writes into; (b)drive_log_startis called once with id = stamp after capacity,drive_log_endexactly once with the verdict (trap path does not double-write); (c)cycle_start == stampsorehearsal_report_decisiondoes not park a fresh run as stale.smoke-private-path.shoverride test: env set → run dir equals it; unset → today's behaviour.Depends on
dev-factory #118 (holder placement +
HOST_CAPACITY_DRIVE_REPO) landing and this repo's.sandcastle/FACTORY_REFbumped past it. Steps 1, 2 and thedrive_log_endwiring do not depend on it; step 3's repo knob does — if the pin has not moved yet, wire everything else and leave the repo export as a TODO referencing #118 rather than passing the repo slug in thetargetposition.swarm-claim host=matou-dev-server-01 run=15067
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1058 — status
success⛔ close-report gates REFUSED this close — the following claims did not verify:
envelope
close-report for #1058 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope