transport: provisioning-updates-live — provisioning and updates surfaces onto the real client #129

Closed
opened 2026-07-26 22:03:44 +00:00 by ben · 3 comments
Owner

Parent

ADR 0037. Filed from Ben's rulings 2026-07-26 after the review sweep of 6596977..9e946b7: integration-last was deliberate seam-first sequencing — now build the integration layer; and pay all standards debt now.

What to build

The provisioning surfaces (assess, select, review, deploy, active) and the updates surfaces (U1–U5x) move from fakes to real control-plane endpoints via the generated client, following the tracer's pattern.

Acceptance criteria

  • Given each named surface, its production client is the generated one and every flow its tests drive works against a real control plane.
  • Given the OpenAPI spec, it describes every endpoint these surfaces consume.
  • No fake remains in these surfaces' production wiring.

Blocked by

  • transport:control-plane-tracer.

Task manifest

task: transport:provisioning-updates-live
implements_flow: p4-provisioning
implements_edge: "provisioning + updates surfaces read/act over real HTTP"
wireframe: "the surfaces' existing wireframes (contracts unchanged; transport only)"
interface: "real endpoints + generated-client adoption for provisioning and updates surfaces"
seam: "integration tests per surface against a real control-plane process"
acceptance: "see Acceptance criteria above"
depends_on: [transport:control-plane-tracer]
out_of_scope: [screen changes, rollout mechanics]
needs_human_decision: []
## Parent ADR 0037. Filed from Ben's rulings 2026-07-26 after the review sweep of `6596977..9e946b7`: integration-last was deliberate seam-first sequencing — now build the integration layer; and pay all standards debt now. ## What to build The provisioning surfaces (assess, select, review, deploy, active) and the updates surfaces (U1–U5x) move from fakes to real control-plane endpoints via the generated client, following the tracer's pattern. ## Acceptance criteria - [ ] Given each named surface, its production client is the generated one and every flow its tests drive works against a real control plane. - [ ] Given the OpenAPI spec, it describes every endpoint these surfaces consume. - [ ] No fake remains in these surfaces' production wiring. ## Blocked by - transport:control-plane-tracer. ## Task manifest ```yaml task: transport:provisioning-updates-live implements_flow: p4-provisioning implements_edge: "provisioning + updates surfaces read/act over real HTTP" wireframe: "the surfaces' existing wireframes (contracts unchanged; transport only)" interface: "real endpoints + generated-client adoption for provisioning and updates surfaces" seam: "integration tests per surface against a real control-plane process" acceptance: "see Acceptance criteria above" depends_on: [transport:control-plane-tracer] out_of_scope: [screen changes, rollout mechanics] needs_human_decision: [] ```
Author
Owner

Blocked — needs a human scoping/design ruling (agent, 2026-07-27).

This slice cannot be delivered as scoped (transport-only, out_of_scope: [screen changes, rollout mechanics]), because the provisioning and updates seams are not transport-ready the way the tracer (#127), backups/rescue (#130), and members (#128) seams are. Two hard conflicts, both evidenced below.

1. The seams are synchronous; an HTTP client must be async

Every transport-ready seam in the repo returns Promises so a generated (fetch-based) client can implement it:

  • monitoring (tracer): status(): Promise<FleetStatusView> …
  • backups (#130): overview(): Promise<BackupsOverview> …
  • members (#128): members(): Promise<MembersListView> …

The provisioning/updates seams are synchronous and were built without transport in mind:

  • AssessSource.assess(deviceId): Assessment (and changeSetup, forRole, reviewImpact, retryService) — plus deploy(...) which streams progress via an onProgress callback and returns synchronously.
  • UpdateStateSource.state(): UpdatesSurface
  • UpdatePolicySource.policy(): UpdatePolicy / setPolicy / setChannel / securityIndicator()
  • UpdateReviewSource.review(revision): ReviewView | null / approve / skip

The screens consume them synchronously in computed() — e.g. UpdatesSurface.vue: const surface = computed(() => props.source.state()), props.reviewSource?.review(revision), props.rolloutSource?.rollout(); AssessScreen/UpdatesScreen render straight off sync props. A fetch-based client cannot implement a synchronous interface, so adopting the generated client requires making these seams Promise-returning and restructuring every provisioning + updates component (loading refs, onMounted/watch, loading states) — which is a screen change, explicitly out of scope. deploy's streaming callback also implies rollout mechanics (SSE/polling), also out of scope.

2. There is no production composition root to wire a real client into

Acceptance clause 3 is "No fake remains in these surfaces' production wiring." But SetupSurface/UpdatesSurface are not composed anywhere in production — they appear only in components/provisioning/*.vue and their tests. The dashboard's mount table (ADR 0094) has six tabs (overview/fleet/services/members/backups/settings) and does not include the P4 provisioning journey or the P4b updates surface (Settings mounts only a read-only UpdatesSummary, not the live surface). The operator app doesn't compose them either. So there is no "production wiring" for a real client to replace — the same class of blocker #130 escalated for rescue.

Decisions a human needs to make

  1. Re-scope to allow the seam to-async refactor + the consequent screen updates across provisioning/updates (a large slice, not transport-only), or file a preceding slice "make the provisioning/updates seams async (transport-ready)" that #129 then builds on — mirroring how monitoring/backups/members shipped async from the start.
  2. Decide where these surfaces compose in production (a new composition root / app-side shell for the P4 setup journey and P4b updates) — likely needs-design, since no mount/flow currently homes them.
  3. Confirm whether deploy's streaming and the update rollout belong here or stay under "rollout mechanics".

A Go-only partial (OpenAPI spec + internal/provision/internal/update control-plane handlers + Go integration tests) is buildable and in the spirit of the "real endpoints" half, but it would satisfy none of the acceptance clauses (which require the surfaces' production client to be the generated one over a real control plane), so I've not shipped a half-slice that fails its own contract without a ruling.

Swapping ready-for-agent → ready-for-human.

**Blocked — needs a human scoping/design ruling (agent, 2026-07-27).** This slice cannot be delivered as scoped (transport-only, `out_of_scope: [screen changes, rollout mechanics]`), because the provisioning and updates seams are **not transport-ready** the way the tracer (#127), backups/rescue (#130), and members (#128) seams are. Two hard conflicts, both evidenced below. ### 1. The seams are synchronous; an HTTP client must be async Every transport-ready seam in the repo returns Promises so a generated (fetch-based) client can implement it: - monitoring (tracer): `status(): Promise<FleetStatusView>` … - backups (#130): `overview(): Promise<BackupsOverview>` … - members (#128): `members(): Promise<MembersListView>` … The provisioning/updates seams are **synchronous** and were built without transport in mind: - `AssessSource.assess(deviceId): Assessment` (and `changeSetup`, `forRole`, `reviewImpact`, `retryService`) — plus `deploy(...)` which **streams** progress via an `onProgress` callback and returns synchronously. - `UpdateStateSource.state(): UpdatesSurface` - `UpdatePolicySource.policy(): UpdatePolicy` / `setPolicy` / `setChannel` / `securityIndicator()` - `UpdateReviewSource.review(revision): ReviewView | null` / `approve` / `skip` The screens consume them **synchronously in `computed()`** — e.g. `UpdatesSurface.vue`: `const surface = computed(() => props.source.state())`, `props.reviewSource?.review(revision)`, `props.rolloutSource?.rollout()`; `AssessScreen`/`UpdatesScreen` render straight off sync props. A `fetch`-based client cannot implement a synchronous interface, so adopting the generated client requires making these seams `Promise`-returning and restructuring **every** provisioning + updates component (loading refs, `onMounted`/`watch`, loading states) — which is a **screen change**, explicitly out of scope. `deploy`'s streaming callback also implies rollout mechanics (SSE/polling), also out of scope. ### 2. There is no production composition root to wire a real client into Acceptance clause 3 is "No fake remains in these surfaces' **production wiring**." But `SetupSurface`/`UpdatesSurface` are **not composed anywhere in production** — they appear only in `components/provisioning/*.vue` and their tests. The dashboard's mount table (ADR 0094) has six tabs (overview/fleet/services/members/backups/settings) and does not include the P4 provisioning journey or the P4b updates surface (Settings mounts only a read-only `UpdatesSummary`, not the live surface). The operator app doesn't compose them either. So there is no "production wiring" for a real client to replace — the same class of blocker #130 escalated for rescue. ### Decisions a human needs to make 1. **Re-scope** to allow the seam to-async refactor + the consequent screen updates across provisioning/updates (a large slice, not transport-only), **or** file a preceding slice "make the provisioning/updates seams async (transport-ready)" that #129 then builds on — mirroring how monitoring/backups/members shipped async from the start. 2. **Decide where these surfaces compose in production** (a new composition root / app-side shell for the P4 setup journey and P4b updates) — likely `needs-design`, since no mount/flow currently homes them. 3. Confirm whether `deploy`'s streaming and the update rollout belong here or stay under "rollout mechanics". A Go-only partial (OpenAPI spec + `internal/provision`/`internal/update` control-plane handlers + Go integration tests) is buildable and in the spirit of the "real endpoints" half, but it would satisfy none of the acceptance clauses (which require the surfaces' production client to *be* the generated one over a real control plane), so I've not shipped a half-slice that fails its own contract without a ruling. Swapping `ready-for-agent` → `ready-for-human`.
Author
Owner

Human ruling (relayed from the Mattermost ask thread, 2026-07-27 17:27 UTC).

The blocked run's final question (17:22) offered:

(A) TRANSPORT-ONLY (mirrors rescue in #130): OpenAPI endpoints + regenerated client + async HttpProvisionClient/HttpUpdatesClient + Go integration tests + per-surface live-HTTP integration tests; leave the sync→async surface refactor + composition as a documented follow-up.
(B) FULL: also refactor SetupSurface/UpdatesSurface to async so they run over the real clients end to end (treating the transport wiring as in-scope, not a 'screen change').

Ben's answer: "B implement fully."

So for the parking comment's decision list: decision 1 is ruled — expand scope: the sync→async conversion of the provisioning/updates seams (AssessSource, UpdateStateSource, UpdateReviewSource, UpdatePolicySource, RolloutSource) and the consequent SetupSurface/UpdatesSurface + component-test updates are in-scope transport wiring for this slice (the rendered wireframe field/element contract stays unchanged), on top of the OpenAPI endpoints, control-plane handlers over the real orchestrators, generated client, and async HTTP clients with integration tests.

Decisions 2 (production composition root for these surfaces) and 3 (deploy/rollout streaming transport) were not explicitly in the answered question — "implement fully" leans end-to-end, but if either forces work you judge out of scope even under this ruling, ask via ask-human.sh (asks now resume one thread per issue and recover late replies — b5fa537) rather than guessing.

Re-adding ready-for-agent.

**Human ruling (relayed from the Mattermost ask thread, 2026-07-27 17:27 UTC).** The blocked run's final question (17:22) offered: > **(A) TRANSPORT-ONLY** (mirrors rescue in #130): OpenAPI endpoints + regenerated client + async HttpProvisionClient/HttpUpdatesClient + Go integration tests + per-surface live-HTTP integration tests; leave the sync→async surface refactor + composition as a documented follow-up. > **(B) FULL**: also refactor SetupSurface/UpdatesSurface to async so they run over the real clients end to end (treating the transport wiring as in-scope, not a 'screen change'). **Ben's answer: "B implement fully."** So for the parking comment's decision list: **decision 1 is ruled — expand scope**: the sync→async conversion of the provisioning/updates seams (AssessSource, UpdateStateSource, UpdateReviewSource, UpdatePolicySource, RolloutSource) and the consequent SetupSurface/UpdatesSurface + component-test updates are in-scope transport wiring for this slice (the rendered wireframe field/element contract stays unchanged), on top of the OpenAPI endpoints, control-plane handlers over the real orchestrators, generated client, and async HTTP clients with integration tests. Decisions 2 (production composition root for these surfaces) and 3 (deploy/rollout streaming transport) were not explicitly in the answered question — "implement fully" leans end-to-end, but if either forces work you judge out of scope even under this ruling, ask via `ask-human.sh` (asks now resume one thread per issue and recover late replies — `b5fa537`) rather than guessing. Re-adding `ready-for-agent`.
Author
Owner

Done — provisioning + updates surfaces live over HTTP (commit d7370ef, on origin/main).

Per Ben's "B implement fully" ruling, the sync provision/update seams were converted async and their components refactored, then wired live:

  • Seams async (AssessSource, UpdateStateSource, UpdatePolicySource, UpdateReviewSource, RolloutSource — all Promise-returning) and the 5 source-consuming components (SetupSurface, UpdatesSurface, UpdatePolicyScreen, ReviewUpdateScreen, RolledBackScreen) refactored to ref+onMounted+reload. Wireframe contract unchanged; all 11 component test suites green (628 dashboard tests).
  • 14 OpenAPI endpoints + internal/controlapi/provision.go / updates.go (WithProvision / WithUpdates, thin projections over the real provision / update orchestrators; picked P4-S2 row keys resolve to a SetupSelection by splitting on @; ReviewView enriched with channel / signed_by). main.go wires resting orchestrators (#132 bars prod fakes).
  • dashboard/src/lib/api/provisionClient.ts + updatesClient.ts in productionDashboardDeps — no fake in the wired faces. Proven by Go httptests over the real orchestrators (*_integration_test.go) and node-env TS round-trips (provisionLive.test.ts / updatesLive.test.ts) meeting at the spec. Generator now emits Record<string,unknown> for property-less object schemas (was an empty interface, lint-rejected #148).
  • deploy is request/response (POST → final DeployRun, fired once through onProgress; the ImpactAction is a client-side confirm, off-wire).

Acceptance: clauses 1–3 hold for the assess/select/review/deploy/active provisioning surfaces and the state/policy/channel/security-indicator/review updates surfaces.

Deferred (not re-openable here — genuinely out of #129's scope):

  1. Rollout live transport (U3/U4/U4x) → filed as #149. RolloutSource.rollout() is a read of in-flight rollout state, which internal/update does not retain or expose — backing it is rollout mechanics (this manifest's out_of_scope, and not covered by the "B" expansion). Decision 3 was raised on the Mattermost ask thread for this issue and timed out with no reply, so per the manifest's written default rolloutSource is left unwired in production (the surface routes rollout out; no fake stands in — the #128 drill-in discipline). #149 carries the decision + build.
  2. Tab-mounting the P4 / P4b surfaces into the dashboard chrome (decision 2) — needs-design: no flow homes them as tabs. The production clients ride the composition value, ready for the mount.

Verification: go build/vet/test (+ -tags dev) and broker green; golangci-lint clean; check:client in sync; dashboard 628 vitest + vue-tsc + eslint . green.

**Done — provisioning + updates surfaces live over HTTP (commit `d7370ef`, on `origin/main`).** Per Ben's "B implement fully" ruling, the sync provision/update seams were converted async and their components refactored, then wired live: - **Seams async** (`AssessSource`, `UpdateStateSource`, `UpdatePolicySource`, `UpdateReviewSource`, `RolloutSource` — all Promise-returning) and the 5 source-consuming components (`SetupSurface`, `UpdatesSurface`, `UpdatePolicyScreen`, `ReviewUpdateScreen`, `RolledBackScreen`) refactored to `ref`+`onMounted`+`reload`. Wireframe contract unchanged; all 11 component test suites green (628 dashboard tests). - **14 OpenAPI endpoints** + `internal/controlapi/provision.go` / `updates.go` (`WithProvision` / `WithUpdates`, thin projections over the real `provision` / `update` orchestrators; picked P4-S2 row keys resolve to a `SetupSelection` by splitting on `@`; `ReviewView` enriched with `channel` / `signed_by`). `main.go` wires resting orchestrators (#132 bars prod fakes). - **`dashboard/src/lib/api/provisionClient.ts` + `updatesClient.ts`** in `productionDashboardDeps` — no fake in the wired faces. Proven by Go httptests over the real orchestrators (`*_integration_test.go`) and node-env TS round-trips (`provisionLive.test.ts` / `updatesLive.test.ts`) meeting at the spec. Generator now emits `Record<string,unknown>` for property-less object schemas (was an empty `interface`, lint-rejected #148). - `deploy` is request/response (POST → final `DeployRun`, fired once through `onProgress`; the `ImpactAction` is a client-side confirm, off-wire). **Acceptance:** clauses 1–3 hold for the assess/select/review/deploy/active provisioning surfaces and the state/policy/channel/security-indicator/review updates surfaces. **Deferred (not re-openable here — genuinely out of #129's scope):** 1. **Rollout live transport (U3/U4/U4x) → filed as #149.** `RolloutSource.rollout()` is a read of *in-flight* rollout state, which `internal/update` does not retain or expose — backing it is **rollout mechanics** (this manifest's `out_of_scope`, and not covered by the "B" expansion). Decision 3 was raised on the Mattermost ask thread for this issue and **timed out with no reply**, so per the manifest's written default `rolloutSource` is left **unwired** in production (the surface routes rollout out; no fake stands in — the #128 drill-in discipline). #149 carries the decision + build. 2. **Tab-mounting the P4 / P4b surfaces into the dashboard chrome** (decision 2) — needs-design: no flow homes them as tabs. The production clients ride the composition value, ready for the mount. Verification: `go build/vet/test` (+ `-tags dev`) and broker green; golangci-lint clean; `check:client` in sync; dashboard 628 vitest + vue-tsc + `eslint .` green.
ben closed this issue 2026-07-27 19:11:44 +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#129
No description provided.