transport: members-devices-live — members, device-add and shell surfaces onto the real client #128

Closed
opened 2026-07-26 22:03:42 +00:00 by ben · 2 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

Following the tracer's pattern: the members surface (list, invite, approval, removal, komiti), the device-add dashboard surfaces (codes ledger, watcher), and the shell's overview/fleet/device/logs/settings reads move from fake clients to real control-plane endpoints via the generated client.

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 any of these surfaces' production wiring.

Blocked by

  • transport:control-plane-tracer — the pattern and the lib/api layer.

Task manifest

task: transport:members-devices-live
implements_flow: p6-members
implements_edge: "members + device-add + shell dashboard surfaces read/act over real HTTP"
wireframe: "the surfaces' existing wireframes (contracts unchanged; transport only)"
interface: "real endpoints + generated-client adoption for members, device-add and shell 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, seam behaviour changes]
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 Following the tracer's pattern: the members surface (list, invite, approval, removal, komiti), the device-add dashboard surfaces (codes ledger, watcher), and the shell's overview/fleet/device/logs/settings reads move from fake clients to real control-plane endpoints via the generated client. ## 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 any of these surfaces' production wiring. ## Blocked by - transport:control-plane-tracer — the pattern and the lib/api layer. ## Task manifest ```yaml task: transport:members-devices-live implements_flow: p6-members implements_edge: "members + device-add + shell dashboard surfaces read/act over real HTTP" wireframe: "the surfaces' existing wireframes (contracts unchanged; transport only)" interface: "real endpoints + generated-client adoption for members, device-add and shell 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, seam behaviour changes] needs_human_decision: [] ```
Author
Owner

Members half delivered and live over HTTP (commit on main: b66d70b / c03c5a9). Also un-broke the transport test suite, which was red on origin/main.

Done this iteration — no fake remains in the wired Members faces

The P6-S1 Members surface's three wired faces read+act LIVE over the generated client against the real member orchestrator (ADR 0077), following the tracer's/backups' pattern:

  • OpenAPI: 7 new paths+schemas — GET /members (list + AWAITING-APPROVAL groups + first-run flag), invite mint/list/revoke, by-hand, approve-group, decline. Mint returns an InviteRow (server-derived open status).
  • Go: internal/controlapi/members.go + a WithMembers option — a thin projection over member.Orchestrator (attribution from the operator header, faults → the shared Problem), never a parallel store.
  • Dashboard: dashboard/src/lib/api/membersClient.ts (one HttpMembersClient satisfies MembersListClient + ApprovalQueueClient + InviteClient), wired into productionDashboardDeps.
  • Proven at the seam: a Go httptest over the REAL orchestrator (members_integration_test.go) + a node-env TS client round-trip (membersLive.test.ts) meet at the spec.

Also fixed (both were red on main, blocking every transport slice's tests)

  • The client generator emitted \` (backslash+backtick) for parameterised path literals → every such op in the checked-in generated.ts was a syntax error; the four transport test files (tracer/backups/rescue/monitor-fault) could not even load. Fixed the template.
  • String-enum values with apostrophes (hasn't signed in yet) were unescaped → syntax error. Escaped them.
  • dashboard/vitest.config.ts: disabled happy-dom's same-origin policy so the cross-origin live-HTTP tests actually run; fixed two pre-existing .get().exists() type errors unmasked once generated.ts compiles.

Verified green: go build/vet/test ./..., golangci-lint (controlapi), openapi check:client, dashboard vue-tsc, eslint, all 53 dashboard vitest files.

Why I'm handing this back for a scoping/design decision

This slice bundles six surfaces (members + device-add + shell overview/fleet/settings). The members half is a clean request/response migration and is done. The remainder is large and carries a genuine design question I shouldn't guess:

  1. device-add — its seams are reactive-store shaped, not request/response: CodesLedgerSource.listCodes() is a synchronous snapshot, and DeviceAddSource/PendingSource use watch() subscriptions + sync config getters (communityDomain()/releaseChannel()). Making these "live over HTTP" needs reactive HTTP stores that poll/cache. Is that compatible with the manifest's out_of_scope: [screen changes], or does a real reactive source require a component/seam change? This needs a ruling.
  2. shell overview / fleet are multi-owner aggregations (overview fans out over monitoring+backups+enroll+members+provisioning; fleet joins fleetstate × monitoring per-node chip) — each warrants its own aggregating control-plane endpoint + slice.
  3. shell settings (brandkit + update summary + community details) and the members drill-ins (detail/komiti/removal) are further single-owner migrations.
  4. The main.go composition-root wiring of a resting member orchestrator was deferred (exactly like #130 deferred rescue's composition wiring): #132 bars prod fakes, so it needs fail-loud resting stubs for the 12 ports, and the founder-row seeding is founding's concern.

Recommendation: split #128 into per-surface follow-ups — members-drill-ins, device-add-live (with the reactive-seam ruling), shell-fleet-live, shell-settings-live, shell-overview-live, and a members-compose-controlplane (the main.go wiring). The members transport is on main and ready to build on.

**Members half delivered and live over HTTP** (commit on `main`: `b66d70b` / `c03c5a9`). Also un-broke the transport test suite, which was **red on `origin/main`**. ## Done this iteration — no fake remains in the wired Members faces The P6-S1 Members surface's three **wired** faces read+act LIVE over the generated client against the real `member` orchestrator (ADR 0077), following the tracer's/backups' pattern: - **OpenAPI:** 7 new paths+schemas — `GET /members` (list + AWAITING-APPROVAL groups + first-run flag), invite mint/list/revoke, by-hand, approve-group, decline. Mint returns an `InviteRow` (server-derived `open` status). - **Go:** `internal/controlapi/members.go` + a `WithMembers` option — a thin projection over `member.Orchestrator` (attribution from the operator header, faults → the shared `Problem`), never a parallel store. - **Dashboard:** `dashboard/src/lib/api/membersClient.ts` (one `HttpMembersClient` satisfies `MembersListClient` + `ApprovalQueueClient` + `InviteClient`), wired into `productionDashboardDeps`. - **Proven at the seam:** a Go `httptest` over the REAL orchestrator (`members_integration_test.go`) + a node-env TS client round-trip (`membersLive.test.ts`) meet at the spec. ## Also fixed (both were red on `main`, blocking every transport slice's tests) - The client generator emitted `` \` `` (backslash+backtick) for parameterised path literals → **every such op in the checked-in `generated.ts` was a syntax error**; the four transport test files (tracer/backups/rescue/monitor-fault) could not even load. Fixed the template. - String-enum values with apostrophes (`hasn't signed in yet`) were unescaped → syntax error. Escaped them. - `dashboard/vitest.config.ts`: disabled happy-dom's same-origin policy so the cross-origin live-HTTP tests actually run; fixed two pre-existing `.get().exists()` type errors unmasked once `generated.ts` compiles. Verified green: `go build/vet/test ./...`, golangci-lint (controlapi), openapi `check:client`, dashboard `vue-tsc`, eslint, all 53 dashboard vitest files. ## Why I'm handing this back for a scoping/design decision This slice bundles **six surfaces** (members + device-add + shell overview/fleet/settings). The members half is a clean request/response migration and is done. The remainder is large **and** carries a genuine design question I shouldn't guess: 1. **device-add** — its seams are **reactive-store shaped**, not request/response: `CodesLedgerSource.listCodes()` is a **synchronous snapshot**, and `DeviceAddSource`/`PendingSource` use `watch()` **subscriptions** + sync config getters (`communityDomain()`/`releaseChannel()`). Making these "live over HTTP" needs reactive HTTP stores that poll/cache. **Is that compatible with the manifest's `out_of_scope: [screen changes]`,** or does a real reactive source require a component/seam change? This needs a ruling. 2. **shell overview / fleet** are **multi-owner aggregations** (overview fans out over monitoring+backups+enroll+members+provisioning; fleet joins `fleetstate` × monitoring per-node chip) — each warrants its own aggregating control-plane endpoint + slice. 3. **shell settings** (brandkit + update summary + community details) and the **members drill-ins** (detail/komiti/removal) are further single-owner migrations. 4. The **`main.go` composition-root wiring** of a resting `member` orchestrator was deferred (exactly like #130 deferred rescue's composition wiring): #132 bars prod fakes, so it needs fail-loud resting stubs for the 12 ports, and the founder-row seeding is founding's concern. **Recommendation:** split #128 into per-surface follow-ups — `members-drill-ins`, `device-add-live` (with the reactive-seam ruling), `shell-fleet-live`, `shell-settings-live`, `shell-overview-live`, and a `members-compose-controlplane` (the `main.go` wiring). The members transport is on `main` and ready to build on.
Author
Owner

Split approved by Ben (2026-07-27). Members transport is done and stays on main. Remaining work continues as:

  • #150 transport:members-drill-ins
  • #151 transport:device-add-live (carries the open reactive-seam ruling)
  • #152 transport:shell-fleet-live
  • #153 transport:shell-overview-live
  • #154 transport:shell-settings-live
  • #155 transport:members-compose-controlplane

Closing this issue in favour of the six follow-ups above.

Split approved by Ben (2026-07-27). Members transport is done and stays on `main`. Remaining work continues as: - #150 transport:members-drill-ins - #151 transport:device-add-live (carries the open reactive-seam ruling) - #152 transport:shell-fleet-live - #153 transport:shell-overview-live - #154 transport:shell-settings-live - #155 transport:members-compose-controlplane Closing this issue in favour of the six follow-ups above.
ben closed this issue 2026-07-27 20:45:28 +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#128
No description provided.