the mid-journey landed-node cleanup hangs on a remove-device the change surface never renders — a red drive burns its whole 195m budget, and its droplet's wall-clock, after the verdict is known #1067

Closed
opened 2026-08-31 08:48:44 +00:00 by matou-build-agent · 3 comments

Failure

Drive 20260831T043317Z (device target, commit 435ae385) red at deploy-takeover at 05:23:58. The drive then spent 3h15m34s in afterAll and only ended at 08:39:32 (artifacts/verdict.json endedAt) when Playwright's hook timeout fired. error-context.md records the second error alongside the leg's own:

"afterAll" hook timeout of 11700000ms exceeded.

11,700,000 ms is exactly timeout: 195 * 60_000 at app/playwright.config.ts:66 — the hook burned the entire drive ceiling. The gateway was idle throughout: logs/gateway-journal.txt carries nothing but lease heartbeats and kanidm tombstone purges from 05:23:48 to 08:39, and logs/gateway-stall.txt (taken 08:39:50) shows load average 0.00 and no nix/ssh work. The 3h15m was spent entirely client-side, waiting.

This is not the deploy-takeover defect. That one — the kexec installer's wt0 never returning, logs/gateway-journal.txt:1304-1305 — is already fixed at HEAD by 082daa34 (#1057), which declares the netbird daemon in internal/clan/netbird.go:653-731 and names this same drive. This ticket is the separate fault the same run exposed.

Evidence

Parsing artifacts/journey.device-*/trace.zip (test.trace), the last actions of the run are the afterAll landed-node cleanup, and the final one never completes:

+0.5s   goto https://rehearsal-e.idss.nz (domcontentloaded)      -> ok
+0.1s   click [data-action="tab-fleet"]                          -> ok
+0.3s   waitFor [data-field="fleet-row-node-req-0003"] visible   -> ok
+0.0s   getAttribute -> "change-node-node-req-0003"              -> ok
+0.1s   click [data-action="change-node-node-req-0003"]          -> ok
        click [data-action="remove-device"]                      -> NEVER RETURNED
hook duration: 11700.6s

Two defects compose here.

1. The surface the cleanup drills into carries no remove-device control.

The cleanup drills in via change-node-<id> on the premise, stated at app/tests/e2e/journey.device.spec.ts:258-263 and again at app/tests/e2e/fixtures/deviceProvision.ts:141-146, that a provisioned node whose box is gone "re-assesses out-of-reach and the surface routes to the S1x 'nothing available' resting state, which offers remove-device".

That premise did not hold. SetupSurface.vue:204 routes on the seam's verdict alone:

view.value = a.verdict === 'nothing-available' ? 's1x' : 'setup';

The changeSetup re-read did not return nothing-available — the page snapshot captured at the hang (error-context.md) shows the ordinary view === 'setup' composite (SetupSurface.vue:65-77: AssessScreen + SelectRoleServicesScreen), reading the device as ● active, public connection, reachable from the internet, 2 CPUs · 3 GB · 76 GB, with a ROLE combobox, an AVAILABLE list, and a Review impact button. One service was still offerable (Backup copies (extra copy — never the sole copy) fits: 1 GB), so the verdict was not nothing-available and S1x was never reached — even though the box had already been destroyed by runDeviceTeardown (logs/device-do-forensics.txt: "no droplet at 170.64.206.39 in this account — it is already gone").

remove-device exists in only two places, neither of them the setup view:

  • dashboard/src/components/provisioning/AssessNothingAvailableScreen.vue:57 (S1x)
  • dashboard/src/components/provisioning/ActiveScreen.vue:181 (S5)

wired at SetupSurface.vue:29-34 and SetupSurface.vue:57-64. So the click could never resolve.

2. The click is unbounded, so "could never resolve" became "burned 195 minutes".

app/tests/e2e/journey.device.spec.ts:896:

await page.locator('[data-action="remove-device"]').click();

No timeout. app/playwright.config.ts:72-94 sets neither actionTimeout nor navigationTimeout in use, so Playwright's default of 0 (no cap) applies and the only bound is the 195-minute hook timeout at line 66. Every other wait in this cleanup is explicitly bounded (row.waitFor({ timeout: CEILING.assess }) at journey.device.spec.ts:271); this one is not.

The cleanup is wrapped in try/catch and declared non-fatal (journey.device.spec.ts:266-281), so a bounded failure would have cost seconds and logged a landed-node cleanup note. Instead the drive held a paid droplet and the standing gateway for 3h15m past its own verdict, and the same path fires on every mid-journey red after approve.

Suspected layer

The e2e teardown contract in app/tests/e2e/journey.device.spec.ts / app/tests/e2e/fixtures/deviceProvision.ts, plus a genuine gap in the provisioning surface: from the change view of a provisioned node, removal is unreachable unless the seam happens to answer nothing-available.

What plugging it needs

  1. Bound the click (no ruling needed). walkOffNode (journey.device.spec.ts:894-899) must carry an explicit ceiling on the remove-device click and on confirmRemoveDeploy, so a surface that does not offer removal fails fast into the caller's existing catch. This is squarely inside the cleanup's own stated best-effort contract — a teardown that cannot complete must say so in seconds, never consume the drive ceiling. Consider also setting actionTimeout in app/playwright.config.ts use so no other unbounded .click()/.goto() can do this again; if so, pick it against the existing CEILING table rather than a round number.
  2. Fix the route. The cleanup's premise (deviceProvision.ts:141-146, journey.device.spec.ts:258-263) is false whenever the re-assess still finds any offerable service. dashboard/src/lib/fleet.ts:172-178 already recognises a remove-device-<id> intent that opens the surface straight on the P4-S3x removal confirm (ADR 0210 ruling 5), and SetupSurface.vue:211-217 honours it via the remove prop — but no producer of that intent exists in the repo (grep finds only fleet.ts itself), so the cleanup cannot currently reach it from a fleet row. Either give the cleanup a way to raise that intent, or read ADR 0210 on whether the change/assess view should itself carry a removal act.
  3. Decide the product question the run surfaced, if (2) points that way: a provisioned node whose host is gone still re-reads ● active / reachable from the internet from cached facts and offers services, so the operator's only removal affordance sits behind an S1x verdict that never arrives. Whether removal belongs on the change view is an ADR 0210 call, not a test-harness one.

For the drive: deploy-takeover itself needs no work — 082daa34 (#1057) closes it and the next drive re-drives at HEAD.

drive 20260831T043317Z red at deploy-takeover: deploy failed (rescue): clan: target_lost on node-req-0003: the takeover's deploy target root@100.68.233.153 stopped answering during the kexec phase, before any disk work completed — the session wa
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260831T043317Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## Failure Drive `20260831T043317Z` (device target, commit `435ae385`) red at `deploy-takeover` at **05:23:58**. The drive then spent **3h15m34s** in `afterAll` and only ended at **08:39:32** (`artifacts/verdict.json` `endedAt`) when Playwright's hook timeout fired. `error-context.md` records the second error alongside the leg's own: ``` "afterAll" hook timeout of 11700000ms exceeded. ``` 11,700,000 ms is exactly `timeout: 195 * 60_000` at `app/playwright.config.ts:66` — the hook burned the entire drive ceiling. The gateway was idle throughout: `logs/gateway-journal.txt` carries nothing but lease heartbeats and kanidm tombstone purges from 05:23:48 to 08:39, and `logs/gateway-stall.txt` (taken 08:39:50) shows load average 0.00 and no nix/ssh work. The 3h15m was spent entirely client-side, waiting. **This is not the deploy-takeover defect.** That one — the kexec installer's `wt0` never returning, `logs/gateway-journal.txt:1304-1305` — is already fixed at HEAD by `082daa34` (#1057), which declares the netbird daemon in `internal/clan/netbird.go:653-731` and names this same drive. This ticket is the separate fault the same run exposed. ## Evidence Parsing `artifacts/journey.device-*/trace.zip` (`test.trace`), the last actions of the run are the `afterAll` landed-node cleanup, and the final one never completes: ``` +0.5s goto https://rehearsal-e.idss.nz (domcontentloaded) -> ok +0.1s click [data-action="tab-fleet"] -> ok +0.3s waitFor [data-field="fleet-row-node-req-0003"] visible -> ok +0.0s getAttribute -> "change-node-node-req-0003" -> ok +0.1s click [data-action="change-node-node-req-0003"] -> ok click [data-action="remove-device"] -> NEVER RETURNED hook duration: 11700.6s ``` Two defects compose here. **1. The surface the cleanup drills into carries no `remove-device` control.** The cleanup drills in via `change-node-<id>` on the premise, stated at `app/tests/e2e/journey.device.spec.ts:258-263` and again at `app/tests/e2e/fixtures/deviceProvision.ts:141-146`, that a provisioned node whose box is gone "re-assesses out-of-reach and the surface routes to the S1x 'nothing available' resting state, which offers remove-device". That premise did not hold. `SetupSurface.vue:204` routes on the seam's verdict alone: ```ts view.value = a.verdict === 'nothing-available' ? 's1x' : 'setup'; ``` The `changeSetup` re-read did **not** return `nothing-available` — the page snapshot captured at the hang (`error-context.md`) shows the ordinary `view === 'setup'` composite (`SetupSurface.vue:65-77`: `AssessScreen` + `SelectRoleServicesScreen`), reading the device as `● active`, `public connection, reachable from the internet`, `2 CPUs · 3 GB · 76 GB`, with a ROLE combobox, an AVAILABLE list, and a `Review impact` button. One service was still offerable (`Backup copies (extra copy — never the sole copy) fits: 1 GB`), so the verdict was not `nothing-available` and S1x was never reached — even though the box had already been destroyed by `runDeviceTeardown` (`logs/device-do-forensics.txt`: "no droplet at 170.64.206.39 in this account — it is already gone"). `remove-device` exists in only two places, neither of them the `setup` view: - `dashboard/src/components/provisioning/AssessNothingAvailableScreen.vue:57` (S1x) - `dashboard/src/components/provisioning/ActiveScreen.vue:181` (S5) wired at `SetupSurface.vue:29-34` and `SetupSurface.vue:57-64`. So the click could never resolve. **2. The click is unbounded, so "could never resolve" became "burned 195 minutes".** `app/tests/e2e/journey.device.spec.ts:896`: ```ts await page.locator('[data-action="remove-device"]').click(); ``` No timeout. `app/playwright.config.ts:72-94` sets neither `actionTimeout` nor `navigationTimeout` in `use`, so Playwright's default of `0` (no cap) applies and the only bound is the 195-minute hook timeout at line 66. Every other wait in this cleanup is explicitly bounded (`row.waitFor({ timeout: CEILING.assess })` at `journey.device.spec.ts:271`); this one is not. The cleanup is wrapped in try/catch and declared non-fatal (`journey.device.spec.ts:266-281`), so a bounded failure would have cost seconds and logged a `landed-node cleanup note`. Instead the drive held a paid droplet and the standing gateway for 3h15m past its own verdict, and the same path fires on **every** mid-journey red after `approve`. ## Suspected layer The e2e teardown contract in `app/tests/e2e/journey.device.spec.ts` / `app/tests/e2e/fixtures/deviceProvision.ts`, plus a genuine gap in the provisioning surface: from the change view of a provisioned node, removal is unreachable unless the seam happens to answer `nothing-available`. ## What plugging it needs 1. **Bound the click (no ruling needed).** `walkOffNode` (`journey.device.spec.ts:894-899`) must carry an explicit ceiling on the `remove-device` click and on `confirmRemoveDeploy`, so a surface that does not offer removal fails fast into the caller's existing catch. This is squarely inside the cleanup's own stated best-effort contract — a teardown that cannot complete must say so in seconds, never consume the drive ceiling. Consider also setting `actionTimeout` in `app/playwright.config.ts` `use` so no other unbounded `.click()`/`.goto()` can do this again; if so, pick it against the existing CEILING table rather than a round number. 2. **Fix the route.** The cleanup's premise (`deviceProvision.ts:141-146`, `journey.device.spec.ts:258-263`) is false whenever the re-assess still finds any offerable service. `dashboard/src/lib/fleet.ts:172-178` already recognises a `remove-device-<id>` intent that opens the surface straight on the P4-S3x removal confirm (ADR 0210 ruling 5), and `SetupSurface.vue:211-217` honours it via the `remove` prop — but **no producer of that intent exists in the repo** (grep finds only `fleet.ts` itself), so the cleanup cannot currently reach it from a fleet row. Either give the cleanup a way to raise that intent, or read ADR 0210 on whether the change/assess view should itself carry a removal act. 3. **Decide the product question the run surfaced**, if (2) points that way: a provisioned node whose host is gone still re-reads `● active` / `reachable from the internet` from cached facts and offers services, so the operator's only removal affordance sits behind an S1x verdict that never arrives. Whether removal belongs on the change view is an ADR 0210 call, not a test-harness one. For the drive: `deploy-takeover` itself needs no work — `082daa34` (#1057) closes it and the next drive re-drives at HEAD. drive `20260831T043317Z` red at `deploy-takeover`: `deploy failed (rescue): clan: target_lost on node-req-0003: the takeover's deploy target root@100.68.233.153 stopped answering during the kexec phase, before any disk work completed — the session wa` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260831T043317Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 800a2936720b -->
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=15055
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=15055 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

Ruled by agent under ADR 0174 — veto anytime.

Ruling. The removal affordance now also sits on the change composite (P4-S2 in change mode), not only on S1x and the Active view. A provisioned node whose host is gone still re-reads active from cached facts and lands on the change composite whenever any service is still offerable, so the operator's only removal act must not sit behind an S1x "nothing available" verdict that never arrives (defect #3 in this ticket). The change view's Remove device button raises the same remove-device intent and lands on the same P4-S3x LOSES confirm S1x/Active already reach.

Why a two-way door. Revertible by a later commit (a single UI addition + one flow-diagram edge + an ADR amendment note); provable at the seam by an existing-shape component test. Not on the ADR 0174 one-way-door list: it touches no credential, widens no security posture, is an operator-facing functional control (not a member-/public-facing trust/brand surface), destroys no data (the affordance only opens the deliberate LOSES review — nothing is removed until the operator confirms there), and is not spend.

What proves it. dashboard/tests/unit/provisionRemoveDevice.test.ts — the change composite emits remove-device (and a first-setup device carries none), and the Fleet mount routes the change view's own button to the S3x LOSES confirm in place. All 1281 dashboard unit tests green; vue-tsc clean.

Also in this ticket (no ruling needed — squarely inside the teardown's stated best-effort contract): walkOffNode's remove-device click is now bounded (CEILING.assess), and app/playwright.config.ts gains a suite-wide actionTimeout: 5m so no other unbounded .click()/.goto() can burn the 195m drive ceiling again.

**Ruled by agent under ADR 0174 — veto anytime.** **Ruling.** The removal affordance now also sits on the **change composite** (P4-S2 in change mode), not only on S1x and the Active view. A provisioned node whose host is gone still re-reads `active` from cached facts and lands on the change composite whenever any service is still offerable, so the operator's only removal act must not sit behind an S1x "nothing available" verdict that never arrives (defect #3 in this ticket). The change view's **Remove device** button raises the same `remove-device` intent and lands on the same P4-S3x LOSES confirm S1x/Active already reach. **Why a two-way door.** Revertible by a later commit (a single UI addition + one flow-diagram edge + an ADR amendment note); provable at the seam by an existing-shape component test. Not on the ADR 0174 one-way-door list: it touches no credential, widens no security posture, is an operator-facing functional control (not a member-/public-facing trust/brand surface), destroys no data (the affordance only *opens* the deliberate LOSES review — nothing is removed until the operator confirms there), and is not spend. **What proves it.** `dashboard/tests/unit/provisionRemoveDevice.test.ts` — the change composite emits `remove-device` (and a first-setup device carries none), and the Fleet mount routes the change view's own button to the S3x LOSES confirm in place. All 1281 dashboard unit tests green; `vue-tsc` clean. Also in this ticket (no ruling needed — squarely inside the teardown's stated best-effort contract): `walkOffNode`'s `remove-device` click is now bounded (`CEILING.assess`), and `app/playwright.config.ts` gains a suite-wide `actionTimeout: 5m` so no other unbounded `.click()`/`.goto()` can burn the 195m drive ceiling again.
Author
Member

close-report for #1067 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1067,
  "status": "success",
  "commits": [
    "3bf136c9"
  ],
  "changed_files": [
    "STATUS.md",
    "app/playwright.config.ts",
    "app/tests/e2e/fixtures/deviceProvision.ts",
    "app/tests/e2e/journey.device.spec.ts",
    "dashboard/src/components/provisioning/SelectRoleServicesScreen.vue",
    "dashboard/src/components/provisioning/SetupSurface.vue",
    "dashboard/tests/unit/provisionRemoveDevice.test.ts",
    "docs/adr/0210-files-on-a-member-device-composition-oidc-split-mesh-route.md",
    "docs/ux/flows/p4-provisioning.mermaid"
  ],
  "tests": [
    {
      "command": "npx vitest run tests/unit/provisionRemoveDevice.test.ts (dashboard)",
      "exit_code": 0
    },
    {
      "command": "npx vitest run (dashboard, full suite: 112 files / 1281 tests)",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit (dashboard)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "1. Bound the remove-device click so a surface that does not offer removal fails fast into the caller's catch, never the 195m ceiling": "walkOffNode's click now carries { timeout: CEILING.assess } (app/tests/e2e/journey.device.spec.ts); app/playwright.config.ts gains use.actionTimeout: 5*60_000 as a suite-wide backstop for every unbounded action, picked against the CEILING table (= CEILING.assess), not a round number",
    "2. Fix the route so the cleanup can reach removal from a provisioned node's change view": "SelectRoleServicesScreen.vue renders a change-gated remove-device act; SetupSurface.vue forwards it as its existing remove-device emit -> FleetSurface openRemove -> the same P4-S3x LOSES confirm; proven in provisionRemoveDevice.test.ts (change composite emits; Fleet mount routes the change view's own button to the S3x confirm in place)",
    "3. Decide the product question — whether removal belongs on the change view (ADR 0210 call)": "Ruled by agent under ADR 0174 (two-way door, veto anytime) and recorded: ADR 0210 ruling 5 amendment note + issue comment #32484 + P4 flow diagram edge S2->REM (change mode)"
  },
  "summary": "Bounded the e2e teardown's remove-device click (plus a suite-wide actionTimeout backstop) and gave the P4 change composite the same removal act S1x/Active carry, so a mid-journey red stops burning its 195m drive ceiling and #1044's orphan cleanup actually converges.",
  "blockers": []
}
**close-report** for #1067 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1067, "status": "success", "commits": [ "3bf136c9" ], "changed_files": [ "STATUS.md", "app/playwright.config.ts", "app/tests/e2e/fixtures/deviceProvision.ts", "app/tests/e2e/journey.device.spec.ts", "dashboard/src/components/provisioning/SelectRoleServicesScreen.vue", "dashboard/src/components/provisioning/SetupSurface.vue", "dashboard/tests/unit/provisionRemoveDevice.test.ts", "docs/adr/0210-files-on-a-member-device-composition-oidc-split-mesh-route.md", "docs/ux/flows/p4-provisioning.mermaid" ], "tests": [ { "command": "npx vitest run tests/unit/provisionRemoveDevice.test.ts (dashboard)", "exit_code": 0 }, { "command": "npx vitest run (dashboard, full suite: 112 files / 1281 tests)", "exit_code": 0 }, { "command": "npx vue-tsc -p tsconfig.json --noEmit (dashboard)", "exit_code": 0 } ], "criteria": { "1. Bound the remove-device click so a surface that does not offer removal fails fast into the caller's catch, never the 195m ceiling": "walkOffNode's click now carries { timeout: CEILING.assess } (app/tests/e2e/journey.device.spec.ts); app/playwright.config.ts gains use.actionTimeout: 5*60_000 as a suite-wide backstop for every unbounded action, picked against the CEILING table (= CEILING.assess), not a round number", "2. Fix the route so the cleanup can reach removal from a provisioned node's change view": "SelectRoleServicesScreen.vue renders a change-gated remove-device act; SetupSurface.vue forwards it as its existing remove-device emit -> FleetSurface openRemove -> the same P4-S3x LOSES confirm; proven in provisionRemoveDevice.test.ts (change composite emits; Fleet mount routes the change view's own button to the S3x confirm in place)", "3. Decide the product question — whether removal belongs on the change view (ADR 0210 call)": "Ruled by agent under ADR 0174 (two-way door, veto anytime) and recorded: ADR 0210 ruling 5 amendment note + issue comment #32484 + P4 flow diagram edge S2->REM (change mode)" }, "summary": "Bounded the e2e teardown's remove-device click (plus a suite-wide actionTimeout backstop) and gave the P4 change composite the same removal act S1x/Active carry, so a mid-journey red stops burning its 195m drive ceiling and #1044's orphan cleanup actually converges.", "blockers": [] } ``` </details>
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.

Reference
Matou/idss#1067
No description provided.