build: Fleet device dialog — remove entry (consequence + hand-off to provisioning's gated remove) (slice 4/4) #2062

Closed
opened 2026-10-23 18:01:24 +00:00 by matou-build-agent · 4 comments

Parent

  • Design pass #2050; child spec #2058; DDR 0295. Flow
    docs/ux/flows/p9-device-dialog.mermaid; wireframe P9-D5.
  • Slice device-remove-entry of docs/slices/fleet-device-dialog.yaml.

What to build

The device dialog surfaces a Remove device… affordance that opens a confirm
state (P9-D5) stating the consequence — removing the device takes its services
off it, drops the node from the community and revokes its identity (it must be set
up again from scratch); on a reachable box its disk is wiped, on a silent one it
is "removed here, not erased there" (#1114). Confirming hands off to
provisioning's existing remove review
(the ⚠ LOSES gate) by firing the existing
remove-device-<id> intent → FleetSurface.openRemove; the dialog itself calls
no destructive seam.
Cancel removes nothing. The gateway's dialog shows no
Remove and no role change
(the front door moves only through takeover, DDR
0293; the server-side refusal already holds).

Why human

This slice is ready-for-human, not ready-for-agent (ADR 0174 one-way-door
list: destroying data + member-facing trust). The human residue is the
trust-surface decision
— whether to surface a data-destroying, identity-revoking
act as a new prominent entry point on the Fleet device dialog.

Proposed default ruling: adopt. The dialog only enters provisioning's
already-human-reviewed remove (the ⚠ LOSES gate catches a last copy of data
before anything is torn down; no half-removal, ADR 0100), and fires no
destructive seam of its own — so it is a routed entry to an already-gated flow, a
two-way add. Ruled by agent under ADR 0174 — veto anytime; a human confirms the
placement before this builds.

Acceptance criteria

  • Given a non-gateway device's dialog, when Remove device… is chosen, then
    a confirm state states the consequence (services off, node dropped + identity
    revoked → re-enrol; data wiped if reachable, else removed-not-erased).
  • Given the remove confirm, when the operator confirms, then the dialog hands
    off to provisioning's remove review (remove-device-<id> → FleetSurface.openRemove),
    calling no destructive seam itself.
  • Given the remove confirm, when Cancel is pressed, then nothing is removed.
  • Given the gateway device's dialog, then no Remove and no role-change
    affordance is shown (DDR 0293).

Task manifest

task: device-remove-entry
implements_flow: p9-device-dialog
implements_edge: D1→D5 (remove), D5→provisioning remove review (hand off), D5→D1 (cancel)
wireframe:
  - docs/ux/wireframes/p9-device-dialog/p9-d5-device-dialog-remove-confirm.html
interface: |
  The dialog fires the EXISTING remove-device-<id> intent → FleetSurface.openRemove
  (the SetupSurface remove review, POST /api/v1/provision/devices/{id}/remove).
  No new backend seam. The gateway's dialog omits Remove + the role change.
seam: dashboard unit over the injected fleet client — assert the confirm fires the remove-device-<id> intent and NO destructive seam is called from the dialog; the gateway dialog omits Remove
acceptance:
  - given: a non-gateway device's dialog
    when: Remove device… is chosen then confirmed
    then: the dialog opens provisioning's remove review (remove-device-<id>), calling no destructive seam itself
  - given: the gateway device's dialog
    when: it opens
    then: no Remove and no role-change affordance is shown (DDR 0293)
depends_on: [dialog-shell-and-identity]
out_of_scope: [re-implementing the removal itself — it stays provisioning's gated flow]
unproven_by_seam: the real teardown (RemoveNode + RevokeGrant + VM teardown) — provisioning's own live leg exercises it, not this entry
needs_human_decision:
  - the remove entry point on Fleet (trust-surface placement of a data-destroying, identity-revoking act); proposed default — adopt (routed entry to an already-gated flow)

Blocked by

  • #2050 (the design PR must merge — native dependency).
  • dialog-shell-and-identity (the dialog must exist — native dependency).
<!-- origin: app-report #2046 --> ## Parent - Design pass **#2050**; child spec **#2058**; **DDR 0295**. Flow `docs/ux/flows/p9-device-dialog.mermaid`; wireframe P9-D5. - Slice `device-remove-entry` of `docs/slices/fleet-device-dialog.yaml`. ## What to build The device dialog surfaces a **Remove device…** affordance that opens a confirm state (P9-D5) **stating the consequence** — removing the device takes its services off it, drops the node from the community and revokes its identity (it must be set up again from scratch); on a reachable box its disk is wiped, on a silent one it is "removed here, not erased there" (#1114). Confirming **hands off to provisioning's existing remove review** (the ⚠ LOSES gate) by firing the existing `remove-device-<id>` intent → `FleetSurface.openRemove`; **the dialog itself calls no destructive seam.** *Cancel* removes nothing. The **gateway's dialog shows no Remove and no role change** (the front door moves only through takeover, DDR 0293; the server-side refusal already holds). ## Why human This slice is `ready-for-human`, not `ready-for-agent` (ADR 0174 one-way-door list: destroying data + member-facing trust). **The human residue is the trust-surface decision** — whether to surface a data-destroying, identity-revoking act as a new prominent entry point on the Fleet device dialog. **Proposed default ruling:** adopt. The dialog only **enters** provisioning's already-human-reviewed remove (the ⚠ LOSES gate catches a last copy of data before anything is torn down; no half-removal, ADR 0100), and fires no destructive seam of its own — so it is a routed entry to an already-gated flow, a two-way add. Ruled by agent under ADR 0174 — veto anytime; a human confirms the placement before this builds. ## Acceptance criteria - [ ] Given a non-gateway device's dialog, when *Remove device…* is chosen, then a confirm state states the consequence (services off, node dropped + identity revoked → re-enrol; data wiped if reachable, else removed-not-erased). - [ ] Given the remove confirm, when the operator confirms, then the dialog hands off to provisioning's remove review (`remove-device-<id>` → `FleetSurface.openRemove`), calling no destructive seam itself. - [ ] Given the remove confirm, when *Cancel* is pressed, then nothing is removed. - [ ] Given the gateway device's dialog, then no Remove and no role-change affordance is shown (DDR 0293). ## Task manifest ```yaml task: device-remove-entry implements_flow: p9-device-dialog implements_edge: D1→D5 (remove), D5→provisioning remove review (hand off), D5→D1 (cancel) wireframe: - docs/ux/wireframes/p9-device-dialog/p9-d5-device-dialog-remove-confirm.html interface: | The dialog fires the EXISTING remove-device-<id> intent → FleetSurface.openRemove (the SetupSurface remove review, POST /api/v1/provision/devices/{id}/remove). No new backend seam. The gateway's dialog omits Remove + the role change. seam: dashboard unit over the injected fleet client — assert the confirm fires the remove-device-<id> intent and NO destructive seam is called from the dialog; the gateway dialog omits Remove acceptance: - given: a non-gateway device's dialog when: Remove device… is chosen then confirmed then: the dialog opens provisioning's remove review (remove-device-<id>), calling no destructive seam itself - given: the gateway device's dialog when: it opens then: no Remove and no role-change affordance is shown (DDR 0293) depends_on: [dialog-shell-and-identity] out_of_scope: [re-implementing the removal itself — it stays provisioning's gated flow] unproven_by_seam: the real teardown (RemoveNode + RevokeGrant + VM teardown) — provisioning's own live leg exercises it, not this entry needs_human_decision: - the remove entry point on Fleet (trust-surface placement of a data-destroying, identity-revoking act); proposed default — adopt (routed entry to an already-gated flow) ``` ## Blocked by - **#2050** (the design PR must merge — native dependency). - **dialog-shell-and-identity** (the dialog must exist — native dependency).
Owner

Ruled by Ben 2026-10-29 — adopt as designed

Ben's ruling on this one-way door: adopt as designed — the Remove entry on the Fleet device dialog (consequence stated, hand-off to provisioning's gated remove, no destructive seam from the dialog; gateway shows no Remove). The proposed default stands; nothing in the DDR or the wireframes changes.

ready-for-human → ready-for-agent (landing-pr kept). Build when the blocking slice closes.

## Ruled by Ben 2026-10-29 — adopt as designed Ben's ruling on this one-way door: **adopt as designed** — the Remove entry on the Fleet device dialog (consequence stated, hand-off to provisioning's gated remove, no destructive seam from the dialog; gateway shows no Remove). The proposed default stands; nothing in the DDR or the wireframes changes. `ready-for-human` → `ready-for-agent` (`landing-pr` kept). Build when the blocking slice closes.
Author
Member

⏩ independent reviewer for #2062 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #2062 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>
Author
Member

close-report for #2062 — status success

✅ close-report gates passed — every claim verified against the PR head. PR #2172 (#2172) is open and green; a human merges it and the merge closes this issue via closes #2062 (MERGE_AUTHORITY=human).

envelope
{
  "issue": 2062,
  "status": "success",
  "commits": [
    "60ac6581e9c779a44bfe1cc27ed244deb9dbaac0"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/components/shell/DeviceDialog.vue",
    "dashboard/src/i18n/shell/en.ts",
    "dashboard/src/i18n/shell/es.ts",
    "dashboard/src/i18n/shell/fr.ts",
    "dashboard/src/i18n/shell/nl.ts",
    "dashboard/src/i18n/shell/pt.ts",
    "dashboard/src/lib/fleet.ts",
    "dashboard/tests/e2e/preview-harness/fleetDeviceRemove.spec.ts",
    "dashboard/tests/unit/fleetDeviceDialog.test.ts"
  ],
  "tests": [
    {
      "command": "cd dashboard && npx vitest run tests/unit/fleetDeviceDialog.test.ts",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && npx vitest run",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && npx vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && npx eslint src/components/shell/DeviceDialog.vue src/lib/fleet.ts src/i18n/shell/en.ts src/i18n/shell/fr.ts src/i18n/shell/pt.ts src/i18n/shell/es.ts src/i18n/shell/nl.ts tests/unit/fleetDeviceDialog.test.ts tests/e2e/preview-harness/fleetDeviceRemove.spec.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Given a non-gateway device's dialog, when Remove device… is chosen, then a confirm state states the consequence (services off, node dropped + identity revoked -> re-enrol; data wiped if reachable, else removed-not-erased)": "DeviceDialog.vue: non-gateway summary renders the remove-device-<id> entry; choosing it sets mode=remove-confirm (data-mode) rendering remove-consequence (services/identity/scratch), remove-loses and remove-reachability (wiped/not erased) via deviceDialog.remove.* i18n. Proven by fleetDeviceDialog.test.ts 'choosing Remove device… enters the confirm stating the consequence' + harness shot after-remove-confirm.png",
    "Given the remove confirm, when the operator confirms, then the dialog hands off to provisioning's remove review (remove-device-<id> -> FleetSurface.openRemove), calling no destructive seam itself": "The confirm's primary act fires removeDeviceRoute() ({action:'remove-device-<id>', owner:'provisioning'}); FleetSurface's unchanged setupTargetFromIntent opens the remove review in place (same state openRemove sets); the dialog calls no destructive seam. Proven by fleetDeviceDialog.test.ts 'confirming hands off…' + the FleetSurface mount test (opens review-impact/remove-and-deploy) + harness shot after-handoff-to-provisioning-remove.png",
    "Given the remove confirm, when Cancel is pressed, then nothing is removed": "cancel-remove returns mode to summary, emits no route and no close. Proven by fleetDeviceDialog.test.ts 'Cancel removes nothing and returns to the summary'",
    "Given the gateway device's dialog, then no Remove and no role-change affordance is shown (DDR 0293)": "The Remove entry is gated on !row.isGateway; no change affordance is rendered for the gateway. Proven by fleetDeviceDialog.test.ts 'the gateway's dialog shows no Remove and no role change' + harness shot after-gateway-dialog-no-remove.png"
  },
  "binds": [
    {
      "symbol": "removeDeviceRoute",
      "defined_in": "dashboard/src/lib/fleet.ts"
    }
  ],
  "summary": "The Fleet device dialog's Remove device… entry opens a consequence confirm (P9-D5) and routes into provisioning's existing gated remove review, firing no destructive seam of its own.",
  "blockers": []
}
**close-report** for #2062 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the PR head. PR #2172 (https://git.matou.nz/Matou/idss/pulls/2172) is open and green; a human merges it and the merge closes this issue via `closes #2062` (MERGE_AUTHORITY=human). <details><summary>envelope</summary> ```json { "issue": 2062, "status": "success", "commits": [ "60ac6581e9c779a44bfe1cc27ed244deb9dbaac0" ], "changed_files": [ "STATUS.md", "dashboard/src/components/shell/DeviceDialog.vue", "dashboard/src/i18n/shell/en.ts", "dashboard/src/i18n/shell/es.ts", "dashboard/src/i18n/shell/fr.ts", "dashboard/src/i18n/shell/nl.ts", "dashboard/src/i18n/shell/pt.ts", "dashboard/src/lib/fleet.ts", "dashboard/tests/e2e/preview-harness/fleetDeviceRemove.spec.ts", "dashboard/tests/unit/fleetDeviceDialog.test.ts" ], "tests": [ { "command": "cd dashboard && npx vitest run tests/unit/fleetDeviceDialog.test.ts", "exit_code": 0 }, { "command": "cd dashboard && npx vitest run", "exit_code": 0 }, { "command": "cd dashboard && npx vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "cd dashboard && npx eslint src/components/shell/DeviceDialog.vue src/lib/fleet.ts src/i18n/shell/en.ts src/i18n/shell/fr.ts src/i18n/shell/pt.ts src/i18n/shell/es.ts src/i18n/shell/nl.ts tests/unit/fleetDeviceDialog.test.ts tests/e2e/preview-harness/fleetDeviceRemove.spec.ts", "exit_code": 0 } ], "criteria": { "Given a non-gateway device's dialog, when Remove device… is chosen, then a confirm state states the consequence (services off, node dropped + identity revoked -> re-enrol; data wiped if reachable, else removed-not-erased)": "DeviceDialog.vue: non-gateway summary renders the remove-device-<id> entry; choosing it sets mode=remove-confirm (data-mode) rendering remove-consequence (services/identity/scratch), remove-loses and remove-reachability (wiped/not erased) via deviceDialog.remove.* i18n. Proven by fleetDeviceDialog.test.ts 'choosing Remove device… enters the confirm stating the consequence' + harness shot after-remove-confirm.png", "Given the remove confirm, when the operator confirms, then the dialog hands off to provisioning's remove review (remove-device-<id> -> FleetSurface.openRemove), calling no destructive seam itself": "The confirm's primary act fires removeDeviceRoute() ({action:'remove-device-<id>', owner:'provisioning'}); FleetSurface's unchanged setupTargetFromIntent opens the remove review in place (same state openRemove sets); the dialog calls no destructive seam. Proven by fleetDeviceDialog.test.ts 'confirming hands off…' + the FleetSurface mount test (opens review-impact/remove-and-deploy) + harness shot after-handoff-to-provisioning-remove.png", "Given the remove confirm, when Cancel is pressed, then nothing is removed": "cancel-remove returns mode to summary, emits no route and no close. Proven by fleetDeviceDialog.test.ts 'Cancel removes nothing and returns to the summary'", "Given the gateway device's dialog, then no Remove and no role-change affordance is shown (DDR 0293)": "The Remove entry is gated on !row.isGateway; no change affordance is rendered for the gateway. Proven by fleetDeviceDialog.test.ts 'the gateway's dialog shows no Remove and no role change' + harness shot after-gateway-dialog-no-remove.png" }, "binds": [ { "symbol": "removeDeviceRoute", "defined_in": "dashboard/src/lib/fleet.ts" } ], "summary": "The Fleet device dialog's Remove device… entry opens a consequence confirm (P9-D5) and routes into provisioning's existing gated remove review, firing no destructive seam of its own.", "blockers": [] } ``` </details>
Owner

PR #2172 merged to main (b6d840a8) — closing.

PR #2172 merged to main (b6d840a8) — closing.
ben closed this issue 2026-11-16 17:33:21 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#2062
No description provided.