rehearsal-5 task 7/13: Removal verb + dashboard device setup/removal wiring #848

Closed
opened 2026-08-25 20:14:38 +00:00 by ben · 4 comments
Owner

Part of the #183 phase-5 rehearsal arc (device-add + Nextcloud-on-device on a standing rented community).

  • Spec: docs/superpowers/specs/2026-08-25-183-phase-5-device-nextcloud-rehearsal-design.md
  • Plan: docs/superpowers/plans/2026-08-25-183-phase-5-device-nextcloud-rehearsal.md — this ticket is Task 7, carried verbatim below. The plan's Global Constraints apply to every step.

Task 7: Removal verb + dashboard device setup/removal wiring

Files:

  • Modify: internal/controlapi/provision.go (POST /api/v1/provision/devices/{device_id}/remove), + test
  • Modify: internal/provision/deploy.go (RemoveDevice: LOSES-consented empty-selection deploy + Config().RemoveNode + grant revoke), + test
  • Modify: dashboard/src/components/shell/FleetSurface.vue (route remove-device-<id> to the provisioning surface's remove confirm, not the mint screen), dashboard/src/lib/dashboardNavigator.ts, unit tests
  • Modify: dashboard/src/components/provisioning/SetupSurface.vue + ActiveScreen.vue (a [data-action="remove-device"] on the device's active/change view → S3x LOSES review → [data-action="remove-and-deploy"])
  • Modify: dashboard/src/lib/api/provisionClient.ts (+ generated client regeneration per the repo's openapi script)
  • Modify: STATUS.md

Interfaces:

  • Consumes: Task 6's removal mirror; Task 3's datasets (LOSES speaks); ReviewImpact (impact.go:87-181, already computes Loses + Action: "Remove & deploy").

  • Produces: clicking remove on the device walks S3x ([data-field="review-impact"] with [data-field="loses"] naming "Files & documents" and [data-status="destructive-confirm"][data-action="remove-and-deploy"]), the deploy returns the fleet to gateway-only, the front-door route is gone, the device's grant is revoked. Route + client: provisionClient.removeDevice(deviceId).

  • Step 1: Write the failing Go tests — TestRemoveDevice_EmptySelectionLosesConsentedThenRemovesNode, controlapi route test (202 + snapshot polling like deploy).

  • Step 2: Run → FAIL; implement; → PASS.

  • Step 3: Write the failing dashboard unit test — the remove-device-<id> intent opens the provisioning remove confirm (today's bug: lands on the mint screen — pin the fix).

  • Step 4: Run pnpm --filter dashboard test → FAIL; implement the routing + screens; → PASS; pnpm -r typecheck → PASS.

  • Step 5: Commit — git commit -m "rehearsal-5: device removal goes live — remove verb, LOSES confirm, fleet routing fix (ADR 0209) (task 7 of #<ticket>)".


Global Constraints (from the plan)

  • Nothing fabricated (ADR 0100): every landed fact is read from the box; a
    failure is a named error, never a masked success. No sandbox-green claim (#377).
  • The wipe consent is given at the machine (ADR 0024) and shown-not-re-asked
    at P4-S3x; the takeover runs at provisioning's first deploy, never at join.
  • One placement deploy = device closure + gateway route in one config-repo
    commit, then two single-node clan.Deploy calls, device first (ruling: a
    route to a dead service is the honest failure, a service with no route is
    invisible).
  • Standing community: home test-results/standing-rented/; staleness gate =
    oc_bootstrap_staleness pattern over agent/ go.mod go.sum internal/; the
    reaper stays honest — renewal, not exemption (idss-rental-hold is for
    humans, the executor never sets it).
  • Do not destabilize live drives: #720 (rented confirm loop, elitebook) and
    #721/#722 (workstation) keep running; the prefix extraction (Task 10) is
    behavior-preserving and #720 must stay green across it. Never touch the
    executors' env files from a ticket.
  • Tracker gotcha: labels via POST/DELETE /issues/<n>/labels, never in an
    issue PATCH. "closes #NNN" in commit messages auto-closes — say "task N of
    #NNN" instead.
  • ADR numbers: 0207/0208/0209 assumed — re-check git ls-tree origin/main docs/adr/
    at mint (IDIP + observability swarm lanes are minting concurrently).
  • STATUS.md updated in the same commit as any project-state change;
    git pull --rebase immediately before a STATUS commit (shared checkout).
  • Go: gofmt, go vet ./..., go test ./... green; TS: pnpm -r typecheck +
    unit suites green, pre-land.
Part of the **#183 phase-5 rehearsal arc** (device-add + Nextcloud-on-device on a standing rented community). - Spec: `docs/superpowers/specs/2026-08-25-183-phase-5-device-nextcloud-rehearsal-design.md` - Plan: `docs/superpowers/plans/2026-08-25-183-phase-5-device-nextcloud-rehearsal.md` — this ticket is **Task 7**, carried verbatim below. The plan's Global Constraints apply to every step. --- ### Task 7: Removal verb + dashboard device setup/removal wiring **Files:** - Modify: `internal/controlapi/provision.go` (`POST /api/v1/provision/devices/{device_id}/remove`), + test - Modify: `internal/provision/deploy.go` (`RemoveDevice`: LOSES-consented empty-selection deploy + `Config().RemoveNode` + grant revoke), + test - Modify: `dashboard/src/components/shell/FleetSurface.vue` (route `remove-device-<id>` to the provisioning surface's remove confirm, not the mint screen), `dashboard/src/lib/dashboardNavigator.ts`, unit tests - Modify: `dashboard/src/components/provisioning/SetupSurface.vue` + `ActiveScreen.vue` (a `[data-action="remove-device"]` on the device's active/change view → S3x LOSES review → `[data-action="remove-and-deploy"]`) - Modify: `dashboard/src/lib/api/provisionClient.ts` (+ generated client regeneration per the repo's openapi script) - Modify: `STATUS.md` **Interfaces:** - Consumes: Task 6's removal mirror; Task 3's datasets (LOSES speaks); `ReviewImpact` (`impact.go:87-181`, already computes `Loses` + `Action: "Remove & deploy"`). - Produces: clicking remove on the device walks S3x (`[data-field="review-impact"]` with `[data-field="loses"]` naming "Files & documents" and `[data-status="destructive-confirm"][data-action="remove-and-deploy"]`), the deploy returns the fleet to gateway-only, the front-door route is gone, the device's grant is revoked. Route + client: `provisionClient.removeDevice(deviceId)`. - [ ] **Step 1: Write the failing Go tests** — `TestRemoveDevice_EmptySelectionLosesConsentedThenRemovesNode`, controlapi route test (202 + snapshot polling like deploy). - [ ] **Step 2: Run** → FAIL; **implement**; → PASS. - [ ] **Step 3: Write the failing dashboard unit test** — the `remove-device-<id>` intent opens the provisioning remove confirm (today's bug: lands on the mint screen — pin the fix). - [ ] **Step 4: Run** `pnpm --filter dashboard test` → FAIL; **implement** the routing + screens; → PASS; `pnpm -r typecheck` → PASS. - [ ] **Step 5: Commit** — `git commit -m "rehearsal-5: device removal goes live — remove verb, LOSES confirm, fleet routing fix (ADR 0209) (task 7 of #<ticket>)"`. --- ## Global Constraints (from the plan) - **Nothing fabricated (ADR 0100):** every landed fact is read from the box; a failure is a named error, never a masked success. No sandbox-green claim (#377). - **The wipe consent is given at the machine (ADR 0024)** and shown-not-re-asked at P4-S3x; the takeover runs at provisioning's first deploy, never at join. - **One placement deploy = device closure + gateway route** in one config-repo commit, then two single-node `clan.Deploy` calls, device first (ruling: a route to a dead service is the honest failure, a service with no route is invisible). - **Standing community:** home `test-results/standing-rented/`; staleness gate = `oc_bootstrap_staleness` pattern over `agent/ go.mod go.sum internal/`; the reaper stays honest — renewal, not exemption (`idss-rental-hold` is for humans, the executor never sets it). - **Do not destabilize live drives:** #720 (rented confirm loop, elitebook) and #721/#722 (workstation) keep running; the prefix extraction (Task 10) is behavior-preserving and #720 must stay green across it. Never touch the executors' env files from a ticket. - **Tracker gotcha:** labels via `POST/DELETE /issues/<n>/labels`, never in an issue PATCH. "closes #NNN" in commit messages auto-closes — say "task N of #NNN" instead. - **ADR numbers:** 0207/0208/0209 assumed — re-check `git ls-tree origin/main docs/adr/` at mint (IDIP + observability swarm lanes are minting concurrently). - **STATUS.md** updated in the same commit as any project-state change; `git pull --rebase` immediately before a STATUS commit (shared checkout). - Go: `gofmt`, `go vet ./...`, `go test ./...` green; TS: `pnpm -r typecheck` + unit suites green, pre-land.

ADR numbers ruled at mint — read 0207 → 0208, 0208 → 0209, 0209 → 0210

Task 1 (#842) has landed the phase-5 design tier. This ticket's body carries the
plan's assumed ADR numbers; they shifted by one at mint, exactly as the
Global Constraints line in your body told you to re-check.

assumed ruled ADR
0207 0208 the standing rehearsal community — staleness-gated re-found
0208 0209 device-add's landing goes live — mesh fact, fleet admission, /get
0209 0210 files on a member device — composition, OIDC split, mesh route

Why: docs/adr/0207-design-keri-stack-version-pins.md (#771, the concurrent
IDIP lane) had taken 0207 on origin/main before this arc minted.

Use the ruled numbers in your commit messages and code comments. The plan
(docs/superpowers/plans/2026-08-25-183-phase-5-device-nextcloud-rehearsal.md)
is updated and records the mapping; commit 70a3bce6.

Ruled by agent under ADR 0174 — veto anytime.

## ADR numbers ruled at mint — read 0207 → 0208, 0208 → 0209, 0209 → 0210 Task 1 (#842) has landed the phase-5 design tier. This ticket's body carries the plan's **assumed** ADR numbers; they shifted by one at mint, exactly as the Global Constraints line in your body told you to re-check. | assumed | **ruled** | ADR | |---|---|---| | 0207 | **0208** | the standing rehearsal community — staleness-gated re-found | | 0208 | **0209** | device-add's landing goes live — mesh fact, fleet admission, `/get` | | 0209 | **0210** | files on a member device — composition, OIDC split, mesh route | Why: `docs/adr/0207-design-keri-stack-version-pins.md` (#771, the concurrent IDIP lane) had taken 0207 on `origin/main` before this arc minted. Use the **ruled** numbers in your commit messages and code comments. The plan (`docs/superpowers/plans/2026-08-25-183-phase-5-device-nextcloud-rehearsal.md`) is updated and records the mapping; commit `70a3bce6`. Ruled by agent under ADR 0174 — veto anytime.

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

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

close-report for #848 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit f6eea35311 is not reachable from origin/main (not landed)
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/components/provisioning/ActiveScreen.vue' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/components/provisioning/SetupSurface.vue' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/components/shell/FleetSurface.vue' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/lib/api/generated.ts' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/lib/api/provisionClient.ts' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/lib/fleet.ts' is not in the diff of the claimed commits
  • changed_files: 'dashboard/src/lib/provision.ts' is not in the diff of the claimed commits
  • changed_files: 'dashboard/tests/fakes/provision.ts' is not in the diff of the claimed commits
  • changed_files: 'dashboard/tests/unit/provisionRemoveDevice.test.ts' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/provision.go' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/provision_integration_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/provision/deploy.go' is not in the diff of the claimed commits
  • changed_files: 'internal/provision/deploy_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/provision/provision.go' is not in the diff of the claimed commits
  • changed_files: 'packages/openapi-spec/openapi.yaml' is not in the diff of the claimed commits
envelope
{
  "issue": 848,
  "status": "success",
  "commits": [
    "f6eea353116e22c38e0cc63c8c614d85e2434eb5"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/components/provisioning/ActiveScreen.vue",
    "dashboard/src/components/provisioning/SetupSurface.vue",
    "dashboard/src/components/shell/FleetSurface.vue",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/api/provisionClient.ts",
    "dashboard/src/lib/fleet.ts",
    "dashboard/src/lib/provision.ts",
    "dashboard/tests/fakes/provision.ts",
    "dashboard/tests/unit/provisionRemoveDevice.test.ts",
    "internal/controlapi/provision.go",
    "internal/controlapi/provision_integration_test.go",
    "internal/provision/deploy.go",
    "internal/provision/deploy_test.go",
    "internal/provision/provision.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "go test ./internal/provision/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "go build ./internal/... && go vet ./internal/provision/... ./internal/controlapi/... ./control-plane/...",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/provision/ internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && pnpm vitest run",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && pnpm exec vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Removal verb: LOSES-consented empty-selection deploy + Config().RemoveNode + grant revoke": "internal/provision/deploy.go Orchestrator.RemoveDevice (empty-selection deploy runs task 6's removal mirror, then RemoveNode + the GrantRevoker seam); proven by TestRemoveDevice_EmptySelectionLosesConsentedThenRemovesNode (deploy_test.go) — asserts the removal mirror ran, RemoveNode committed, grant revoked; TestRemoveDevice_ADeployFailureOffboardsNothing pins ADR 0100 (a failed deploy offboards nothing).",
    "Route POST /api/v1/provision/devices/{device_id}/remove (202 + snapshot polling like deploy)": "internal/controlapi/provision.go remove route (202 + deployHandle, reuses the deployRunStore snapshot); proven by TestProvisionHandler_RemoveDeviceStartsAndSnapshotSettles.",
    "provisionClient.removeDevice(deviceId) + generated client regeneration": "dashboard/src/lib/api/provisionClient.ts removeDevice (poll-to-completion); packages/openapi-spec/openapi.yaml postProvisionRemoveDevice; dashboard/src/lib/api/generated.ts regenerated (generate-client.mjs --check in sync).",
    "FleetSurface routes remove-device-<id> to the provisioning remove confirm, not the mint screen": "dashboard/src/components/shell/FleetSurface.vue openRemove + dashboard/src/lib/fleet.ts setupTargetFromIntent recognises remove-device-<id>; proven by provisionRemoveDevice.test.ts 'routes remove-device to the S3x LOSES confirm in place' (device-add-drill-in absent, review-impact/remove-and-deploy present, no device-add route emitted).",
    "Clicking remove walks S3x: [data-field=review-impact] with [data-field=loses] naming 'Files & documents' and [data-status=destructive-confirm][data-action=remove-and-deploy]": "dashboard/src/components/provisioning/SetupSurface.vue remove prop + onRemoveDevice (empty-selection reviewImpact → ReviewImpactScreen LOSES); dashboard/src/components/provisioning/ActiveScreen.vue [data-action=remove-device]; proven by provisionRemoveDevice.test.ts (review names Files & documents, remove-and-deploy is destructive-confirm, Active affordance emits, confirm drives removeDevice).",
    "The deploy returns the fleet to gateway-only, the front-door route is gone": "internal/provision/deploy.go RemoveDevice empty-selection deploy runs detachMemberFilesPlacement (task 6 mirror) — front door rewritten with no files route, two-node apply device-first; asserted in TestRemoveDevice_EmptySelectionLosesConsentedThenRemovesNode (AttachFrontDoorCalls carries 0 services, deploy order [totara, karaka])."
  },
  "summary": "Device removal is a live end-to-end slice: the RemoveDevice verb (empty-selection deploy → RemoveNode → grant-revoke seam), the 202 remove route, the S3x LOSES dashboard confirm, and the FleetSurface routing fix.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #848 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit f6eea353116e22c38e0cc63c8c614d85e2434eb5 is not reachable from origin/main (not landed) - changed_files: 'STATUS.md' is not in the diff of the claimed commits - changed_files: 'dashboard/src/components/provisioning/ActiveScreen.vue' is not in the diff of the claimed commits - changed_files: 'dashboard/src/components/provisioning/SetupSurface.vue' is not in the diff of the claimed commits - changed_files: 'dashboard/src/components/shell/FleetSurface.vue' is not in the diff of the claimed commits - changed_files: 'dashboard/src/lib/api/generated.ts' is not in the diff of the claimed commits - changed_files: 'dashboard/src/lib/api/provisionClient.ts' is not in the diff of the claimed commits - changed_files: 'dashboard/src/lib/fleet.ts' is not in the diff of the claimed commits - changed_files: 'dashboard/src/lib/provision.ts' is not in the diff of the claimed commits - changed_files: 'dashboard/tests/fakes/provision.ts' is not in the diff of the claimed commits - changed_files: 'dashboard/tests/unit/provisionRemoveDevice.test.ts' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/provision.go' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/provision_integration_test.go' is not in the diff of the claimed commits - changed_files: 'internal/provision/deploy.go' is not in the diff of the claimed commits - changed_files: 'internal/provision/deploy_test.go' is not in the diff of the claimed commits - changed_files: 'internal/provision/provision.go' is not in the diff of the claimed commits - changed_files: 'packages/openapi-spec/openapi.yaml' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 848, "status": "success", "commits": [ "f6eea353116e22c38e0cc63c8c614d85e2434eb5" ], "changed_files": [ "STATUS.md", "dashboard/src/components/provisioning/ActiveScreen.vue", "dashboard/src/components/provisioning/SetupSurface.vue", "dashboard/src/components/shell/FleetSurface.vue", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/api/provisionClient.ts", "dashboard/src/lib/fleet.ts", "dashboard/src/lib/provision.ts", "dashboard/tests/fakes/provision.ts", "dashboard/tests/unit/provisionRemoveDevice.test.ts", "internal/controlapi/provision.go", "internal/controlapi/provision_integration_test.go", "internal/provision/deploy.go", "internal/provision/deploy_test.go", "internal/provision/provision.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "go test ./internal/provision/ ./internal/controlapi/", "exit_code": 0 }, { "command": "go build ./internal/... && go vet ./internal/provision/... ./internal/controlapi/... ./control-plane/...", "exit_code": 0 }, { "command": "gofmt -l internal/provision/ internal/controlapi/", "exit_code": 0 }, { "command": "cd dashboard && pnpm vitest run", "exit_code": 0 }, { "command": "cd dashboard && pnpm exec vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 } ], "criteria": { "Removal verb: LOSES-consented empty-selection deploy + Config().RemoveNode + grant revoke": "internal/provision/deploy.go Orchestrator.RemoveDevice (empty-selection deploy runs task 6's removal mirror, then RemoveNode + the GrantRevoker seam); proven by TestRemoveDevice_EmptySelectionLosesConsentedThenRemovesNode (deploy_test.go) — asserts the removal mirror ran, RemoveNode committed, grant revoked; TestRemoveDevice_ADeployFailureOffboardsNothing pins ADR 0100 (a failed deploy offboards nothing).", "Route POST /api/v1/provision/devices/{device_id}/remove (202 + snapshot polling like deploy)": "internal/controlapi/provision.go remove route (202 + deployHandle, reuses the deployRunStore snapshot); proven by TestProvisionHandler_RemoveDeviceStartsAndSnapshotSettles.", "provisionClient.removeDevice(deviceId) + generated client regeneration": "dashboard/src/lib/api/provisionClient.ts removeDevice (poll-to-completion); packages/openapi-spec/openapi.yaml postProvisionRemoveDevice; dashboard/src/lib/api/generated.ts regenerated (generate-client.mjs --check in sync).", "FleetSurface routes remove-device-<id> to the provisioning remove confirm, not the mint screen": "dashboard/src/components/shell/FleetSurface.vue openRemove + dashboard/src/lib/fleet.ts setupTargetFromIntent recognises remove-device-<id>; proven by provisionRemoveDevice.test.ts 'routes remove-device to the S3x LOSES confirm in place' (device-add-drill-in absent, review-impact/remove-and-deploy present, no device-add route emitted).", "Clicking remove walks S3x: [data-field=review-impact] with [data-field=loses] naming 'Files & documents' and [data-status=destructive-confirm][data-action=remove-and-deploy]": "dashboard/src/components/provisioning/SetupSurface.vue remove prop + onRemoveDevice (empty-selection reviewImpact → ReviewImpactScreen LOSES); dashboard/src/components/provisioning/ActiveScreen.vue [data-action=remove-device]; proven by provisionRemoveDevice.test.ts (review names Files & documents, remove-and-deploy is destructive-confirm, Active affordance emits, confirm drives removeDevice).", "The deploy returns the fleet to gateway-only, the front-door route is gone": "internal/provision/deploy.go RemoveDevice empty-selection deploy runs detachMemberFilesPlacement (task 6 mirror) — front door rewritten with no files route, two-node apply device-first; asserted in TestRemoveDevice_EmptySelectionLosesConsentedThenRemovesNode (AttachFrontDoorCalls carries 0 services, deploy order [totara, karaka])." }, "summary": "Device removal is a live end-to-end slice: the RemoveDevice verb (empty-selection deploy → RemoveNode → grant-revoke seam), the 202 remove route, the S3x LOSES dashboard confirm, and the FleetSurface routing fix.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>

close-report for #848 — status success

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

envelope
{
  "issue": 848,
  "status": "success",
  "commits": [
    "f6eea353116e22c38e0cc63c8c614d85e2434eb5"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/components/provisioning/ActiveScreen.vue",
    "dashboard/src/components/provisioning/SetupSurface.vue",
    "dashboard/src/components/shell/FleetSurface.vue",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/api/provisionClient.ts",
    "dashboard/src/lib/fleet.ts",
    "dashboard/src/lib/provision.ts",
    "dashboard/tests/fakes/provision.ts",
    "dashboard/tests/unit/provisionRemoveDevice.test.ts",
    "internal/controlapi/provision.go",
    "internal/controlapi/provision_integration_test.go",
    "internal/provision/deploy.go",
    "internal/provision/deploy_test.go",
    "internal/provision/provision.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "go test ./internal/provision/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "go build ./internal/... && go vet ./internal/provision/... ./internal/controlapi/... ./control-plane/...",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/provision/ internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && pnpm vitest run",
      "exit_code": 0
    },
    {
      "command": "cd dashboard && pnpm exec vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Removal verb: LOSES-consented empty-selection deploy + Config().RemoveNode + grant revoke": "internal/provision/deploy.go Orchestrator.RemoveDevice (empty-selection deploy runs task 6's removal mirror, then RemoveNode + the GrantRevoker seam); proven by TestRemoveDevice_EmptySelectionLosesConsentedThenRemovesNode (deploy_test.go) — asserts the removal mirror ran, RemoveNode committed, grant revoked; TestRemoveDevice_ADeployFailureOffboardsNothing pins ADR 0100 (a failed deploy offboards nothing).",
    "Route POST /api/v1/provision/devices/{device_id}/remove (202 + snapshot polling like deploy)": "internal/controlapi/provision.go remove route (202 + deployHandle, reuses the deployRunStore snapshot); proven by TestProvisionHandler_RemoveDeviceStartsAndSnapshotSettles.",
    "provisionClient.removeDevice(deviceId) + generated client regeneration": "dashboard/src/lib/api/provisionClient.ts removeDevice (poll-to-completion); packages/openapi-spec/openapi.yaml postProvisionRemoveDevice; dashboard/src/lib/api/generated.ts regenerated (generate-client.mjs --check in sync).",
    "FleetSurface routes remove-device-<id> to the provisioning remove confirm, not the mint screen": "dashboard/src/components/shell/FleetSurface.vue openRemove + dashboard/src/lib/fleet.ts setupTargetFromIntent recognises remove-device-<id>; proven by provisionRemoveDevice.test.ts 'routes remove-device to the S3x LOSES confirm in place' (device-add-drill-in absent, review-impact/remove-and-deploy present, no device-add route emitted).",
    "Clicking remove walks S3x: [data-field=review-impact] with [data-field=loses] naming 'Files & documents' and [data-status=destructive-confirm][data-action=remove-and-deploy]": "dashboard/src/components/provisioning/SetupSurface.vue remove prop + onRemoveDevice (empty-selection reviewImpact → ReviewImpactScreen LOSES); dashboard/src/components/provisioning/ActiveScreen.vue [data-action=remove-device]; proven by provisionRemoveDevice.test.ts (review names Files & documents, remove-and-deploy is destructive-confirm, Active affordance emits, confirm drives removeDevice).",
    "The deploy returns the fleet to gateway-only, the front-door route is gone": "internal/provision/deploy.go RemoveDevice empty-selection deploy runs detachMemberFilesPlacement (task 6 mirror) — front door rewritten with no files route, two-node apply device-first; asserted in TestRemoveDevice_EmptySelectionLosesConsentedThenRemovesNode (AttachFrontDoorCalls carries 0 services, deploy order [totara, karaka])."
  },
  "summary": "Device removal is a live end-to-end slice: the RemoveDevice verb (empty-selection deploy → RemoveNode → grant-revoke seam), the 202 remove route, the S3x LOSES dashboard confirm, and the FleetSurface routing fix.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #848 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 848, "status": "success", "commits": [ "f6eea353116e22c38e0cc63c8c614d85e2434eb5" ], "changed_files": [ "STATUS.md", "dashboard/src/components/provisioning/ActiveScreen.vue", "dashboard/src/components/provisioning/SetupSurface.vue", "dashboard/src/components/shell/FleetSurface.vue", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/api/provisionClient.ts", "dashboard/src/lib/fleet.ts", "dashboard/src/lib/provision.ts", "dashboard/tests/fakes/provision.ts", "dashboard/tests/unit/provisionRemoveDevice.test.ts", "internal/controlapi/provision.go", "internal/controlapi/provision_integration_test.go", "internal/provision/deploy.go", "internal/provision/deploy_test.go", "internal/provision/provision.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "go test ./internal/provision/ ./internal/controlapi/", "exit_code": 0 }, { "command": "go build ./internal/... && go vet ./internal/provision/... ./internal/controlapi/... ./control-plane/...", "exit_code": 0 }, { "command": "gofmt -l internal/provision/ internal/controlapi/", "exit_code": 0 }, { "command": "cd dashboard && pnpm vitest run", "exit_code": 0 }, { "command": "cd dashboard && pnpm exec vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 } ], "criteria": { "Removal verb: LOSES-consented empty-selection deploy + Config().RemoveNode + grant revoke": "internal/provision/deploy.go Orchestrator.RemoveDevice (empty-selection deploy runs task 6's removal mirror, then RemoveNode + the GrantRevoker seam); proven by TestRemoveDevice_EmptySelectionLosesConsentedThenRemovesNode (deploy_test.go) — asserts the removal mirror ran, RemoveNode committed, grant revoked; TestRemoveDevice_ADeployFailureOffboardsNothing pins ADR 0100 (a failed deploy offboards nothing).", "Route POST /api/v1/provision/devices/{device_id}/remove (202 + snapshot polling like deploy)": "internal/controlapi/provision.go remove route (202 + deployHandle, reuses the deployRunStore snapshot); proven by TestProvisionHandler_RemoveDeviceStartsAndSnapshotSettles.", "provisionClient.removeDevice(deviceId) + generated client regeneration": "dashboard/src/lib/api/provisionClient.ts removeDevice (poll-to-completion); packages/openapi-spec/openapi.yaml postProvisionRemoveDevice; dashboard/src/lib/api/generated.ts regenerated (generate-client.mjs --check in sync).", "FleetSurface routes remove-device-<id> to the provisioning remove confirm, not the mint screen": "dashboard/src/components/shell/FleetSurface.vue openRemove + dashboard/src/lib/fleet.ts setupTargetFromIntent recognises remove-device-<id>; proven by provisionRemoveDevice.test.ts 'routes remove-device to the S3x LOSES confirm in place' (device-add-drill-in absent, review-impact/remove-and-deploy present, no device-add route emitted).", "Clicking remove walks S3x: [data-field=review-impact] with [data-field=loses] naming 'Files & documents' and [data-status=destructive-confirm][data-action=remove-and-deploy]": "dashboard/src/components/provisioning/SetupSurface.vue remove prop + onRemoveDevice (empty-selection reviewImpact → ReviewImpactScreen LOSES); dashboard/src/components/provisioning/ActiveScreen.vue [data-action=remove-device]; proven by provisionRemoveDevice.test.ts (review names Files & documents, remove-and-deploy is destructive-confirm, Active affordance emits, confirm drives removeDevice).", "The deploy returns the fleet to gateway-only, the front-door route is gone": "internal/provision/deploy.go RemoveDevice empty-selection deploy runs detachMemberFilesPlacement (task 6 mirror) — front door rewritten with no files route, two-node apply device-first; asserted in TestRemoveDevice_EmptySelectionLosesConsentedThenRemovesNode (AttachFrontDoorCalls carries 0 services, deploy order [totara, karaka])." }, "summary": "Device removal is a live end-to-end slice: the RemoveDevice verb (empty-selection deploy → RemoveNode → grant-revoke seam), the 202 remove route, the S3x LOSES dashboard confirm, and the FleetSurface routing fix.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
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#848
No description provided.