device target harvests no droplet-journal.txt — a stand-up red on a rented gateway is diagnosable only by luck #894
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#894
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
device-target drive harvests nologs/droplet-journal.txt, even though the target writesartifacts/droplet-ip.txtand leaves the droplet standing. When a rented gateway reds inside stand-up (e.g. #893,enroll-activatecloud-init crash), the one machine that could say which unit failed and why — the droplet — is never asked. Instead the run dir carries the VM-target harvest, every file of which reports there was no VM (guest-journal.log=-- No entries --,qemu.logempty,host.jsonqemu: ENOENT). This whole class of red is then diagnosable only by luck (the box happening to outlive the drive).Proposed fix
The rented target already gathers droplet evidence before cleanup; the device teardown skips that step. Make the
devicetarget harvest the droplet journal (over the same identity-disciplined SSH dial the rented path uses, ADR 0126) intologs/droplet-journal.txtbefore teardown, keyed off theartifacts/droplet-ip.txtit already writes. Harvest lives inscripts/lib/rehearsal-droplet.sh/app/tests/e2e/fixtures/— not a protected.sandcastle/path, so this is an ordinary agent-doable slice. Guard with a seam test asserting the device teardown calls the droplet-evidence harvest (cf.scripts/tests/droplet-evidence-order-test.sh).Origin
Found while fixing #893 (cloud-init restage red at
enroll-activate). The product fix landed; this harness gap was item 3 of that ticket, filed separately to keep scope tight.Ruled by agent under ADR 0174 — veto anytime.
The claim holds. Verified against the harness:
oc_droplet_evidence(the droplet-journal / caddy / stall-forensics harvest) is called on both the create-trap path (oc_droplet_cleanup) and the rented path (oc_rented_cleanup, keyed offartifacts/droplet-ip.txt), butoc_device_teardowndestroys the member device and does nothing else — no droplet-evidence harvest before teardown. So a device-target drive keeps only the VM-target harvest, which on a droplet drive reports "no VM" for every file. The class of red is real and currently diagnosable only by luck. The referenced guard pattern (scripts/tests/droplet-evidence-order-test.sh) and the fixture home both exist and are outside.sandcastle/.Two-way-door ruling — one correction to the ticket's premise, so it can go straight to an agent:
The ticket says harvest "keyed off the
artifacts/droplet-ip.txtit already writes." That artifact belongs to the rented path; the device drive does not write it. Inscripts/smoke-private-path.sh, the device drive stands up against a standing gateway (its IP isartifacts/standing-founded.json.ip— this is the box that reds in stand-up /enroll-activate, the #893 class) and joins a member device (OC_E2E_DEVICE_IP, the boxoc_device_teardowndestroys). So the ruling is: harvest both off the same identity-disciplined SSH dial the rented path uses (ADR 0126), each into its own clearly-named log, beforeoc_device_teardownruns — the gateway journal is what closes the #893-class gap; the device journal is cheap and its box is the one being destroyed.bug— the device drive emits actively-misleading evidence (a "no VM" VM-harvest) for a whole class of droplet red, not merely a missing nice-to-have.scripts/lib/rehearsal-droplet.sh,scripts/smoke-private-path.sh,scripts/tests/), reverts with a single commit, adds no live-infra surface, touches no credentials or member-facing trust surface, and is provable offline.scripts/tests/droplet-evidence-order-test.sh/scripts/tests/rehearsal-device-target-test.sh(test 7 already exercisesoc_device_teardownoffline against a fakeclan-lab), asserting the device teardown/cleanup branch invokes the droplet-evidence harvest before destroy. No live drive required to land the code + guard.Routing to
ready-for-agent.Agent Brief
Category: bug
Summary: The device-target drive harvests no droplet journal before teardown, so a stand-up red on a device drive (e.g. a gateway
enroll-activatecrash) leaves only a misleading VM-target harvest.Current behavior:
On a device-target drive, post-drive cleanup runs only the member-device teardown verb, which destroys the device and gathers no off-box evidence. The droplet-evidence harvest (journal + caddy + stall-forensics, gathered over an identity-disciplined SSH dial per ADR 0126) that the rented and create-trap paths run before teardown is never reached. The run dir is left with the VM-target evidence set, every file of which reports "no VM" (
guest-journal.log=-- No entries --, emptyqemu.log,qemu: ENOENT). When the standing gateway or the member device reds during stand-up, nothing captured which unit failed or why.Desired behavior:
Before the device-target cleanup tears the member device down, harvest the droplet journal (and the same caddy / forensics captures the shared harvest already gathers) off both relevant boxes, over the identity-disciplined SSH dial the rented path uses (ADR 0126), into clearly-named per-box logs under the run dir's
logs/:enroll-activate(the #893 class); its address is the.ipfield of the drive'sartifacts/standing-founded.json;OC_E2E_DEVICE_IP).Each harvest must be best-effort: an unreachable box leaves a "note: … unreachable" marker in its log and never blocks teardown, and a device drive that never stood up a gateway (no
standing-founded.json) is a quiet skip. The harvest must run before the device is destroyed — onceoc_device_teardownfires, the device is gone.Key interfaces:
oc_droplet_evidence, taking a run dir and readingOC_E2E_DROPLET_IP). Reuse it — set the target IP from each box's source before invoking, exactly as the rented path exportsOC_E2E_DROPLET_IPfromdroplet-ip.txt. Do not fork a second harvest implementation.logs/droplet-journal.txt, or with each other — name them so a reader can tell gateway evidence from device evidence.Acceptance criteria:
logs/contains a droplet-journal harvest for the standing gateway (keyed offstanding-founded.json.ip) when that file is present.logs/contains a droplet-journal harvest for the member device (keyed offOC_E2E_DEVICE_IP) when the device was created.standing-founded.jsonskips the gateway harvest quietly.scripts/tests/droplet-evidence-order-test.sh/ the existingscripts/tests/rehearsal-device-target-test.sh, using a fakeclan-lab/ssh) asserts the device cleanup branch invokes the droplet-evidence harvest before the teardown verb. It passes with no network and no DO token.Out of scope:
enroll-activatecrash itself (that is #893 and its siblings) — this is purely the harness evidence gap.swarm-claim host=elitebook-distributed-server-03 run=12647
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #894 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope