standing: removal review of a service-less node offers plain Deploy, no remove-and-deploy #1113

Closed
opened 2026-09-01 08:50:15 +00:00 by matou-build-agent · 4 comments

The failure

Drive 20260901T083610Z (commit 1d239200, target device) is red at its first leg, standing, 39.3 s in. artifacts/verdict.json:

{"verdict":"red","firstRedLeg":"standing","legs":{"total":1,"green":0,"red":1,"skip":0}}

artifacts/legs.json carries the one record:

the removal review offers no remove-and-deploy confirm
Locator: locator('[data-field="review-impact"]').locator('[data-action="remove-and-deploy"]')
Expected: visible
Timeout: 30000ms
Error: element(s) not found

artifacts/journey.json holds the same single row and the same fault — this drive reuses the standing rented community, so it has no founding rows of its own.

This is not the KNOWN frontier. The pairing/own-VPS-carrier red is reached later in the journey; here skip: 0 and legs.json carries no skip reasons at all. The drive died in its opening baseline, before pairing was ever attempted. This is a new red sitting in front of the known one.

Where it died

The embedded test source in artifacts/journey.device-device-add--809eb-e-standing-rented-community/error-context.md puts the throw at confirmRemoveDeploy(page, { requireFiles: false }), line 275 — the branch whose own comment says it is not a product assertion:

// Best-effort baseline restore — the standing walk-off (assertFleetGatewayOnly)
// and the afterAll landed-node cleanup (#1044), NOT a product assertion. ...
// the removal is classified `remove-and-deploy` whether or not it
// destroys a last copy, so that action alone is the confirm to click.
const confirm = impact.locator('[data-action="remove-and-deploy"]');

So: the standing baseline found a stray fleet row, node-req-0003, drilled in, clicked remove — and the review it landed on was not a removal review.

The evidence that shows it

The review screen did render; it just classified the change as an additive LOAD. error-context.md page snapshot at the moment of failure:

- button "← Fleet"
- text: Review impact — node-req-0003 LOAD ~0 GB of node-req-0003's 3 GB in steady state
- button "Back"
- button "Deploy"

artifacts/legs/standing-dash.png shows the same thing pixel-side: heading "Review impact — node-req-0003", one LOAD row reading ~0 GB of node-req-0003's 3 GB in steady state, no ⚠ LOSES row, and an ordinary teal "Deploy" button beside "Back". No destructive styling anywhere on the screen.

A removal of a device that holds nothing therefore diffs to nothing removed, and the impact seam falls through to the non-destructive default — destructive: false, action Deploy, rendered as data-action="deploy". The seam is never told the review is a removal; it infers destructiveness purely from the selection diff, and an empty-selection device has no diff to read.

logs/healer-claude.out (this run's healer, which had the trace open) quotes the wire exchange behind that screen:

POST /api/v1/provision/impact
  {"device_id":"node-req-0003","role":"helper","selected":[]}
-> {"device_id":"node-req-0003","load":"~0 GB of node-req-0003's 3 GB in steady state",
    "destructive":false,"action":"Deploy"}

and names internal/provision/impact.go:168-176 (imp.Destructive = imp.Erases != nil || len(imp.Loses) > 0) as the classifying lines. I could not open trace.zip myself — unzip/python3 are outside this session's sandbox, and repo source outside the run directory is not readable to me — so treat those two file:line claims as the healer's, not independently re-derived here. The rendered page above is a byte-for-byte match to that response, so the substance is corroborated by evidence I did read.

The healer additionally reports (source-level, unverified from inside the run directory) that SetupSurface.vue:321 branches its confirm on removing, not on the impact's action — meaning the plain, non-danger "Deploy" button on this screen still drives POST /api/v1/provision/devices/{id}/remove. If that holds, the operator-facing hazard is worse than the test red: a destructive act behind an ordinary-looking button, which is what ADR 0060 exists to prevent. Confirm this against the source before writing the ADR 0060 line into a ticket.

Suspected layer

Product, at the provision impact seam — not the harness and not infra.

  • The UI is faithful: it renders exactly the classification the seam returned (ADR 0060 puts destructiveness computation in the seam, not the view).
  • The harness assertion is correct and is doing its job: the walk-off asserts the contract ADR 0210 ruling 5 states — a removal lands on the S3x remove-and-deploy confirm regardless of whether it drops a last copy.
  • Infra is clean. logs/device-do-forensics.txt shows droplet 596847115 created 08:38:55 and answering: 3 packets transmitted, 3 received, 0% packet loss and tcp/22: a FRESH connect succeeded. logs/device-stall.txt shows it up 1 min, 75 G free, no stall.

There is a harness-visible consequence worth carrying in the ticket: the #1044 afterAll landed-node cleanup and assertFleetGatewayOnly both walk off through this same confirm. A drive that leaves a service-less node behind can never clean it up, so the stray is permanent and every subsequent standing-rented drive reds at standing — ahead of the known pairing frontier. That is why this is blocking rather than cosmetic.

What plugging it needs

Thread removal intent to the seam so it can classify; the view needs no new design (the P4-S3x wireframe already draws remove-and-deploy).

  1. ProvisionSelectionRequest in packages/openapi-spec/openapi.yaml — add optional removing: boolean. Note this body is shared by /provision/impact and /provision/deploy; a dedicated POST /provision/devices/{id}/remove/review is the alternative if sharing is unwanted.
  2. Regenerate the client (ADR 0037 — dashboard/src/lib/api/generated.ts is generated, do not hand-edit).
  3. Carry the flag through internal/controlapi/provision.go (selectionBody/selectionFrom) into provision.SetupSelection.
  4. internal/provision/impact.go — add Removing bool; when set, force Destructive = true and Action = "Remove & deploy", leaving the ⚠ LOSES rows as computed (present when a last copy really dies, absent when it does not).
  5. Dashboard provisionClient.ts / SetupSurface.onRemoveDevice — send removing: true. Separately, re-point the confirm branch at the impact's action rather than local removing state, so no path can ever run a removal behind a non-destructive button.
  6. Regression cover: a Go ReviewImpact case for a zero-assignment device under Removing: true, and a dashboard case driven off a seam-computed impact rather than the hard-coded REMOVE_DEVICE_IMPACT fixture (a fixture that pre-asserts destructive: true is why this never showed in unit tests).

One design touchpoint to flag, not a blocker: ADR 0060 words the S3x promotion as carrying a ⚠ row naming which destruction, and removing a device that holds nothing names none. Step 4 promotes the screen with no ⚠ row in that case. If the ruling is that a removal must always name what it destroys ("node-req-0003 leaves the community"), that is a new ⚠ trigger and wants a wireframe update — label needs-design then. The classification fix itself needs no ruling to proceed.

On the live box, and what is absent

No live-box access section was appended to this prompt, so I asked no machine anything and diagnosed from harvested records alone. It would not have helped here regardless: the failing surface is the standing-rented gateway's control plane and dashboard, not the device droplet the drive stood up. That droplet's own harvest confirms it was never deployed to — logs/device-units.txt shows only sshd and systemd-resolve listening, nginx/phpfpm-nextcloud/keria "could not be found", journalctl "-- No entries --" — exactly what a box looks like when the drive redded in its baseline before touching it.

Absent or empty, for the record:

  • logs/droplet-journal.txt does not exist — this harness names the droplet journal logs/device-journal.txt (136 KB). It holds no IDSS or control-plane lines (grep for provision/impact, node-req, control-plane, idss returns nothing) — it is a bare Ubuntu boot log.
  • logs/helper.log is 0 bytes; logs/guest-*.log are all misses (no idss-guest.service unit file, no user bus, "-- No entries --"); logs/qemu.log and host.json both record qemu-system-x86_64 ENOENT — expected, this drive ran payloadMode: /home/swarm/swarm/rehearsal-payload, not a VM.
  • logs/state-logs.log: ERROR: no state logs directory at .../standing-rented/state/logs.
  • logs/broker-journal.txt: dev@100.98.48.68: Permission denied (publickey) — an off-mesh executor harvests no broker journal by design (ADR 0208, #681); the verdict does not depend on it.
  • founding-state.log is the standing community's snapshot and names only node-req-0001 (the gateway). node-req-0003 appears nowhere in the harvested logs — it lives in the control plane's fleet ledger, so the only in-run records of it are the rendered screen, the a11y snapshot, and the trace.

drive 20260901T083610Z red at standing: the removal review offers no remove-and-deploy confirm expect(locator).toBeVisible() failed Locator: locator('[data-field="review-impact"]').locator('[data-action="remove-and-deploy"]') Expected: visi
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260901T083610Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure Drive `20260901T083610Z` (commit `1d239200`, target `device`) is **red at its first leg, `standing`**, 39.3 s in. `artifacts/verdict.json`: ```json {"verdict":"red","firstRedLeg":"standing","legs":{"total":1,"green":0,"red":1,"skip":0}} ``` `artifacts/legs.json` carries the one record: ``` the removal review offers no remove-and-deploy confirm Locator: locator('[data-field="review-impact"]').locator('[data-action="remove-and-deploy"]') Expected: visible Timeout: 30000ms Error: element(s) not found ``` `artifacts/journey.json` holds the same single row and the same `fault` — this drive reuses the standing rented community, so it has no founding rows of its own. **This is not the KNOWN frontier.** The pairing/own-VPS-carrier red is reached later in the journey; here `skip: 0` and `legs.json` carries **no skip reasons at all**. The drive died in its opening baseline, before pairing was ever attempted. This is a new red sitting *in front of* the known one. ## Where it died The embedded test source in `artifacts/journey.device-device-add--809eb-e-standing-rented-community/error-context.md` puts the throw at `confirmRemoveDeploy(page, { requireFiles: false })`, line 275 — the branch whose own comment says it is not a product assertion: ``` // Best-effort baseline restore — the standing walk-off (assertFleetGatewayOnly) // and the afterAll landed-node cleanup (#1044), NOT a product assertion. ... // the removal is classified `remove-and-deploy` whether or not it // destroys a last copy, so that action alone is the confirm to click. const confirm = impact.locator('[data-action="remove-and-deploy"]'); ``` So: the standing baseline found a stray fleet row, `node-req-0003`, drilled in, clicked remove — and the review it landed on was not a removal review. ## The evidence that shows it The review screen **did** render; it just classified the change as an additive LOAD. `error-context.md` page snapshot at the moment of failure: ```yaml - button "← Fleet" - text: Review impact — node-req-0003 LOAD ~0 GB of node-req-0003's 3 GB in steady state - button "Back" - button "Deploy" ``` `artifacts/legs/standing-dash.png` shows the same thing pixel-side: heading "Review impact — node-req-0003", one `LOAD` row reading `~0 GB of node-req-0003's 3 GB in steady state`, **no ⚠ LOSES row**, and an ordinary teal **"Deploy"** button beside "Back". No destructive styling anywhere on the screen. A removal of a device that holds nothing therefore diffs to nothing removed, and the impact seam falls through to the non-destructive default — `destructive: false`, action `Deploy`, rendered as `data-action="deploy"`. The seam is never told the review *is* a removal; it infers destructiveness purely from the selection diff, and an empty-selection device has no diff to read. `logs/healer-claude.out` (this run's healer, which had the trace open) quotes the wire exchange behind that screen: ``` POST /api/v1/provision/impact {"device_id":"node-req-0003","role":"helper","selected":[]} -> {"device_id":"node-req-0003","load":"~0 GB of node-req-0003's 3 GB in steady state", "destructive":false,"action":"Deploy"} ``` and names `internal/provision/impact.go:168-176` (`imp.Destructive = imp.Erases != nil || len(imp.Loses) > 0`) as the classifying lines. **I could not open `trace.zip` myself** — `unzip`/`python3` are outside this session's sandbox, and repo source outside the run directory is not readable to me — so treat those two file:line claims as the healer's, not independently re-derived here. The rendered page above is a byte-for-byte match to that response, so the substance is corroborated by evidence I did read. The healer additionally reports (source-level, **unverified from inside the run directory**) that `SetupSurface.vue:321` branches its confirm on `removing`, not on the impact's action — meaning the plain, non-danger "Deploy" button on this screen still drives `POST /api/v1/provision/devices/{id}/remove`. If that holds, the operator-facing hazard is worse than the test red: a destructive act behind an ordinary-looking button, which is what ADR 0060 exists to prevent. **Confirm this against the source before writing the ADR 0060 line into a ticket.** ## Suspected layer **Product**, at the `provision` impact seam — not the harness and not infra. - The UI is faithful: it renders exactly the classification the seam returned (ADR 0060 puts destructiveness computation in the seam, not the view). - The harness assertion is correct and is doing its job: the walk-off asserts the contract ADR 0210 ruling 5 states — a removal lands on the S3x `remove-and-deploy` confirm regardless of whether it drops a last copy. - Infra is clean. `logs/device-do-forensics.txt` shows droplet `596847115` created 08:38:55 and answering: `3 packets transmitted, 3 received, 0% packet loss` and `tcp/22: a FRESH connect succeeded`. `logs/device-stall.txt` shows it `up 1 min`, 75 G free, no stall. There is a **harness-visible consequence** worth carrying in the ticket: the #1044 `afterAll` landed-node cleanup and `assertFleetGatewayOnly` both walk off through this same confirm. A drive that leaves a service-less node behind can never clean it up, so the stray is permanent and **every subsequent standing-rented drive reds at `standing`** — ahead of the known pairing frontier. That is why this is blocking rather than cosmetic. ## What plugging it needs Thread removal intent to the seam so it can classify; the view needs no new design (the P4-S3x wireframe already draws `remove-and-deploy`). 1. `ProvisionSelectionRequest` in `packages/openapi-spec/openapi.yaml` — add optional `removing: boolean`. Note this body is shared by `/provision/impact` and `/provision/deploy`; a dedicated `POST /provision/devices/{id}/remove/review` is the alternative if sharing is unwanted. 2. Regenerate the client (ADR 0037 — `dashboard/src/lib/api/generated.ts` is generated, do not hand-edit). 3. Carry the flag through `internal/controlapi/provision.go` (`selectionBody`/`selectionFrom`) into `provision.SetupSelection`. 4. `internal/provision/impact.go` — add `Removing bool`; when set, force `Destructive = true` and `Action = "Remove & deploy"`, leaving the ⚠ LOSES rows as computed (present when a last copy really dies, absent when it does not). 5. Dashboard `provisionClient.ts` / `SetupSurface.onRemoveDevice` — send `removing: true`. Separately, re-point the confirm branch at the impact's action rather than local `removing` state, so no path can ever run a removal behind a non-destructive button. 6. Regression cover: a Go `ReviewImpact` case for a **zero-assignment device under `Removing: true`**, and a dashboard case driven off a seam-computed impact rather than the hard-coded `REMOVE_DEVICE_IMPACT` fixture (a fixture that pre-asserts `destructive: true` is why this never showed in unit tests). One design touchpoint to flag, **not a blocker**: ADR 0060 words the S3x promotion as carrying a ⚠ row naming *which* destruction, and removing a device that holds nothing names none. Step 4 promotes the screen with no ⚠ row in that case. If the ruling is that a removal must always name what it destroys ("node-req-0003 leaves the community"), that is a new ⚠ trigger and wants a wireframe update — label `needs-design` then. The classification fix itself needs no ruling to proceed. ## On the live box, and what is absent **No live-box access section was appended to this prompt**, so I asked no machine anything and diagnosed from harvested records alone. It would not have helped here regardless: the failing surface is the standing-rented gateway's control plane and dashboard, not the device droplet the drive stood up. That droplet's own harvest confirms it was never deployed to — `logs/device-units.txt` shows only `sshd` and `systemd-resolve` listening, `nginx`/`phpfpm-nextcloud`/`keria` "could not be found", `journalctl` "-- No entries --" — exactly what a box looks like when the drive redded in its baseline before touching it. Absent or empty, for the record: - **`logs/droplet-journal.txt` does not exist** — this harness names the droplet journal `logs/device-journal.txt` (136 KB). It holds no IDSS or control-plane lines (grep for `provision/impact`, `node-req`, `control-plane`, `idss` returns nothing) — it is a bare Ubuntu boot log. - `logs/helper.log` is **0 bytes**; `logs/guest-*.log` are all misses (no `idss-guest.service` unit file, no user bus, "-- No entries --"); `logs/qemu.log` and `host.json` both record `qemu-system-x86_64 ENOENT` — expected, this drive ran `payloadMode: /home/swarm/swarm/rehearsal-payload`, not a VM. - `logs/state-logs.log`: `ERROR: no state logs directory at .../standing-rented/state/logs`. - `logs/broker-journal.txt`: `dev@100.98.48.68: Permission denied (publickey)` — an off-mesh executor harvests no broker journal by design (ADR 0208, #681); the verdict does not depend on it. - `founding-state.log` is the standing community's snapshot and names only `node-req-0001` (the gateway). `node-req-0003` appears nowhere in the harvested logs — it lives in the control plane's fleet ledger, so the only in-run records of it are the rendered screen, the a11y snapshot, and the trace. drive `20260901T083610Z` red at `standing`: `the removal review offers no remove-and-deploy confirm expect(locator).toBeVisible() failed Locator: locator('[data-field="review-impact"]').locator('[data-action="remove-and-deploy"]') Expected: visi` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260901T083610Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 25304f657c24 -->
Author
Member

swarm-claim host=matou-dev-server-01 run=15747
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=15747 (automated multi-host claim — lowest live claim id works this ticket)
Owner

Already fixed — closing as a duplicate of #1112, fixed in 821d2fbc (confirmAnyDeploy), which the swarm landed while this report was being written.

Same diagnosis, and your evidence is the better half of it: the page snapshot and standing-dash.png showing the review rendering LOAD ~0 GB of node-req-0003's 3 GB, no ⚠ LOSES row, an ordinary teal "Deploy" settle it beyond argument. The seam is behaving correctly — internal/provision/impact.go:168-175 only classifies Remove & deploy when len(imp.Loses) > 0, and a stray that never received a placement (drive 20260901T064809Z red at deploy-takeover, which is where placement happens) removes nothing, so the honest action is Deploy.

One thing your report surfaced that is worth keeping after the fix: the comment at deviceProvision.ts:275 asserted

"the removal is classified remove-and-deploy whether or not it destroys a last copy, so that action alone is the confirm to click"

which is simply not what the seam does. A wrong comment stating the invariant the code then relied on — the same family as the last several reds in this arc (a check trusting something it never verified). 821d2fbc removes it along with the assumption.

The fix also splits the two callers properly, which is better than what #1112 proposed: the baseline restore takes confirmAnyDeploy (accepts whichever of the three confirms the review offers, logs which), while confirmRemoveDeploy becomes stricter — its requireFiles escape hatch is gone, so leg 13's product contract must name Files in the LOSES row. The lenient path is now only where leniency belongs.

No action needed here; #854's next cycle drives with it aboard.

Already fixed — closing as a duplicate of #1112, fixed in `821d2fbc` (`confirmAnyDeploy`), which the swarm landed while this report was being written. Same diagnosis, and your evidence is the better half of it: the page snapshot and `standing-dash.png` showing the review rendering **`LOAD ~0 GB of node-req-0003's 3 GB`, no ⚠ LOSES row, an ordinary teal "Deploy"** settle it beyond argument. The seam is behaving correctly — `internal/provision/impact.go:168-175` only classifies `Remove & deploy` when `len(imp.Loses) > 0`, and a stray that never received a placement (drive `20260901T064809Z` red *at* `deploy-takeover`, which is where placement happens) removes nothing, so the honest action is `Deploy`. One thing your report surfaced that is worth keeping after the fix: the comment at `deviceProvision.ts:275` asserted > *"the removal is classified `remove-and-deploy` whether or not it destroys a last copy, so that action alone is the confirm to click"* which is simply not what the seam does. A wrong comment stating the invariant the code then relied on — the same family as the last several reds in this arc (a check trusting something it never verified). `821d2fbc` removes it along with the assumption. The fix also splits the two callers properly, which is better than what #1112 proposed: the baseline restore takes `confirmAnyDeploy` (accepts whichever of the three confirms the review offers, logs which), while `confirmRemoveDeploy` becomes *stricter* — its `requireFiles` escape hatch is gone, so leg 13's product contract must name Files in the LOSES row. The lenient path is now only where leniency belongs. No action needed here; #854's next cycle drives with it aboard.
ben closed this issue 2026-09-01 08:52:42 +00:00
Author
Member

close-report for #1113 — status success

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

envelope
{
  "issue": 1113,
  "status": "success",
  "commits": [
    "4f253ab4"
  ],
  "changed_files": [
    "internal/provision/impact.go",
    "internal/provision/impact_test.go",
    "internal/controlapi/provision.go",
    "packages/openapi-spec/openapi.yaml",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/provision.ts",
    "dashboard/src/lib/api/provisionClient.ts",
    "dashboard/src/components/provisioning/SetupSurface.vue",
    "dashboard/tests/fakes/provision.ts",
    "dashboard/tests/unit/provisionRemoveDevice.test.ts",
    "dashboard/tests/unit/provisionLive.test.ts",
    "docs/GOTCHAS.md"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/provision/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command sh -c 'gofmt -l <changed> && go build ./internal/... && go vet ./internal/provision/ ./internal/controlapi/'",
      "exit_code": 0
    },
    {
      "command": "node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    },
    {
      "command": "pnpm exec vue-tsc -p tsconfig.json --noEmit (dashboard)",
      "exit_code": 0
    },
    {
      "command": "pnpm exec vitest run (dashboard, 117 files / 1348 tests)",
      "exit_code": 0
    },
    {
      "command": "pnpm exec eslint <changed dashboard files>",
      "exit_code": 0
    }
  ],
  "criteria": {
    "The removal review of a service-less node offers the remove-and-deploy confirm, not a plain Deploy": "internal/provision/impact.go forces Destructive+Action='Remove & deploy' when SetupSelection.Removing; Go test TestReviewImpact_ZeroAssignmentRemovalIsRemoveAndDeployWithNoLoses (impact_test.go); dashboard test 'a service-less node still lands on remove-and-deploy (#1113)' asserts [data-action=\"remove-and-deploy\"] visible off a NON-destructive seam impact",
    "The removal intent is threaded seam→wire→client (not inferred from the diff)": "openapi.yaml ProvisionSelectionRequest.removing; regenerated generated.ts (check:client in sync); controlapi selectionBody/selectionFrom→SetupSelection.Removing; provisionClient sends removing:true; provisionLive.test.ts wire assertion {device_id,role,selected,removing:true}",
    "The removal verb can never run behind a non-destructive button (ADR 0060)": "SetupSurface.onConfirm now gates on `removing.value && action === 'Remove & deploy'` instead of local removing state; covered by provisionRemoveDevice.test.ts 'confirming the promoted review drives the seam removeDevice — never a plain deploy' (source.deploys empty, source.removals==['totara'])",
    "LOSES rows stay as computed (no invented warning when nothing dies)": "impact.go leaves imp.Loses untouched; Go test asserts len(imp.Loses)==0 for a zero-assignment removal; dashboard test asserts [data-field=\"loses\"] absent",
    "Regression that masked the bug is closed": "FakeAssessSource.reviewImpact now models the seam's intent-based classification; dashboard cases drive off a seam-computed impact rather than the pre-destructive REMOVE_DEVICE_IMPACT fixture"
  },
  "summary": "A whole-device removal review now classifies remove-and-deploy from the threaded removal intent rather than the selection diff, so a service-less node lands on the deliberate destructive confirm and the offboard can never run behind a plain Deploy button.",
  "blockers": []
}
**close-report** for #1113 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1113, "status": "success", "commits": [ "4f253ab4" ], "changed_files": [ "internal/provision/impact.go", "internal/provision/impact_test.go", "internal/controlapi/provision.go", "packages/openapi-spec/openapi.yaml", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/provision.ts", "dashboard/src/lib/api/provisionClient.ts", "dashboard/src/components/provisioning/SetupSurface.vue", "dashboard/tests/fakes/provision.ts", "dashboard/tests/unit/provisionRemoveDevice.test.ts", "dashboard/tests/unit/provisionLive.test.ts", "docs/GOTCHAS.md" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/provision/ ./internal/controlapi/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command sh -c 'gofmt -l <changed> && go build ./internal/... && go vet ./internal/provision/ ./internal/controlapi/'", "exit_code": 0 }, { "command": "node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 }, { "command": "pnpm exec vue-tsc -p tsconfig.json --noEmit (dashboard)", "exit_code": 0 }, { "command": "pnpm exec vitest run (dashboard, 117 files / 1348 tests)", "exit_code": 0 }, { "command": "pnpm exec eslint <changed dashboard files>", "exit_code": 0 } ], "criteria": { "The removal review of a service-less node offers the remove-and-deploy confirm, not a plain Deploy": "internal/provision/impact.go forces Destructive+Action='Remove & deploy' when SetupSelection.Removing; Go test TestReviewImpact_ZeroAssignmentRemovalIsRemoveAndDeployWithNoLoses (impact_test.go); dashboard test 'a service-less node still lands on remove-and-deploy (#1113)' asserts [data-action=\"remove-and-deploy\"] visible off a NON-destructive seam impact", "The removal intent is threaded seam→wire→client (not inferred from the diff)": "openapi.yaml ProvisionSelectionRequest.removing; regenerated generated.ts (check:client in sync); controlapi selectionBody/selectionFrom→SetupSelection.Removing; provisionClient sends removing:true; provisionLive.test.ts wire assertion {device_id,role,selected,removing:true}", "The removal verb can never run behind a non-destructive button (ADR 0060)": "SetupSurface.onConfirm now gates on `removing.value && action === 'Remove & deploy'` instead of local removing state; covered by provisionRemoveDevice.test.ts 'confirming the promoted review drives the seam removeDevice — never a plain deploy' (source.deploys empty, source.removals==['totara'])", "LOSES rows stay as computed (no invented warning when nothing dies)": "impact.go leaves imp.Loses untouched; Go test asserts len(imp.Loses)==0 for a zero-assignment removal; dashboard test asserts [data-field=\"loses\"] absent", "Regression that masked the bug is closed": "FakeAssessSource.reviewImpact now models the seam's intent-based classification; dashboard cases drive off a seam-computed impact rather than the pre-destructive REMOVE_DEVICE_IMPACT fixture" }, "summary": "A whole-device removal review now classifies remove-and-deploy from the threaded removal intent rather than the selection diff, so a service-less node lands on the deliberate destructive confirm and the offboard can never run behind a plain Deploy button.", "blockers": [] } ``` </details>
Owner

Correction from the session: my earlier close was wrong, and this ticket was carrying a real product defect the harness fix did not cover.

I closed this as a duplicate of #1112 with "no action needed here", on the reasoning that 821d2fbc's confirmAnyDeploy made the drive proceed. That was the harness half only. 4f253ab4 found the half underneath, and it is the more serious one:

SetupSurface.onConfirm branched the removal verb on local removing state, not the impact's action, so that plain Deploy button still drove the offboard — a destructive act behind an ordinary-looking button.

That is an operator-facing safety defect in its own right, independent of any drive: a community pressing a button labelled "Deploy" would have offboarded a device. Making the drive green by teaching the harness to accept whichever confirm appeared would have left that in place — the harness would have stopped complaining about precisely the symptom that was pointing at it.

Worth naming as its own lesson, because it is the inverse of the pattern this arc has been full of. The last several reds were checks that could not fail. This one was a check that was failing honestly, and the cheap fix was to stop it failing. A red that is inconvenient is not the same as a red that is wrong, and I did not look hard enough before deciding which this was.

The fix itself is well-judged on the point it would have been easy to get wrong: it forces Destructive + Remove & deploy from the intent while leaving the ⚠ LOSES rows exactly as computed — so the review says "this is a removal" without inventing a loss when nothing actually dies. Keeping "should a removal always name what dies" explicitly out of scope is the right call; that is a design question, not a bug fix.

Also good that the confirm branch now gates on removing && action === 'Remove & deploy' rather than trusting either signal alone.

No conflict with #1114's ruling — that one is about removal not needing to reach the device; this is about classifying and confirming the removal honestly once asked. They compose.

**Correction from the session: my earlier close was wrong, and this ticket was carrying a real product defect the harness fix did not cover.** I closed this as a duplicate of #1112 with "no action needed here", on the reasoning that `821d2fbc`'s `confirmAnyDeploy` made the drive proceed. That was the harness half only. `4f253ab4` found the half underneath, and it is the more serious one: > `SetupSurface.onConfirm` branched the removal verb on local `removing` state, not the impact's action, so that plain Deploy button still drove the offboard — **a destructive act behind an ordinary-looking button.** That is an operator-facing safety defect in its own right, independent of any drive: a community pressing a button labelled "Deploy" would have offboarded a device. Making the drive green by teaching the harness to accept whichever confirm appeared would have left that in place — the harness would have stopped complaining about precisely the symptom that was pointing at it. Worth naming as its own lesson, because it is the inverse of the pattern this arc has been full of. The last several reds were checks that could not fail. This one was a check that *was* failing honestly, and the cheap fix was to stop it failing. A red that is inconvenient is not the same as a red that is wrong, and I did not look hard enough before deciding which this was. The fix itself is well-judged on the point it would have been easy to get wrong: it forces `Destructive` + `Remove & deploy` **from the intent** while leaving the ⚠ LOSES rows exactly as computed — so the review says "this is a removal" without inventing a loss when nothing actually dies. Keeping "should a removal always name what dies" explicitly out of scope is the right call; that is a design question, not a bug fix. Also good that the confirm branch now gates on `removing && action === 'Remove & deploy'` rather than trusting either signal alone. No conflict with #1114's ruling — that one is about removal not needing to *reach* the device; this is about classifying and confirming the removal honestly once asked. They compose.
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#1113
No description provided.