provisioning: updates-rollout-happy — auto-security in-window, staged canary-first rollout to applied #70

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

Parent

Feature spec: #17 (provisioning).

What to build

The happy-path rollout of the P4b journey, driven by the update orchestrator
seam (the deploy runner scripts the stages — clan has no built-in canary). A
security or patch release with auto-security on is not queued for approval: it
waits for the community's maintenance window and then rolls out, exactly as an
operator-approved update does — both are equally protected. Every rollout is
staged and health-gated the same way (ADR 0066): closures are seeded to every node
first, a canary deploys and passes its health checks, then the rest follow, with
the gateway last.

The canary is chosen by rule, never by the operator: never the gateway, never a
quorum-role holder, never the sole home of any dataset. A fleet too small to have
a qualifying canary says so and proceeds one node at a time with a health gate
between each. A rollout or retry applies the same exact revision/closure to every
node, so a retry never rebuilds into something different. When every service
passes on every node, P4b-U4 shows the fleet converged on the new revision with
the order it took, and monitoring watches it from here.

Notes: Supply.Seed is a precondition of every rollout — a drifted unfed node
cannot deploy offline. This slice was split from the former updates-rollout-rollback
at the U4/U4x line (to-tickets granularity gate, 2026-07-25); rollback and
quarantine are updates-rollback-quarantine's. Flow:
docs/ux/flows/p4b-updates.mermaid.

Acceptance criteria

  • (story 28) Given a security or patch release and auto-security on, when it arrives, then it is not queued for approval; it waits for the community's maintenance window and then rolls out.
  • (story 29) Given an update applying (approved or automatic), when it rolls out, then closures are seeded to every node first, a canary deploys and passes its health checks, then the rest follow, with the gateway last.
  • (story 30) Given a rollout, when the canary is chosen, then it is never the gateway, never a quorum-role holder, and never the sole home of any dataset; the gateway is always updated last.
  • (story 30) Given a fleet too small to have a qualifying canary, when a rollout runs, then it says so and proceeds one node at a time with a health gate between each.
  • (story 31) Given a rollout or retry, when it applies, then it applies the same exact revision/closure to every node.
  • (story 32) Given a rollout where every service passed on every node, when it finishes, then P4b-U4 shows the fleet converged on the new revision with the order it took, and monitoring watches it from here.

Blocked by

  • #62 — approval feeds the rollout

Task manifest

task: provisioning:updates-rollout-happy
implements_flow: p4b-updates
implements_edge: U1→U3, U3→U4, U4→P5-S1
wireframe:
  - docs/ux/wireframes/p4b-updates/p4b-u3-rolling-out.html
  - docs/ux/wireframes/p4b-updates/p4b-u4-applied.html
interface: "`update` orchestrator seam — rollout(release) auto-applies security/patch in the maintenance window without approval, then runs the caller-scripted stages seed → canary → health-gate → rest with the gateway last (ADR 0066); chooses the canary by rule (never gateway/quorum/sole-data-home) with a one-at-a-time small-fleet fallback; applies the same exact closure on retry; converged+healthy → applied (P4b-U4)"
seam: "`update` orchestrator seam tests (control plane, Go) — fake channel, fake clock (maintenance windows), fake `clan.Clan` (`Deploy`), per-service `HealthCheck` fakes, fake `Supply` (unfed nodes); asserts unattended in-window auto-security, seed→canary→rest gateway-last, canary-by-rule + tiny-fleet fallback, identical-closure retry, and applied = converged and healthy"
acceptance:
  - given: a security or patch release and auto-security on
    when: it arrives
    then: it is not queued for approval; it waits for the maintenance window then rolls out
  - given: an update applying (approved or automatic)
    when: it rolls out
    then: closures are seeded to every node first, a canary deploys and passes its checks, then the rest follow with the gateway last
  - given: a rollout
    when: the canary is chosen
    then: it is never the gateway, a quorum-role holder, or the sole home of any dataset; and a fleet too small for a qualifying canary proceeds one node at a time with a health gate between each
  - given: a rollout or retry
    when: it applies
    then: it applies the same exact revision/closure to every node
  - given: a rollout where every service passed on every node
    when: it finishes
    then: P4b-U4 shows the fleet converged on the new revision with the order it took, and monitoring watches from here
depends_on: [updates-review-approve]
out_of_scope:
  - "story 33–35 automatic rollback, retry budget, and quarantine — updates-rollback-quarantine's"
  - "story 36–38 policy and channel — updates-policy-channel's"
  - "the supply-chain internals behind Supply.Seed — ADR 0017, consumed here"
needs_human_decision: []
## Parent Feature spec: #17 (provisioning). ## What to build The happy-path rollout of the P4b journey, driven by the `update` orchestrator seam (the deploy runner scripts the stages — clan has no built-in canary). A security or patch release with auto-security on is *not* queued for approval: it waits for the community's maintenance window and then rolls out, exactly as an operator-approved update does — both are equally protected. Every rollout is staged and health-gated the same way (ADR 0066): closures are seeded to every node first, a canary deploys and passes its health checks, then the rest follow, with the gateway last. The canary is chosen by rule, never by the operator: never the gateway, never a quorum-role holder, never the sole home of any dataset. A fleet too small to have a qualifying canary says so and proceeds one node at a time with a health gate between each. A rollout or retry applies the same exact revision/closure to every node, so a retry never rebuilds into something different. When every service passes on every node, P4b-U4 shows the fleet converged on the new revision with the order it took, and monitoring watches it from here. Notes: `Supply.Seed` is a precondition of every rollout — a drifted unfed node cannot deploy offline. This slice was split from the former updates-rollout-rollback at the U4/U4x line (to-tickets granularity gate, 2026-07-25); rollback and quarantine are updates-rollback-quarantine's. Flow: `docs/ux/flows/p4b-updates.mermaid`. ## Acceptance criteria - [ ] (story 28) Given a security or patch release and auto-security on, when it arrives, then it is not queued for approval; it waits for the community's maintenance window and then rolls out. - [ ] (story 29) Given an update applying (approved or automatic), when it rolls out, then closures are seeded to every node first, a canary deploys and passes its health checks, then the rest follow, with the gateway last. - [ ] (story 30) Given a rollout, when the canary is chosen, then it is never the gateway, never a quorum-role holder, and never the sole home of any dataset; the gateway is always updated last. - [ ] (story 30) Given a fleet too small to have a qualifying canary, when a rollout runs, then it says so and proceeds one node at a time with a health gate between each. - [ ] (story 31) Given a rollout or retry, when it applies, then it applies the same exact revision/closure to every node. - [ ] (story 32) Given a rollout where every service passed on every node, when it finishes, then P4b-U4 shows the fleet converged on the new revision with the order it took, and monitoring watches it from here. ## Blocked by - #62 — approval feeds the rollout ## Task manifest ```yaml task: provisioning:updates-rollout-happy implements_flow: p4b-updates implements_edge: U1→U3, U3→U4, U4→P5-S1 wireframe: - docs/ux/wireframes/p4b-updates/p4b-u3-rolling-out.html - docs/ux/wireframes/p4b-updates/p4b-u4-applied.html interface: "`update` orchestrator seam — rollout(release) auto-applies security/patch in the maintenance window without approval, then runs the caller-scripted stages seed → canary → health-gate → rest with the gateway last (ADR 0066); chooses the canary by rule (never gateway/quorum/sole-data-home) with a one-at-a-time small-fleet fallback; applies the same exact closure on retry; converged+healthy → applied (P4b-U4)" seam: "`update` orchestrator seam tests (control plane, Go) — fake channel, fake clock (maintenance windows), fake `clan.Clan` (`Deploy`), per-service `HealthCheck` fakes, fake `Supply` (unfed nodes); asserts unattended in-window auto-security, seed→canary→rest gateway-last, canary-by-rule + tiny-fleet fallback, identical-closure retry, and applied = converged and healthy" acceptance: - given: a security or patch release and auto-security on when: it arrives then: it is not queued for approval; it waits for the maintenance window then rolls out - given: an update applying (approved or automatic) when: it rolls out then: closures are seeded to every node first, a canary deploys and passes its checks, then the rest follow with the gateway last - given: a rollout when: the canary is chosen then: it is never the gateway, a quorum-role holder, or the sole home of any dataset; and a fleet too small for a qualifying canary proceeds one node at a time with a health gate between each - given: a rollout or retry when: it applies then: it applies the same exact revision/closure to every node - given: a rollout where every service passed on every node when: it finishes then: P4b-U4 shows the fleet converged on the new revision with the order it took, and monitoring watches from here depends_on: [updates-review-approve] out_of_scope: - "story 33–35 automatic rollback, retry budget, and quarantine — updates-rollback-quarantine's" - "story 36–38 policy and channel — updates-policy-channel's" - "the supply-chain internals behind Supply.Seed — ADR 0017, consumed here" needs_human_decision: [] ```
Author
Owner

Done. The update orchestrator's rollout face (P4b-U3 → U4) is implemented and committed as e91023d.

What was built — internal/update/rollout.go: Rollout(ctx, revision), the happy-path deploy runner that scripts the staged, health-gated rollout (clan has no built-in canary, S13 Q7), driven off a new Fleet fleet-state reader port + the confirmed clan seam's Deploy + Supply.Seed.

  • story 28 — both an operator-approved (queued) and an automatic (auto-security-on security/patch) release wait for the community's maintenance window (Window.Contains(clock.Now()) → WaitingForWindow, touches no node until the window opens); the "not queued for approval" half is Poll's existing StateAutomatic placement, asserted here.
  • story 29 — closures are seeded to every node first (Supply precondition), then canary → rest → gateway last; a recording clan wrapper proves all seeds precede the first deploy and every node is fed after.
  • story 30 — the canary is chosen by rule (chooseCanary): never the gateway, never a quorum holder, never the sole home of any dataset, with its reason stated; the gateway/quorum nodes are excluded even when they have the fewest dependents. A fleet with no qualifying canary says so (TinyFleet) and proceeds one node at a time with a health gate between each, gateway still last.
  • story 31 — every stage and every retry applies the same exact revision/closure (asserted across a fail-then-recover retry so a retry never rebuilds into something different).
  • story 32 — applied = converged AND healthy (ADR 0061): the store's current is set converged on the new revision, the run recorded in the update history (ADR 0027), the release dropped from the active list, the surface rests at U1x — monitoring watches from here.

A failing health check is named (FailedNode/FailedCheck) and the rollout stops — the rollback/quarantine transitions it triggers are updates-rollback-quarantine's (#74, out of scope).

WithRollout(clan, fleet) wires the two new deps onto the existing New(store, src, clock), leaving the see-state / review / policy faces untouched.

Evidence — internal/update/rollout_test.go: 8 seam tests over a recording clan.Fake wrapper + FakeFleet + fake clock, one per acceptance clause. go / vet / gofmt clean; full internal/... suite green.

Done. The `update` orchestrator's rollout face (P4b-U3 → U4) is implemented and committed as `e91023d`. **What was built** — `internal/update/rollout.go`: `Rollout(ctx, revision)`, the happy-path deploy runner that scripts the staged, health-gated rollout (clan has no built-in canary, S13 Q7), driven off a new `Fleet` fleet-state reader port + the confirmed `clan` seam's `Deploy` + `Supply.Seed`. - **story 28** — both an operator-approved (queued) and an automatic (auto-security-on security/patch) release wait for the community's maintenance window (`Window.Contains(clock.Now())` → `WaitingForWindow`, touches no node until the window opens); the "not queued for approval" half is Poll's existing `StateAutomatic` placement, asserted here. - **story 29** — closures are seeded to every node first (Supply precondition), then canary → rest → gateway last; a recording clan wrapper proves all seeds precede the first deploy and every node is fed after. - **story 30** — the canary is chosen by rule (`chooseCanary`): never the gateway, never a quorum holder, never the sole home of any dataset, with its reason stated; the gateway/quorum nodes are excluded even when they have the fewest dependents. A fleet with no qualifying canary says so (`TinyFleet`) and proceeds one node at a time with a health gate between each, gateway still last. - **story 31** — every stage and every retry applies the same exact revision/closure (asserted across a fail-then-recover retry so a retry never rebuilds into something different). - **story 32** — applied = converged AND healthy (ADR 0061): the store's `current` is set converged on the new revision, the run recorded in the update history (ADR 0027), the release dropped from the active list, the surface rests at U1x — monitoring watches from here. A failing health check is named (`FailedNode`/`FailedCheck`) and the rollout stops — the rollback/quarantine transitions it triggers are updates-rollback-quarantine's (#74, out of scope). `WithRollout(clan, fleet)` wires the two new deps onto the existing `New(store, src, clock)`, leaving the see-state / review / policy faces untouched. **Evidence** — `internal/update/rollout_test.go`: 8 seam tests over a recording `clan.Fake` wrapper + `FakeFleet` + fake clock, one per acceptance clause. `go` / `vet` / `gofmt` clean; full `internal/...` suite green.
ben closed this issue 2026-07-25 12:28:21 +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#70
No description provided.