transport: updates-rollout-live — the U3/U4/U4x rollout surface onto the real client (needs the rollout-state read) #149

Closed
opened 2026-07-27 19:11:13 +00:00 by ben · 2 comments
Owner

Parent

ADR 0037 / issue #129 (transport:provisioning-updates-live). Filed by the #129 swarm run 2026-07-27 (commit d7370ef) — the piece of #129 that could not land in scope.

What blocks it (decision 3, from #129's ruling)

#129 shipped the P4 provisioning surfaces and the P4b updates surfaces (state / policy / channel / security-indicator / review) LIVE over HTTP, and converted the rollout seam async along with the rest. But the rollout surface's live transport (U3 rolling-out / U4 applied / U4x rolled-back) could not go live:

  • RolloutSource.rollout() is a no-arg READ of the in-flight rollout view. internal/update.Orchestrator retains no queryable current-rollout state — Rollout(ctx,revision) / EndEarly / RetryByHand run synchronously and return a RolloutResult; there is no "read the rollout progress" method.
  • The TS RolloutView is far richer than the Go RolloutResult (title, startedAt, log, converged/total, membersSaw, rollback detail) — it needs a composition step over release metadata.

Backing rollout() live therefore requires building rollout-state retention + a progress read in internal/update — i.e. rollout mechanics, which #129's manifest lists as out_of_scope and Ben's "B implement fully" expansion did not cover. The ask on this (decision 3) posted to the Mattermost thread for #129 and timed out with no reply, so #129 proceeded on the manifest's written default: rolloutSource is left unwired in productionDashboardDeps (the surface routes rollout out; no fake stands in — the #128 drill-in discipline), and the rollout live client is this follow-up.

Decision a human needs to make

Whether to build the rollout-state read (rollout mechanics) in internal/update now, and if so its shape (retain the active rollout's staged progress; compose the rich RolloutView from RolloutResult + release metadata), so rollout() can be served by a real endpoint and the U3/U4/U4x screens go live end to end.

What to build (once ruled in)

  • internal/update: retain the in-flight/last rollout and expose a read that composes the full RolloutView (revision, title, started/applied, stages, converged/total, log, members-saw, rollback detail).
  • OpenAPI: GET /updates/rollout (+ the end-early / retry-by-hand acts, which back onto the existing EndEarly / RetryByHand).
  • internal/controlapi/updates.go: extend UpdateService + registerUpdates with the rollout read/acts.
  • dashboard/src/lib/api/updatesClient.ts: add the RolloutSource face (already async), and wire rolloutSource into productionDashboardDeps.updates.
  • Live + integration tests per the #129 pattern.

Task manifest

task: transport:updates-rollout-live
implements_flow: p4b-updates
implements_edge: "U3/U4/U4x rollout surface reads/acts over real HTTP"
wireframe: "docs/ux/wireframes/p4b-updates/{p4b-u3-rolling-out,p4b-u4-applied,p4b-u4x-rolled-back}.html (contracts unchanged; transport only)"
interface: "GET /updates/rollout + end-early/retry-by-hand acts, over a new rollout-state read in internal/update"
seam: "Go integration test over the real update orchestrator; node-env TS client round-trip"
acceptance: "the rollout surface's production client is the generated one and its U3/U4/U4x flow works against a real control plane; no fake in its production wiring"
depends_on: []
out_of_scope: [tab-mounting the P4b surface (needs-design, #129 decision 2)]
needs_human_decision:
  - "Whether to build rollout-state retention + a progress read in internal/update (this is rollout mechanics, out of scope for #129) — and its shape."
## Parent ADR 0037 / issue #129 (`transport:provisioning-updates-live`). Filed by the #129 swarm run 2026-07-27 (commit `d7370ef`) — the piece of #129 that could not land in scope. ## What blocks it (decision 3, from #129's ruling) #129 shipped the P4 provisioning surfaces and the P4b updates surfaces (state / policy / channel / security-indicator / review) LIVE over HTTP, and converted the rollout **seam** async along with the rest. But the rollout surface's **live transport** (U3 rolling-out / U4 applied / U4x rolled-back) could not go live: - `RolloutSource.rollout()` is a no-arg READ of the **in-flight** rollout view. `internal/update.Orchestrator` retains no queryable current-rollout state — `Rollout(ctx,revision)` / `EndEarly` / `RetryByHand` run synchronously and return a `RolloutResult`; there is no "read the rollout progress" method. - The TS `RolloutView` is far richer than the Go `RolloutResult` (title, startedAt, log, converged/total, membersSaw, rollback detail) — it needs a composition step over release metadata. Backing `rollout()` live therefore requires building **rollout-state retention + a progress read** in `internal/update` — i.e. **rollout mechanics**, which `#129`'s manifest lists as `out_of_scope` and Ben's "B implement fully" expansion did not cover. The ask on this (decision 3) posted to the Mattermost thread for #129 and timed out with no reply, so #129 proceeded on the manifest's written default: `rolloutSource` is left **unwired** in `productionDashboardDeps` (the surface routes rollout out; no fake stands in — the #128 drill-in discipline), and the rollout live client is this follow-up. ## Decision a human needs to make Whether to build the rollout-state read (rollout mechanics) in `internal/update` now, and if so its shape (retain the active rollout's staged progress; compose the rich `RolloutView` from `RolloutResult` + release metadata), so `rollout()` can be served by a real endpoint and the U3/U4/U4x screens go live end to end. ## What to build (once ruled in) - `internal/update`: retain the in-flight/last rollout and expose a read that composes the full `RolloutView` (revision, title, started/applied, stages, converged/total, log, members-saw, rollback detail). - OpenAPI: `GET /updates/rollout` (+ the `end-early` / `retry-by-hand` acts, which back onto the existing `EndEarly` / `RetryByHand`). - `internal/controlapi/updates.go`: extend `UpdateService` + `registerUpdates` with the rollout read/acts. - `dashboard/src/lib/api/updatesClient.ts`: add the `RolloutSource` face (already async), and wire `rolloutSource` into `productionDashboardDeps.updates`. - Live + integration tests per the #129 pattern. ## Task manifest ```yaml task: transport:updates-rollout-live implements_flow: p4b-updates implements_edge: "U3/U4/U4x rollout surface reads/acts over real HTTP" wireframe: "docs/ux/wireframes/p4b-updates/{p4b-u3-rolling-out,p4b-u4-applied,p4b-u4x-rolled-back}.html (contracts unchanged; transport only)" interface: "GET /updates/rollout + end-early/retry-by-hand acts, over a new rollout-state read in internal/update" seam: "Go integration test over the real update orchestrator; node-env TS client round-trip" acceptance: "the rollout surface's production client is the generated one and its U3/U4/U4x flow works against a real control plane; no fake in its production wiring" depends_on: [] out_of_scope: [tab-mounting the P4b surface (needs-design, #129 decision 2)] needs_human_decision: - "Whether to build rollout-state retention + a progress read in internal/update (this is rollout mechanics, out of scope for #129) — and its shape." ```
Author
Owner

Human ruling (Ben, in-session 2026-07-28): build it — sequenced after the mount design.

Answering the manifest's needs_human_decision:

  1. Yes, build rollout-state retention + the progress read, in the shape this ticket already specs: internal/update retains the in-flight + last rollout and exposes a read composing the full RolloutView (revision, title, started/applied, stages, converged/total, log, members-saw, rollback detail) from RolloutResult + release metadata; OpenAPI GET /updates/rollout plus the end-early / retry-by-hand acts over the existing EndEarly / RetryByHand.
  2. The U3 live-progress read follows the #151 ruling — the surface polls the read via a poll/cache store behind the existing (already-async) RolloutSource seam; SSE/push stays out of scope.
  3. Sequenced after #156 (the P4/P4b chrome-mount design) via a native dependency — Ben's call: don't ship a live read nobody can reach; the rollout read lands once the updates surface has a designed home. Tab-mounting itself stays #156's implementation follow-up, not this ticket.

The design question is answered, so needs-design/ready-for-human come off; re-labelling ready-for-agent. The frontier's native-dependency filter holds this ticket until #156 closes.

**Human ruling (Ben, in-session 2026-07-28): build it — sequenced after the mount design.** Answering the manifest's `needs_human_decision`: 1. **Yes, build rollout-state retention + the progress read**, in the shape this ticket already specs: `internal/update` retains the in-flight + last rollout and exposes a read composing the full `RolloutView` (revision, title, started/applied, stages, converged/total, log, members-saw, rollback detail) from `RolloutResult` + release metadata; OpenAPI `GET /updates/rollout` plus the `end-early` / `retry-by-hand` acts over the existing `EndEarly` / `RetryByHand`. 2. **The U3 live-progress read follows the #151 ruling** — the surface polls the read via a poll/cache store behind the existing (already-async) `RolloutSource` seam; SSE/push stays out of scope. 3. **Sequenced after #156** (the P4/P4b chrome-mount design) via a **native dependency** — Ben's call: don't ship a live read nobody can reach; the rollout read lands once the updates surface has a designed home. Tab-mounting itself stays #156's implementation follow-up, not this ticket. The design question is answered, so `needs-design`/`ready-for-human` come off; re-labelling `ready-for-agent`. The frontier's native-dependency filter holds this ticket until #156 closes.
Author
Owner

Done — the P4b rollout surface (U3/U4/U4x) goes real over HTTP. Commit 4eee3e7 on origin/main (sandcastle: transport:updates-rollout-live #149).

Human ruling followed (Ben, 2026-07-28, recorded in the comment above): built rollout-state retention + the progress read as specced, sequenced after #156 (which closed 2026-07-29, satisfying the native dependency); U3 read polls per the #151 poll/cache ruling, SSE/push out of scope.

What landed

  • internal/update now RETAINS the last rollout and composes the rich RolloutView (internal/update/rolloutview.go) from the seam's own RolloutResult + release metadata — revision/title/started/applied, the staged order, converged/total, the members-saw line and the U4x rollback detail (failing node/service, scope-matched mechanic, what the fleet is on now). The rollout core (rollout.go/rollback.go) sets the retained view at each terminal point (applied → U4, rolled-back → U4x), so the read is a pure projection (ADR 0037). The view is transient (not persisted in StoreDoc); the durable state a restart must not forget is the ADR 0067 attempt budget on active, which is already persisted.
  • OpenAPI: GET /updates/rollout (404 when no rollout has run → the client reads null and the surface rests at U1/U1x) + POST /updates/rollout/{revision}/{end-early,retry-by-hand}. internal/controlapi UpdateService grew RolloutState/EndEarly/RetryByHand over the real orchestrator; generated.ts regenerated, check:client in sync.
  • HttpUpdatesClient grew the RolloutSource face (a live pull the surface re-reads) and is wired REAL into productionDashboardDeps.updates.rolloutSource (was deliberately unwired-not-faked).

Evidence

  • Go integration tests over the REAL orchestrator (internal/controlapi/updates_rollout_integration_test.go): a real staged rollout → U4 applied and U4x rolled-back served over HTTP, plus end-early / retry-by-hand acts, and a no-rollout → 404.
  • Seam tests (internal/update/rolloutview_test.go): the applied/rolled-back compose and EndEarly.
  • Live-HTTP vitest (dashboard/tests/unit/updatesLive.test.ts): the RolloutSource reads/acts over a real Node server, 404 → null; the four wired updates faces are all HttpUpdatesClient.
  • go build ./... / go vet / gofmt clean; check:client in sync; all 684 dashboard tests green.

Out of scope / follow-ups (as the manifest notes)

  • The production main.go orchestrator is not yet WithRollout-wired (that live wiring is the engine-adapters arc), so the endpoint rests 404 until a real rollout runs — the same built-but-not-fully-composed discipline #184's WithEnrollPending uses. RetryByHand returns ErrNotRollable before touching the nil clan, so the endpoints are safe in production.
  • Tab-mounting the P4b surface stays #156's implementation follow-up.
Done — the P4b rollout surface (U3/U4/U4x) goes real over HTTP. Commit `4eee3e7` on `origin/main` (`sandcastle: transport:updates-rollout-live #149`). **Human ruling followed** (Ben, 2026-07-28, recorded in the comment above): built rollout-state retention + the progress read as specced, sequenced after #156 (which closed 2026-07-29, satisfying the native dependency); U3 read polls per the #151 poll/cache ruling, SSE/push out of scope. **What landed** - `internal/update` now RETAINS the last rollout and composes the rich `RolloutView` (`internal/update/rolloutview.go`) from the seam's own `RolloutResult` + release metadata — revision/title/started/applied, the staged order, converged/total, the members-saw line and the U4x rollback detail (failing node/service, scope-matched mechanic, what the fleet is on now). The rollout core (`rollout.go`/`rollback.go`) sets the retained view at each terminal point (applied → U4, rolled-back → U4x), so the read is a pure projection (ADR 0037). The view is transient (not persisted in `StoreDoc`); the durable state a restart must not forget is the ADR 0067 attempt budget on `active`, which is already persisted. - OpenAPI: `GET /updates/rollout` (404 when no rollout has run → the client reads null and the surface rests at U1/U1x) + `POST /updates/rollout/{revision}/{end-early,retry-by-hand}`. `internal/controlapi` `UpdateService` grew `RolloutState`/`EndEarly`/`RetryByHand` over the real orchestrator; `generated.ts` regenerated, `check:client` in sync. - `HttpUpdatesClient` grew the `RolloutSource` face (a live pull the surface re-reads) and is wired REAL into `productionDashboardDeps.updates.rolloutSource` (was deliberately unwired-not-faked). **Evidence** - Go integration tests over the REAL orchestrator (`internal/controlapi/updates_rollout_integration_test.go`): a real staged rollout → U4 applied and U4x rolled-back served over HTTP, plus end-early / retry-by-hand acts, and a no-rollout → 404. - Seam tests (`internal/update/rolloutview_test.go`): the applied/rolled-back compose and EndEarly. - Live-HTTP vitest (`dashboard/tests/unit/updatesLive.test.ts`): the RolloutSource reads/acts over a real Node server, 404 → null; the four wired updates faces are all `HttpUpdatesClient`. - `go build ./...` / `go vet` / `gofmt` clean; `check:client` in sync; all 684 dashboard tests green. **Out of scope / follow-ups** (as the manifest notes) - The production `main.go` orchestrator is not yet `WithRollout`-wired (that live wiring is the engine-adapters arc), so the endpoint rests 404 until a real rollout runs — the same built-but-not-fully-composed discipline #184's `WithEnrollPending` uses. `RetryByHand` returns `ErrNotRollable` before touching the nil clan, so the endpoints are safe in production. - Tab-mounting the P4b surface stays #156's implementation follow-up.
ben closed this issue 2026-07-30 06:23:58 +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#149
No description provided.