rehearsal: an ended drive keeps its guest.qcow2 — retention keeps 3 whole runs per checkout and filled elitebook-03 to 95% (drop the VM disk at drive end, keep the evidence) #1615
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.
Dependencies
No dependencies set.
Reference
Matou/idss#1615
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
2026-09-18: elitebook-03's root disk reached 95% (13 GB free of 232 GB) while a local-guest drive was in flight. 77 GB of it was
test-results/across the two idss checkouts on that host, almost all of itstate/vm/guest.qcow2files from drives that had already ended:~/swarm/Matou/idss/test-results/private-path/20260918T193207Z/state/vm/guest.qcow2(the in-flight drive, brands)…/private-path/20260910T134056Z/state/vm/guest.qcow2…/private-path/20260918T183207Z/…and…/20260918T191007Z/…~/session-runner/idss/test-results/private-path/— three runs from 11–14 Septtest-results/standing-private/guest.qcow2(the standing snapshot — legitimate, listed for the total)The six ended-run disks were deleted by hand (checked unopened with
fuser; each run'sreport/,artifacts/and traces were kept — they are a few MB). That alone took the disk from 95% to 75%. Had the in-flight guest kept growing toward its 40 GiB virtual size, the drive — and the host's other services (garage, patroni, etcd, the runner) — would have hit ENOSPC.Cause
scripts/smoke-private-path.shretention (--keep, default 3, the block aboverehearsal-run-override) prunes whole run dirs and keeps the newest 3 whole, guest disk included. So:guest.qcow2is 6–23 GB and is dead weight the moment the guest is torn down — nothing reads it after the drive ends (the snapshot rail copies its own master intostanding-private/). Steady state is therefore 3 old disks + the live one: ~35 GB typical, 90+ GB if long drives (brands reached 23 GB) stack up — per checkout.~/session-runner/idsshad three disks (20 GB) sitting untouched since 14 Sept because no drive has started there since; nothing else ever reclaims them.Proposed fix
oc_teardown_guest(and after the snapshot rail has taken its copy, when it is going to), delete$run_dir/state/vm/guest.qcow2, green or red. Keep everything else in the run dir, so--keep 3goes back to meaning "three runs of evidence" at a few MB each. If a red disk is ever wanted for a post-mortem, make it an explicit opt-in (aREHEARSAL_KEEP_RED_GUEST=1in the spirit ofREHEARSAL_KEEP_RED_DROPLET), bounded to one.state/vm/guest.qcow2that no process holds open — this covers a drive that died before its own cleanup, and clears existing hosts on the first drive after the fix lands.Acceptance
guest.qcow2;report/andartifacts/are intact and the reporter/healer still read them.test-results/standing-private/) is untouched by any of this.--keep 0.Out of scope / notes
Matou/dev-factoryticket, not this one.Agent Brief
Category: bug
Summary: An ended local-guest drive keeps its multi-GB
guest.qcow2; retention keeps whole run dirs (VM disk included), so 3 dead disks + the live one per checkout can march a host to ENOSPC (elitebook-03 hit 95% mid-drive on 2026-09-18).Current behavior:
The private-path rehearsal drive script tears the guest down at drive end (via
oc_teardown_guest) but leaves that run'sstate/vm/guest.qcow2(6–23 GB) on disk. Its--keep Nretention (default 3) prunes whole run directories and keeps the newest N intact — VM disk and all — so steady state is 3 old guest disks plus the live one, per checkout (~35 GB typical, 90+ GB when long drives stack). Retention only runs when a drive runs in that checkout, so an idle checkout (e.g. a session-runner tree) keeps its dead disks indefinitely. Nothing checks free disk before a drive starts.Desired behavior:
guest.qcow2is removed — on both green and red drives — whilereport/,artifacts/, traces and the rest of the run dir stay intact and are still read by the reporter/healer. Provide an explicit, bounded opt-out for a red post-mortem disk, mirroring the existingREHEARSAL_KEEP_RED_DROPLEThatch (e.g.REHEARSAL_KEEP_RED_GUEST=1, one disk).guest.qcow2that no process holds open — covering a drive that died before its own cleanup, and clearing existing hosts on the first drive after the fix. Never remove an open disk; never touch a kept run's evidence.test-results/standing-private/) is never touched by any of this.Key interfaces / patterns:
oc_teardown_guest— the teardown seam the disk-drop hangs off, after the snapshot copy.--keep Nwhole-run-dir retention pruner (including the--keep 0"prune everything" arithmetic) — extend to sweep leftover guest disks in kept runs.REHEARSAL_KEEP_RED_DROPLET— the existing red-inspection opt-in to mirror for the guest-disk hatch (see its offline coverage inscripts/tests/live-box-pointer-test.sh).Acceptance criteria:
guest.qcow2;report/andartifacts/are intact and still consumed by the reporter/healer.REHEARSAL_KEEP_RED_GUEST=1(or equivalent) keeps exactly one red drive's guest disk for post-mortem; the default keeps none.--keep 0.scripts/tests/rehearsal-drive-log-test.sh) proves drop-at-end, the retention sweep, and--keep 0.docs/GOTCHAS.mdentry (Symptom → Cause → Rule, severity-marked) for "an ended drive's guest disk is not evidence", appended in the same commit (ADR 0160).Out of scope:
standing-private/.Ruled by agent under ADR 0174 — veto anytime. The one destructive-looking element (deleting an ended drive's
guest.qcow2) is a two-way door, not the "data destruction" one-way door: the disk is throwaway VM scratch that nothing reads after teardown, evidence is explicitly preserved, a red post-mortem disk is retained behind an opt-in, the whole change is revertible by a later commit, and it is proven by an offline test — so this isready-for-agent, notready-for-human. It touches onlyscripts/**, ascripts/tests/**test, anddocs/GOTCHAS.md(no.sandcastle/protected path, no host credentials, no live-infra step, no design surface), and its acceptance is offline-provable — so a swarm worker can take it. Verified against the codebase:oc_teardown_guestand the--keepretention block exist as described, theREHEARSAL_KEEP_RED_DROPLETpattern is present to mirror, and no guest-disk-drop logic exists yet (not redundant, not already implemented).swarm-claim host=bens-mac-04 run=26699
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1615 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope