provisioning: provision-active-and-partial — per-service health gate, active and active-for-what-works #73

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

Parent

Feature spec: #17 (provisioning).

What to build

The health gate that turns a finished deploy into an object-state, driven by the
provision orchestrator seam. Health checks run per service (ADR 0061); a
catalogue port ships its own HealthCheck and provision gates on it per service
without knowing what the service does. When every service passes, P4-S5 shows the
device active with its role and all its services, and monitoring (P5) picks it
up. When the deploy succeeded but one service fails its health check, P4-S5x shows
the device active — a service failed: active for the passing services, nothing
rolls back, and the failed service is named with its failure ("dry-run could not
write to tōtara") and offered Retry or Remove. This is a first-class state, not a
degradation.

The binding safety invariant lives here: a service that has not passed its health
check contributes no coverage anywhere — when coverage is computed anywhere,
Backups overview included, that service contributes nothing and the data it was
meant to protect still shows as an open gap. And the failed service is carried into
monitoring as a standing fault, not silently forgotten after setup.

Notes: this slice builds the per-service health model and the active /
active-service-failed states that monitoring and backups read (their edges point
here). Flow: docs/ux/flows/p4-provisioning.mermaid.

Acceptance criteria

  • (story 14) Given a deploy where every service passed its health check, when it completes, then P4-S5 shows the device active with its role and all its services, and monitoring (P5) picks it up.
  • (story 15) Given a successful deploy where a service fails its health check, when it completes, then P4-S5x shows the device active for the passing services, nothing rolls back, and the failed service is named with its failure and offered Retry or Remove.
  • (story 16) Given a service that failed its health check, when coverage is computed anywhere (Backups overview included), then that service contributes no coverage and the data it was meant to protect still shows as an open gap.
  • (story 17) Given P4-S5x, when provisioning completes, then monitoring picks the device up including the failed service as a standing fault.

Blocked by

  • #61 — needs a completed VM-mode deploy
  • #69 — needs a completed full-install deploy

Task manifest

task: provisioning:provision-active-and-partial
implements_flow: p4-provisioning
implements_edge: S4→S5, S4→S5x, S5→P5-S1, S5x→S2, S5x→P5-S1
wireframe:
  - docs/ux/wireframes/p4-provisioning/p4-s5-active.html
  - docs/ux/wireframes/p4-provisioning/p4-s5x-active-service-failed.html
interface: "`provision` orchestrator seam — after deploy, runs each service's port-supplied `HealthCheck` (ADR 0061/0062) independently; all-pass → active (P4-S5); any-fail → active-for-what-works (P4-S5x) with the named failure and Retry/Remove; a failed service contributes no coverage anywhere and is handed to monitoring as a standing fault"
seam: "`provision` orchestrator seam tests (control plane, Go) — per-service `HealthCheck` fakes that pass/fail independently, fake fleet-state/coverage reader, fake portal-link updater; asserts all-healthy → active, partial → active-for-what-works with no rollback, the no-coverage invariant, and the monitoring hand-off"
acceptance:
  - given: a deploy where every service passed its health check
    when: it completes
    then: P4-S5 shows the device active with its role and all services and monitoring picks it up
  - given: a successful deploy where one service fails its health check
    when: it completes
    then: P4-S5x shows the device active for the passing services, nothing rolls back, and the failed service is named with its failure and offered Retry or Remove
  - given: a service that failed its health check
    when: coverage is computed anywhere (Backups overview included)
    then: that service contributes no coverage and its data still shows as an open gap
  - given: P4-S5x
    when: provisioning completes
    then: monitoring picks the device up including the failed service as a standing fault
depends_on: [provision-deploy-vm-mode, provision-deploy-full-install]
out_of_scope:
  - "monitoring's steady-state watching of the same services — P5's; the standing fault is handed off, not owned here"
  - "backups' own coverage/gap surfaces — this slice enforces the no-coverage invariant against the shared reader; the backups surfaces are the backups feature's"
  - "story 18–20 changing an active node — provision-change-node's"
needs_human_decision: []
## Parent Feature spec: #17 (provisioning). ## What to build The health gate that turns a finished deploy into an object-state, driven by the `provision` orchestrator seam. Health checks run per service (ADR 0061); a catalogue port ships its own `HealthCheck` and `provision` gates on it per service without knowing what the service does. When every service passes, P4-S5 shows the device *active* with its role and all its services, and monitoring (P5) picks it up. When the deploy succeeded but one service fails its health check, P4-S5x shows the device *active — a service failed*: active for the passing services, nothing rolls back, and the failed service is named with its failure ("dry-run could not write to tōtara") and offered Retry or Remove. This is a first-class state, not a degradation. The binding safety invariant lives here: a service that has not passed its health check contributes **no coverage anywhere** — when coverage is computed anywhere, Backups overview included, that service contributes nothing and the data it was meant to protect still shows as an open gap. And the failed service is carried into monitoring as a standing fault, not silently forgotten after setup. Notes: this slice builds the per-service health model and the active / active-service-failed states that monitoring and backups read (their edges point here). Flow: `docs/ux/flows/p4-provisioning.mermaid`. ## Acceptance criteria - [ ] (story 14) Given a deploy where every service passed its health check, when it completes, then P4-S5 shows the device active with its role and all its services, and monitoring (P5) picks it up. - [ ] (story 15) Given a successful deploy where a service fails its health check, when it completes, then P4-S5x shows the device active for the passing services, nothing rolls back, and the failed service is named with its failure and offered Retry or Remove. - [ ] (story 16) Given a service that failed its health check, when coverage is computed anywhere (Backups overview included), then that service contributes no coverage and the data it was meant to protect still shows as an open gap. - [ ] (story 17) Given P4-S5x, when provisioning completes, then monitoring picks the device up including the failed service as a standing fault. ## Blocked by - #61 — needs a completed VM-mode deploy - #69 — needs a completed full-install deploy ## Task manifest ```yaml task: provisioning:provision-active-and-partial implements_flow: p4-provisioning implements_edge: S4→S5, S4→S5x, S5→P5-S1, S5x→S2, S5x→P5-S1 wireframe: - docs/ux/wireframes/p4-provisioning/p4-s5-active.html - docs/ux/wireframes/p4-provisioning/p4-s5x-active-service-failed.html interface: "`provision` orchestrator seam — after deploy, runs each service's port-supplied `HealthCheck` (ADR 0061/0062) independently; all-pass → active (P4-S5); any-fail → active-for-what-works (P4-S5x) with the named failure and Retry/Remove; a failed service contributes no coverage anywhere and is handed to monitoring as a standing fault" seam: "`provision` orchestrator seam tests (control plane, Go) — per-service `HealthCheck` fakes that pass/fail independently, fake fleet-state/coverage reader, fake portal-link updater; asserts all-healthy → active, partial → active-for-what-works with no rollback, the no-coverage invariant, and the monitoring hand-off" acceptance: - given: a deploy where every service passed its health check when: it completes then: P4-S5 shows the device active with its role and all services and monitoring picks it up - given: a successful deploy where one service fails its health check when: it completes then: P4-S5x shows the device active for the passing services, nothing rolls back, and the failed service is named with its failure and offered Retry or Remove - given: a service that failed its health check when: coverage is computed anywhere (Backups overview included) then: that service contributes no coverage and its data still shows as an open gap - given: P4-S5x when: provisioning completes then: monitoring picks the device up including the failed service as a standing fault depends_on: [provision-deploy-vm-mode, provision-deploy-full-install] out_of_scope: - "monitoring's steady-state watching of the same services — P5's; the standing fault is handed off, not owned here" - "backups' own coverage/gap surfaces — this slice enforces the no-coverage invariant against the shared reader; the backups surfaces are the backups feature's" - "story 18–20 changing an active node — provision-change-node's" needs_human_decision: [] ```
Author
Owner

Done in d7eb13a (on main).

The S4 → S5 / S5x edges at the ADR 0058 seam. A finished deploy — both clan hot paths — appends the streamed Health checks — one per service P4-S4 row and runs each selected service's port-supplied HealthCheck independently (ADR 0061/0062; new Ports face via WithPorts, and the check rides Config.AttachService as the port's third part), landing a standing Outcome:

  • Story 14 — all-pass → active (P4-S5): the device with its role and ALL its services; Handoffs() hands it to monitoring.
  • Story 15 — any-fail → active — a service failed (P4-S5x): the deploy held, nothing rolls back (asserted: no clan.Rollback, every deploy step done), the failed service is named with the port's own summary ("dry-run could not write to tōtara") and offered Retry (RetryService re-runs the one check; a pass clears the fault and upgrades to plain active) and Remove (S5x → S2, back to Select with the failed service left unticked).
  • Story 16 — the invariant is code: Orchestrator.Healthy(device, service) is the default-deny bit coverage consults anywhere — failed, ungated and unknown all read false; the shared fleet-state/coverage reader still names the gap ("Chat still has no backup."), and the new PortalLinks face publishes only health-passed services.
  • Story 17 — Handoffs() carries the failed service as a standing fault, never silently forgotten; a deploy-itself failure leaves no active record at all.

Evidence: internal/provision/health.go + health_test.go (9 seam tests over per-service check fakes, the fake fleet-state/coverage reader, and the portal fake); dashboard ActiveScreen.vue ships P4-S5/S5x to the wireframes' element contract (services-health, no-coverage-claim, retry-service/remove-service/open-logs), wired into SetupSurface — tests/unit/provisionActive.test.ts (8 tests). Full Go suite + dashboard vitest (274/274), vue-tsc and eslint green. STATUS.md updated in the same commit.

Out of scope honoured: monitoring's steady-state watching, backups' own surfaces (they read Healthy()/Handoffs() — their edges point here), and stories 18–20 (provision-change-node).

Done in d7eb13a (on main). **The S4 → S5 / S5x edges at the ADR 0058 seam.** A finished deploy — both clan hot paths — appends the streamed `Health checks — one per service` P4-S4 row and runs each selected service's port-supplied `HealthCheck` independently (ADR 0061/0062; new `Ports` face via `WithPorts`, and the check rides `Config.AttachService` as the port's third part), landing a standing `Outcome`: - **Story 14** — all-pass → *active* (P4-S5): the device with its role and ALL its services; `Handoffs()` hands it to monitoring. - **Story 15** — any-fail → *active — a service failed* (P4-S5x): the deploy held, nothing rolls back (asserted: no `clan.Rollback`, every deploy step done), the failed service is named with the port's own summary ("dry-run could not write to tōtara") and offered **Retry** (`RetryService` re-runs the one check; a pass clears the fault and upgrades to plain active) and **Remove** (S5x → S2, back to Select with the failed service left unticked). - **Story 16** — the invariant is code: `Orchestrator.Healthy(device, service)` is the default-deny bit coverage consults anywhere — failed, ungated and unknown all read false; the shared fleet-state/coverage reader still names the gap ("Chat still has no backup."), and the new `PortalLinks` face publishes only health-passed services. - **Story 17** — `Handoffs()` carries the failed service as a standing fault, never silently forgotten; a deploy-itself failure leaves no active record at all. **Evidence:** `internal/provision/health.go` + `health_test.go` (9 seam tests over per-service check fakes, the fake fleet-state/coverage reader, and the portal fake); dashboard `ActiveScreen.vue` ships P4-S5/S5x to the wireframes' element contract (`services-health`, `no-coverage-claim`, `retry-service`/`remove-service`/`open-logs`), wired into `SetupSurface` — `tests/unit/provisionActive.test.ts` (8 tests). Full Go suite + dashboard vitest (274/274), vue-tsc and eslint green. STATUS.md updated in the same commit. Out of scope honoured: monitoring's steady-state watching, backups' own surfaces (they read `Healthy()`/`Handoffs()` — their edges point here), and stories 18–20 (provision-change-node).
ben closed this issue 2026-07-25 18:19:52 +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#73
No description provided.