remove-device waits for the Active screen a removal never reaches — a SUCCESSFUL removal (fleet already gateway-only, nodes:[]) burns the full 1200s and reds #1136

Closed
opened 2026-09-02 01:55:50 +00:00 by ben · 1 comment
Owner

The run this sits at the very end of

Drive 20260902T002219Z reached 29/30 green and, for the first time in the arc, remove-device got PAST the ⚠ LOSES gate (#1134 landed — the review named Files & documents and the destructive confirm was honest). The removal itself then succeeded: the empty-selection deploy ran, the device offboarded, and the fleet returned to gateway-only.

The leg red anyway, after burning the full 1200s ceiling:

deploy did not reach active within 1200s — deploy bar: (no deploy-progress bar found);
wire /api/v1/fleet: {"gateway": … , "nodes": []}

Note the wire state in the failure message: "nodes": []. The removal had completed — the fleet is already gateway-only — while the leg was still waiting for a screen that was never going to appear.

Diagnosis — a removal never lands on Active

remove-device ends with:

await confirmRemoveDeploy(dash);
await waitForDeployActive(dash, portalAddress, CEILING.removeDevice);
await assertFleetGatewayOnly(dash);

waitForDeployActive polls for [data-field="active"] (fixtures/provision.ts:280-347). That field lives only in ActiveScreen.vue. But a removal does not route there — SetupSurface.runRemoval (dashboard/src/components/provisioning/SetupSurface.vue:399-415):

if (deployRun.value?.deviceUnreachable) return;          // unreachable: hold on the removed-not-erased note (#1114)
if (deployRun.value?.outcome) emit('removed', props.deviceId);   // reachable: close the drill-in back to the fleet list

A reachable removal emits removed and the surface closes back to the fleet list — a removed device is not an active one, so ActiveScreen (and its [data-field="active"]) is correctly never shown. waitForDeployActive therefore had no terminal success state to reach and sat out the whole budget on a removal that had already succeeded.

The product is correct on every count: the review warned (LOSES), the confirm was deliberate (remove-and-deploy), the deploy ran, the device offboarded, the fleet is gateway-only. Only the leg watched for the wrong screen — the deploy-shaped success signal on a removal-shaped act.

Fix (landed)

New waitForDeployDone (fixtures/provision.ts): same fault-frame vigilance as waitForDeployActive (a deploy-failure or setup-error frame is a real red, surfaced with its verbatim reason — ADR 0027/0100), but it resolves on any terminal REMOVAL state: the drill-in having closed back to the fleet list (the reachable success), the removed-not-erased acknowledge note (#1114's unreachable path), or an Active screen (kept as a safety net, never reached today). remove-device calls it instead of waitForDeployActive; assertFleetGatewayOnly on the next line remains the POSITIVE proof the removal took.

waitForDeployActive is unchanged — deploy legs still require Active, which is right for them.

eslint + vue-tsc clean; app/tests/e2e/fixtures 252/252.

Filed and fixed in one motion by the watching session under ADR 0174 — harness-only, read straight off the run (the "nodes": [] in the failure message is the tell that the removal had already completed).

Where this leaves #854

remove-device was the last leg with a defect. With this, the only leg never yet run is reap. The next drive should take remove-device green and run reap for the first time — and if reap holds, the phase-5 device journey is complete end to end.

## The run this sits at the very end of Drive `20260902T002219Z` reached **29/30 green** and, for the first time in the arc, `remove-device` got PAST the ⚠ LOSES gate (#1134 landed — the review named Files & documents and the destructive confirm was honest). The removal itself then **succeeded**: the empty-selection deploy ran, the device offboarded, and the fleet returned to gateway-only. The leg red anyway, after burning the full 1200s ceiling: ``` deploy did not reach active within 1200s — deploy bar: (no deploy-progress bar found); wire /api/v1/fleet: {"gateway": … , "nodes": []} ``` Note the wire state in the failure message: `"nodes": []`. The removal had **completed** — the fleet is already gateway-only — while the leg was still waiting for a screen that was never going to appear. ## Diagnosis — a removal never lands on Active `remove-device` ends with: ```ts await confirmRemoveDeploy(dash); await waitForDeployActive(dash, portalAddress, CEILING.removeDevice); await assertFleetGatewayOnly(dash); ``` `waitForDeployActive` polls for `[data-field="active"]` (`fixtures/provision.ts:280-347`). That field lives only in `ActiveScreen.vue`. But a removal does not route there — `SetupSurface.runRemoval` (`dashboard/src/components/provisioning/SetupSurface.vue:399-415`): ```ts if (deployRun.value?.deviceUnreachable) return; // unreachable: hold on the removed-not-erased note (#1114) if (deployRun.value?.outcome) emit('removed', props.deviceId); // reachable: close the drill-in back to the fleet list ``` A **reachable** removal emits `removed` and the surface closes back to the fleet list — a removed device is not an active one, so `ActiveScreen` (and its `[data-field="active"]`) is correctly never shown. `waitForDeployActive` therefore had no terminal success state to reach and sat out the whole budget on a removal that had already succeeded. The product is correct on every count: the review warned (LOSES), the confirm was deliberate (remove-and-deploy), the deploy ran, the device offboarded, the fleet is gateway-only. Only the leg watched for the wrong screen — the deploy-shaped success signal on a removal-shaped act. ## Fix (landed) New `waitForDeployDone` (`fixtures/provision.ts`): same fault-frame vigilance as `waitForDeployActive` (a `deploy-failure` or `setup-error` frame is a real red, surfaced with its verbatim reason — ADR 0027/0100), but it resolves on any terminal REMOVAL state: the drill-in having closed back to the fleet list (the reachable success), the `removed-not-erased` acknowledge note (#1114's unreachable path), or an Active screen (kept as a safety net, never reached today). `remove-device` calls it instead of `waitForDeployActive`; `assertFleetGatewayOnly` on the next line remains the POSITIVE proof the removal took. `waitForDeployActive` is unchanged — deploy legs still require Active, which is right for them. eslint + vue-tsc clean; `app/tests/e2e/fixtures` 252/252. Filed and fixed in one motion by the watching session under ADR 0174 — harness-only, read straight off the run (the `"nodes": []` in the failure message is the tell that the removal had already completed). ## Where this leaves #854 `remove-device` was the last leg with a defect. With this, the only leg never yet run is `reap`. The next drive should take `remove-device` green and run `reap` for the first time — and if `reap` holds, the phase-5 device journey is complete end to end.
Author
Owner

Closing as a duplicate of the healer fix 2cef224d (waitForRemovalSettled), which landed on main while this was being written — same diagnosis, and its version is the better one.

Both saw the same thing: waitForDeployActive polls [data-field="active"], and a removal never routes to ActiveScreen — SetupSurface.runRemoval emits removed and closes the drill-in back to the fleet list (or holds on removed-not-erased for an unreachable box, #1114). So a SUCCESSFUL removal (fleet already "nodes":[]) burned the full 1200s.

2cef224d is better than the waitForDeployDone I had staged: it factors the decision into a pure readRemovalVerdict (unit-testable in isolation), returns a typed RemovalVerdict, keys the handed-back success on a real provisioning-setup-drill-in marker rather than the deploy bar's absence, and drives the unreachable path's acknowledge-removed edge through the surface. My local commit is dropped in favour of it.

No action needed. remove-device was the last leg with a defect; the next drive should take it green and run reap for the first time.

Closing as a duplicate of the healer fix `2cef224d` (`waitForRemovalSettled`), which landed on main while this was being written — same diagnosis, and its version is the better one. Both saw the same thing: `waitForDeployActive` polls `[data-field="active"]`, and a removal never routes to `ActiveScreen` — `SetupSurface.runRemoval` emits `removed` and closes the drill-in back to the fleet list (or holds on `removed-not-erased` for an unreachable box, #1114). So a SUCCESSFUL removal (fleet already `"nodes":[]`) burned the full 1200s. `2cef224d` is better than the `waitForDeployDone` I had staged: it factors the decision into a pure `readRemovalVerdict` (unit-testable in isolation), returns a typed `RemovalVerdict`, keys the handed-back success on a real `provisioning-setup-drill-in` marker rather than the deploy bar's absence, and drives the unreachable path's `acknowledge-removed` edge through the surface. My local commit is dropped in favour of it. No action needed. `remove-device` was the last leg with a defect; the next drive should take it green and run `reap` for the first time.
ben closed this issue 2026-09-02 01:58:00 +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#1136
No description provided.