reap: the carrier never exports OC_E2E_DEVICE_TEARDOWN, so the final leg cannot destroy its own member device and reds (30/31 green, reap ran for the first time) #1137

Closed
opened 2026-09-02 02:48:10 +00:00 by ben · 1 comment
Owner

The run

Drive 20260902T020219Z reached 30 of 31 green — remove-device GREEN (the last leg carrying a real defect, after #1134's LOSES row and 2cef224d's removal-settle fix), and reap ran for the first time in the #854 arc. It red on a wiring gap:

OC_E2E_DEVICE_TEARDOWN is not set — the carrier must export the oc_device_teardown command so the reap leg can destroy the member droplet (Task 9/12)

Diagnosis

The reap leg (journey.device.spec.ts runDeviceTeardown) destroys THIS drive's device itself — the journey holds no clan-lab and no DO token — by running the command string the carrier is contracted to export as OC_E2E_DEVICE_TEARDOWN, then polls doctl until the box is gone. oc_device_create (scripts/lib/rehearsal-droplet.sh) exported OC_E2E_DEVICE_IP and never the teardown command, so both the leg and its afterAll doctl-fallback threw "not set". The device was still cleaned up out of band (clan-lab's 6h TTL reap, GOTCHAS #48), but the leg could not prove it and redded — a contract never wired, visible in the afterAll fallback's own note the whole arc.

Fix (landed 7f3a62d5)

oc_device_teardown resolves its target from $oc_device_name/$oc_device_id, shell state that does not survive into the playwright subprocess. So the export bakes the concrete droplet name in:

export OC_E2E_DEVICE_TEARDOWN="'$CLAN_LAB' destroy $(printf %q "$oc_device_name")"

printf %q quotes the name; the parsed argv is exactly [clan-lab, destroy, <name>] even with a space in $CLAN_LAB. clan-lab destroy refuses anything not clan-lab-tagged, so it can only reach the member box, never the standing gateway. bash -n clean; the exported command verified to parse to the right argv.

Filed and fixed in one motion by the watching session under ADR 0174 — harness-only, revertible.

This is the last leg

reap is leg 31 of 31 and the only one that had never run. With this, every leg of the phase-5 device journey has a green path. The next drive is the completion candidate: bare metal → taken-over, IdP-authenticated, files-serving member → cleanly removed → reaped. If it holds, #854 goes GREEN.

## The run Drive `20260902T020219Z` reached **30 of 31 green** — `remove-device` GREEN (the last leg carrying a real defect, after #1134's LOSES row and `2cef224d`'s removal-settle fix), and **`reap` ran for the first time in the #854 arc.** It red on a wiring gap: ``` OC_E2E_DEVICE_TEARDOWN is not set — the carrier must export the oc_device_teardown command so the reap leg can destroy the member droplet (Task 9/12) ``` ## Diagnosis The `reap` leg (`journey.device.spec.ts` `runDeviceTeardown`) destroys THIS drive's device itself — the journey holds no clan-lab and no DO token — by running the command string the carrier is contracted to export as `OC_E2E_DEVICE_TEARDOWN`, then polls doctl until the box is gone. `oc_device_create` (`scripts/lib/rehearsal-droplet.sh`) exported `OC_E2E_DEVICE_IP` and **never the teardown command**, so both the leg and its afterAll doctl-fallback threw "not set". The device was still cleaned up out of band (clan-lab's 6h TTL reap, GOTCHAS #48), but the leg could not prove it and redded — a contract never wired, visible in the afterAll fallback's own note the whole arc. ## Fix (landed `7f3a62d5`) `oc_device_teardown` resolves its target from `$oc_device_name`/`$oc_device_id`, shell state that does not survive into the playwright subprocess. So the export bakes the concrete droplet name in: ```sh export OC_E2E_DEVICE_TEARDOWN="'$CLAN_LAB' destroy $(printf %q "$oc_device_name")" ``` `printf %q` quotes the name; the parsed argv is exactly `[clan-lab, destroy, <name>]` even with a space in `$CLAN_LAB`. `clan-lab destroy` refuses anything not clan-lab-tagged, so it can only reach the member box, never the standing gateway. `bash -n` clean; the exported command verified to parse to the right argv. Filed and fixed in one motion by the watching session under ADR 0174 — harness-only, revertible. ## This is the last leg `reap` is leg 31 of 31 and the only one that had never run. With this, every leg of the phase-5 device journey has a green path. The next drive is the completion candidate: bare metal → taken-over, IdP-authenticated, files-serving member → cleanly removed → reaped. If it holds, #854 goes GREEN.
Author
Owner

Fixed in 7f3a62d5 (pushed just before this ticket was minted, so the auto-close could not fire). Closing.

Fixed in `7f3a62d5` (pushed just before this ticket was minted, so the auto-close could not fire). Closing.
ben closed this issue 2026-09-02 02:48:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1137
No description provided.