provisioning: provision-review-impact — show the impact and make destruction a deliberate confirm #51

Closed
opened 2026-07-25 04:56:09 +00:00 by ben · 1 comment
Owner

Parent

Feature spec: #17 (provisioning).

What to build

The Review impact step of the P4 journey, driven by the provision orchestrator
seam, where the operator sees exactly what their selection does before anything
runs. For a non-destructive selection, P4-S3 shows what moves, what replicates
(with size and timing), how backup targets change, and the new steady-state load,
and offers a plain Deploy. Impact is computed as a diff against current fleet
state, so a first setup is simply the special case where current state is empty
(ADR 0060).

Whenever the impact destroys something, Review impact becomes the deliberate
destructive confirm P4-S3x, and it carries whichever of two triggers applies. For
a full-install device still takeover-ready, P4-S3x shows an ⚠ ERASES row
stating the disk is erased and replaced with NixOS, the action reads "Erase &
deploy" rather than "Deploy", and it attributes the consent the device owner
already gave at the machine (who and when) without ever re-asking for consent in
the dashboard (ADR 0024) — nothing has been erased until the operator confirms
here. For a change whose impact drops the last copy of data or a dataset's last
backup, P4-S3x shows an ⚠ LOSES row naming exactly what drops ("Chat drops to no
backup — tōtara holds its only copy"), and the action reads "Remove & deploy".

Notes: the LOSES detection reads the shared control-plane fleet-state/coverage
reader (slice-map ruling 2026-07-25) — there is no build edge to backups; backups'
coverage map is downstream of provisioning (ADR 0061). Rescue's device-ladder
remove rung routes through P4-S3x. Flow:
docs/ux/flows/p4-provisioning.mermaid.

Acceptance criteria

  • (story 7) Given a non-destructive selection, when the operator reaches review, then P4-S3 shows what moves, what replicates (with size and timing), how backup targets change, and the new steady-state load, and offers a plain Deploy.
  • (story 8) Given the device is full-install and still takeover-ready, when the operator reaches review, then P4-S3x is shown with an ⚠ ERASES row stating the disk is erased and replaced with NixOS, and the action reads "Erase & deploy", not "Deploy".
  • (story 8) Given the erase, when P4-S3x shows it, then it attributes the consent the device owner gave at the machine (who and when) and never re-asks for consent in the dashboard (ADR 0024); nothing has been erased until the operator confirms here.
  • (story 9) Given a change whose impact drops the last copy of data or a dataset's last backup, when the operator reaches review, then P4-S3x is shown with an ⚠ LOSES row naming exactly what drops (e.g. "Chat drops to no backup — tōtara holds its only copy"), and the action reads "Remove & deploy".

Blocked by

  • #41 — needs the selected role/services

Task manifest

task: provisioning:provision-review-impact
implements_flow: p4-provisioning
implements_edge: S2→S3, S2→S3x
wireframe:
  - docs/ux/wireframes/p4-provisioning/p4-s3-review-impact.html
  - docs/ux/wireframes/p4-provisioning/p4-s3x-review-impact-full-install.html
interface: "`provision` orchestrator seam — reviewImpact(selection) diffs the selection against current state (empty for a first setup) and classifies destructiveness (ADR 0060): full-install `takeover-ready` → ERASES with the captured install-mode consent; a removal dropping a last copy or last backup → LOSES, read from the shared fleet-state/coverage reader"
seam: "`provision` orchestrator seam tests (control plane, Go) — fake fleet-state/coverage reader, fake clan adapter; drives plain-impact (P4-S3), the ERASES trigger with consent attribution, and the LOSES trigger (P4-S3x)"
acceptance:
  - given: a non-destructive selection
    when: the operator reaches review
    then: P4-S3 shows what moves, what replicates (size and timing), how backup targets change, and the new steady-state load, and offers a plain Deploy
  - given: a full-install device still `takeover-ready`
    when: the operator reaches review
    then: P4-S3x shows an ERASES row (disk erased and replaced with NixOS), the action reads "Erase & deploy", and the device owner's consent (who and when) is attributed without re-asking in the dashboard (ADR 0024); nothing is erased until confirmed
  - given: a change whose impact drops a last copy of data or a dataset's last backup
    when: the operator reaches review
    then: P4-S3x shows a LOSES row naming exactly what drops and the action reads "Remove & deploy"
depends_on: [provision-assess-recommend]
out_of_scope:
  - "story 10–13 deploy and health checks — provision-deploy-vm-mode's and provision-deploy-full-install's"
  - "the destructive removal path during a change of an active node — provision-change-node's (routes here for the LOSES confirm)"
  - "backups' own coverage/gap surfaces — provisioning reads the shared coverage reader, it does not own the backups surfaces"
needs_human_decision: []
## Parent Feature spec: #17 (provisioning). ## What to build The Review impact step of the P4 journey, driven by the `provision` orchestrator seam, where the operator sees exactly what their selection does before anything runs. For a non-destructive selection, P4-S3 shows what moves, what replicates (with size and timing), how backup targets change, and the new steady-state load, and offers a plain Deploy. Impact is computed as a diff against current fleet state, so a first setup is simply the special case where current state is empty (ADR 0060). Whenever the impact destroys something, Review impact becomes the deliberate destructive confirm P4-S3x, and it carries whichever of two triggers applies. For a full-install device still `takeover-ready`, P4-S3x shows an ⚠ ERASES row stating the disk is erased and replaced with NixOS, the action reads "Erase & deploy" rather than "Deploy", and it attributes the consent the device owner already gave at the machine (who and when) without ever re-asking for consent in the dashboard (ADR 0024) — nothing has been erased until the operator confirms here. For a change whose impact drops the last copy of data or a dataset's last backup, P4-S3x shows an ⚠ LOSES row naming exactly what drops ("Chat drops to no backup — tōtara holds its only copy"), and the action reads "Remove & deploy". Notes: the LOSES detection reads the shared control-plane fleet-state/coverage reader (slice-map ruling 2026-07-25) — there is no build edge to backups; backups' coverage map is downstream of provisioning (ADR 0061). Rescue's device-ladder remove rung routes through P4-S3x. Flow: `docs/ux/flows/p4-provisioning.mermaid`. ## Acceptance criteria - [ ] (story 7) Given a non-destructive selection, when the operator reaches review, then P4-S3 shows what moves, what replicates (with size and timing), how backup targets change, and the new steady-state load, and offers a plain Deploy. - [ ] (story 8) Given the device is full-install and still `takeover-ready`, when the operator reaches review, then P4-S3x is shown with an ⚠ ERASES row stating the disk is erased and replaced with NixOS, and the action reads "Erase & deploy", not "Deploy". - [ ] (story 8) Given the erase, when P4-S3x shows it, then it attributes the consent the device owner gave at the machine (who and when) and never re-asks for consent in the dashboard (ADR 0024); nothing has been erased until the operator confirms here. - [ ] (story 9) Given a change whose impact drops the last copy of data or a dataset's last backup, when the operator reaches review, then P4-S3x is shown with an ⚠ LOSES row naming exactly what drops (e.g. "Chat drops to no backup — tōtara holds its only copy"), and the action reads "Remove & deploy". ## Blocked by - #41 — needs the selected role/services ## Task manifest ```yaml task: provisioning:provision-review-impact implements_flow: p4-provisioning implements_edge: S2→S3, S2→S3x wireframe: - docs/ux/wireframes/p4-provisioning/p4-s3-review-impact.html - docs/ux/wireframes/p4-provisioning/p4-s3x-review-impact-full-install.html interface: "`provision` orchestrator seam — reviewImpact(selection) diffs the selection against current state (empty for a first setup) and classifies destructiveness (ADR 0060): full-install `takeover-ready` → ERASES with the captured install-mode consent; a removal dropping a last copy or last backup → LOSES, read from the shared fleet-state/coverage reader" seam: "`provision` orchestrator seam tests (control plane, Go) — fake fleet-state/coverage reader, fake clan adapter; drives plain-impact (P4-S3), the ERASES trigger with consent attribution, and the LOSES trigger (P4-S3x)" acceptance: - given: a non-destructive selection when: the operator reaches review then: P4-S3 shows what moves, what replicates (size and timing), how backup targets change, and the new steady-state load, and offers a plain Deploy - given: a full-install device still `takeover-ready` when: the operator reaches review then: P4-S3x shows an ERASES row (disk erased and replaced with NixOS), the action reads "Erase & deploy", and the device owner's consent (who and when) is attributed without re-asking in the dashboard (ADR 0024); nothing is erased until confirmed - given: a change whose impact drops a last copy of data or a dataset's last backup when: the operator reaches review then: P4-S3x shows a LOSES row naming exactly what drops and the action reads "Remove & deploy" depends_on: [provision-assess-recommend] out_of_scope: - "story 10–13 deploy and health checks — provision-deploy-vm-mode's and provision-deploy-full-install's" - "the destructive removal path during a change of an active node — provision-change-node's (routes here for the LOSES confirm)" - "backups' own coverage/gap surfaces — provisioning reads the shared coverage reader, it does not own the backups surfaces" needs_human_decision: [] ```
Author
Owner

Done in commit 5d08015 on main.

What was built — P4-S3 / S3x at the ADR 0058 seam:

  • provision.ReviewImpact (internal/provision/impact.go) diffs the selection against the device's current assignments — a first setup is the empty-current-state special case (ADR 0060) — and computes destructiveness as part of impact. Plain S3: MOVES with size and timing ("Files & documents gains a second copy — rimu replicates to tōtara (~18 GB, overnight)"), BACKUPS changes ("Chat covered — nightly to tōtara"), steady-state LOAD in the device's own numbers, plain Deploy.
  • ERASES (story 8): a full-install device still takeover-ready promotes to S3x — ⚠ row states the disk is erased and replaced with NixOS, action reads "Erase & deploy", and the device-end consent is attributed (who and when) and never re-asked in the dashboard (ADR 0024); nothing erased until confirmed here, and an already-taken-over device never re-promotes.
  • LOSES (story 9): a removal dropping the last copy of data or a dataset's last backup names exactly what drops ("Chat drops to no backup — tōtara holds its only copy."), action "Remove & deploy" — read from the shared fleet-state/coverage reader per the slice-map ruling (no build edge to backups): fleetstate.Dataset now carries SizeBytes and BackupHomes (locations replace the bare count, so the no-backup gap and LOSES share one truth), Device carries current Services assignments and Install/TakeoverReady/Consent facts. The catalogue grew SteadyMemBytes (ADR 0064 single source grown sideways, floors untouched) for the LOAD sum.
  • Dashboard: ReviewImpactScreen.vue built to both wireframes' data-field/data-action/data-status contract (one screen, two triggers — erases / consent-attribution / loses; deploy / erase-and-deploy / remove-and-deploy), composed by SetupSurface (S2→S3/S3x through the seam, back keeps the ticks, the confirmed deploy emitted onward to the provision-deploy slices).

Evidence: seam tests internal/provision/impact_test.go (8 tests over the fake fleet-state/coverage reader + fake clan adapter, driving plain impact, ERASES with consent attribution, both LOSES forms, coverage-elsewhere staying plain, and the diff-against-current-state behaviour); dashboard/tests/unit/provisionReviewImpact.test.ts (7 component tests pinning the element contract). Full Go suite + vet, 256 dashboard / 114 app / 46 ui-kit TS tests, vue-tsc and eslint all green. STATUS.md updated in the same commit.

Done in commit 5d08015 on main. **What was built** — P4-S3 / S3x at the ADR 0058 seam: - `provision.ReviewImpact` (`internal/provision/impact.go`) diffs the selection against the device's current assignments — a first setup is the empty-current-state special case (ADR 0060) — and computes destructiveness as part of impact. Plain S3: MOVES with size and timing ("Files & documents gains a second copy — rimu replicates to tōtara (~18 GB, overnight)"), BACKUPS changes ("Chat covered — nightly to tōtara"), steady-state LOAD in the device's own numbers, plain Deploy. - **ERASES** (story 8): a full-install device still `takeover-ready` promotes to S3x — ⚠ row states the disk is erased and replaced with NixOS, action reads "Erase & deploy", and the device-end consent is attributed (who and when) and never re-asked in the dashboard (ADR 0024); nothing erased until confirmed here, and an already-taken-over device never re-promotes. - **LOSES** (story 9): a removal dropping the last copy of data or a dataset's last backup names exactly what drops ("Chat drops to no backup — tōtara holds its only copy."), action "Remove & deploy" — read from the shared fleet-state/coverage reader per the slice-map ruling (no build edge to backups): `fleetstate.Dataset` now carries `SizeBytes` and `BackupHomes` (locations replace the bare count, so the no-backup gap and LOSES share one truth), `Device` carries current `Services` assignments and `Install`/`TakeoverReady`/`Consent` facts. The catalogue grew `SteadyMemBytes` (ADR 0064 single source grown sideways, floors untouched) for the LOAD sum. - Dashboard: `ReviewImpactScreen.vue` built to both wireframes' `data-field`/`data-action`/`data-status` contract (one screen, two triggers — erases / consent-attribution / loses; deploy / erase-and-deploy / remove-and-deploy), composed by `SetupSurface` (S2→S3/S3x through the seam, back keeps the ticks, the confirmed deploy emitted onward to the provision-deploy slices). **Evidence**: seam tests `internal/provision/impact_test.go` (8 tests over the fake fleet-state/coverage reader + fake clan adapter, driving plain impact, ERASES with consent attribution, both LOSES forms, coverage-elsewhere staying plain, and the diff-against-current-state behaviour); `dashboard/tests/unit/provisionReviewImpact.test.ts` (7 component tests pinning the element contract). Full Go suite + vet, 256 dashboard / 114 app / 46 ui-kit TS tests, vue-tsc and eslint all green. STATUS.md updated in the same commit.
ben closed this issue 2026-07-25 17:24:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#51
No description provided.