provisioning: provision-change-node — re-provision an active node with a delta impact #79

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

Parent

Feature spec: #17 (provisioning).

What to build

The standing change loop of the P4 journey (ADR 0063), driven by the provision
orchestrator seam so a fleet can grow and adapt without removing and re-adding
machines. From an active node's device page, the operator chooses to change its
setup and the same five P4 screens re-run: P4-S1 re-assesses against today's
fleet state, and P4-S2 arrives pre-selected with the node's current role and
services. At review, the impact is shown as a delta — ADDS and REMOVES alongside
the usual moves, backups and load — and because the node is already NixOS the
deploy is a plain clan.Deploy with no erase.

A destructive removal during a change gets the same deliberate confirm as an
erase: when the removal's impact destroys data, Review impact routes to P4-S3x
with the LOSES row (per story 9), so removing the last copy of data is never a
casual click.

Notes: this slice reuses the assess, review-impact and deploy machinery of the
first-setup slices and adds the delta framing and the active-node entry point.
Flow: docs/ux/flows/p4-provisioning.mermaid.

Acceptance criteria

  • (story 18) Given an active node, when the operator chooses to change its setup from the device page, then the same five P4 screens re-run: P4-S1 re-assesses against today's fleet state, and P4-S2 arrives pre-selected with the node's current role and services.
  • (story 19) Given a change, when the operator reaches review, then the impact shows ADDS and REMOVES alongside the usual moves/backups/load, and deploy is a plain clan.Deploy with no erase (the node is already NixOS).
  • (story 20) Given a change whose removal destroys data, when the operator reaches review, then P4-S3x is shown with the LOSES row (per story 9).

Blocked by

  • #73 — changes act on an active node

Task manifest

task: provisioning:provision-change-node
implements_flow: p4-provisioning
implements_edge: S5→S1 (the standing change loop, ADR 0063)
wireframe: docs/ux/wireframes/p4-provisioning/p4-s1-assess.html
interface: "`provision` orchestrator seam — changeSetup(node) re-runs assess against today's fleet state, pre-selects the node's current role/services, computes impact as an ADDS/REMOVES delta, deploys via plain `clan.Deploy` (no erase — already NixOS), and routes a data-destroying removal to the LOSES confirm (ADR 0060)"
seam: "`provision` orchestrator seam tests (control plane, Go) — fake fleet-state reader (state moved since first setup), fake `clan.Clan` (`Deploy` only), fake coverage reader for the LOSES trigger; asserts re-assess + pre-select, the delta impact, plain deploy, and the destructive-removal confirm"
acceptance:
  - given: an active node
    when: the operator changes its setup from the device page
    then: the five P4 screens re-run — P4-S1 re-assesses against today's fleet state, P4-S2 pre-selected with the node's current role and services
  - given: a change
    when: the operator reaches review
    then: the impact shows ADDS and REMOVES alongside the usual moves/backups/load, and deploy is a plain `clan.Deploy` with no erase
  - given: a change whose removal destroys data
    when: the operator reaches review
    then: P4-S3x is shown with the LOSES row (per story 9)
depends_on: [provision-active-and-partial]
out_of_scope:
  - "the first-setup assess/review/deploy machinery itself — provision-assess-recommend / provision-review-impact / the deploy slices' (reused here)"
  - "rescue's device-ladder remove rung — P8's (also routes through P4-S3x)"
needs_human_decision: []
## Parent Feature spec: #17 (provisioning). ## What to build The standing change loop of the P4 journey (ADR 0063), driven by the `provision` orchestrator seam so a fleet can grow and adapt without removing and re-adding machines. From an active node's device page, the operator chooses to change its setup and the same five P4 screens re-run: P4-S1 re-assesses against *today's* fleet state, and P4-S2 arrives pre-selected with the node's current role and services. At review, the impact is shown as a delta — ADDS and REMOVES alongside the usual moves, backups and load — and because the node is already NixOS the deploy is a plain `clan.Deploy` with no erase. A destructive removal during a change gets the same deliberate confirm as an erase: when the removal's impact destroys data, Review impact routes to P4-S3x with the LOSES row (per story 9), so removing the last copy of data is never a casual click. Notes: this slice reuses the assess, review-impact and deploy machinery of the first-setup slices and adds the delta framing and the active-node entry point. Flow: `docs/ux/flows/p4-provisioning.mermaid`. ## Acceptance criteria - [ ] (story 18) Given an active node, when the operator chooses to change its setup from the device page, then the same five P4 screens re-run: P4-S1 re-assesses against today's fleet state, and P4-S2 arrives pre-selected with the node's current role and services. - [ ] (story 19) Given a change, when the operator reaches review, then the impact shows ADDS and REMOVES alongside the usual moves/backups/load, and deploy is a plain `clan.Deploy` with no erase (the node is already NixOS). - [ ] (story 20) Given a change whose removal destroys data, when the operator reaches review, then P4-S3x is shown with the LOSES row (per story 9). ## Blocked by - #73 — changes act on an active node ## Task manifest ```yaml task: provisioning:provision-change-node implements_flow: p4-provisioning implements_edge: S5→S1 (the standing change loop, ADR 0063) wireframe: docs/ux/wireframes/p4-provisioning/p4-s1-assess.html interface: "`provision` orchestrator seam — changeSetup(node) re-runs assess against today's fleet state, pre-selects the node's current role/services, computes impact as an ADDS/REMOVES delta, deploys via plain `clan.Deploy` (no erase — already NixOS), and routes a data-destroying removal to the LOSES confirm (ADR 0060)" seam: "`provision` orchestrator seam tests (control plane, Go) — fake fleet-state reader (state moved since first setup), fake `clan.Clan` (`Deploy` only), fake coverage reader for the LOSES trigger; asserts re-assess + pre-select, the delta impact, plain deploy, and the destructive-removal confirm" acceptance: - given: an active node when: the operator changes its setup from the device page then: the five P4 screens re-run — P4-S1 re-assesses against today's fleet state, P4-S2 pre-selected with the node's current role and services - given: a change when: the operator reaches review then: the impact shows ADDS and REMOVES alongside the usual moves/backups/load, and deploy is a plain `clan.Deploy` with no erase - given: a change whose removal destroys data when: the operator reaches review then: P4-S3x is shown with the LOSES row (per story 9) depends_on: [provision-active-and-partial] out_of_scope: - "the first-setup assess/review/deploy machinery itself — provision-assess-recommend / provision-review-impact / the deploy slices' (reused here)" - "rescue's device-ladder remove rung — P8's (also routes through P4-S3x)" needs_human_decision: [] ```
Author
Owner

Done in 4414f37 (on origin/main).

The standing change loop S5→S1 (ADR 0063). This slice adds only the active-node entry point and the current-setup pre-selection; the assess/review/deploy machinery is the first-setup slices, reused unchanged.

Seam (internal/provision/change.go): Orchestrator.ChangeSetup(id) re-assesses an already-active node against today s fleet state and opens P4-S2 pre-selected with its current role and services (Assessment.Change + Preselected — a dataset-bound backup target rides a removable recommended row so it keeps its dataset and is un-tickable; every other current service pre-ticks by slug). A not-yet-active device is an error. rolesCurrentFirst orders the role selector to the current role.

  • story 18 — re-assess against today s state + P4-S2 pre-selected with the current role/services.
  • story 19 — the reused ReviewImpact reads the ADDS/REMOVES delta against the node s real current assignments; Deploy runs a plain clan.Deploy, no erase (node already NixOS, ADR 0059 — clan.Enroll never touched).
  • story 20 — a removal that drops the last copy of data or a dataset s last backup still routes to the deliberate P4-S3x LOSES confirm (per story 9, ADR 0060).

Dashboard: SetupSurface gains a change prop that reads the seam s change face and seeds the current-setup pre-tick (edge S5→S1); AssessScreen frames the header as a Change of an active node (data-status="active") rather than a fresh set-up.

Evidence: internal/provision/change_test.go (6 Go seam tests, green) + dashboard/tests/unit/provisionChange.test.ts (7 Vue tests, green); go vet + gofmt clean; the provision Vue suites (change/setup/review-impact/deploy/active/full-install) all green; eslint clean. STATUS.md updated (header + milestone log).

Done in 4414f37 (on `origin/main`). The standing change loop S5→S1 (ADR 0063). This slice adds only the active-node entry point and the current-setup pre-selection; the assess/review/deploy machinery is the first-setup slices, reused unchanged. **Seam** (`internal/provision/change.go`): `Orchestrator.ChangeSetup(id)` re-assesses an already-active node against today s fleet state and opens P4-S2 pre-selected with its current role and services (`Assessment.Change` + `Preselected` — a dataset-bound backup target rides a removable recommended row so it keeps its dataset and is un-tickable; every other current service pre-ticks by slug). A not-yet-active device is an error. `rolesCurrentFirst` orders the role selector to the current role. - **story 18** — re-assess against today s state + P4-S2 pre-selected with the current role/services. - **story 19** — the reused `ReviewImpact` reads the ADDS/REMOVES delta against the node s real current assignments; `Deploy` runs a plain `clan.Deploy`, no erase (node already NixOS, ADR 0059 — `clan.Enroll` never touched). - **story 20** — a removal that drops the last copy of data or a dataset s last backup still routes to the deliberate P4-S3x LOSES confirm (per story 9, ADR 0060). **Dashboard**: `SetupSurface` gains a `change` prop that reads the seam s change face and seeds the current-setup pre-tick (edge S5→S1); `AssessScreen` frames the header as a *Change* of an *active* node (`data-status="active"`) rather than a fresh set-up. **Evidence**: `internal/provision/change_test.go` (6 Go seam tests, green) + `dashboard/tests/unit/provisionChange.test.ts` (7 Vue tests, green); `go vet` + `gofmt` clean; the provision Vue suites (change/setup/review-impact/deploy/active/full-install) all green; eslint clean. STATUS.md updated (header + milestone log).
ben closed this issue 2026-07-25 22:25:36 +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#79
No description provided.