transport: device-add-live (reactive-seam ruling required) #151
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#151
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Split from #128 (parent: ADR 0037) per Ben's approval on 2026-07-27 to break the six-surface transport slice into per-surface follow-ups.
Context
From #128's handback comment: device-add's seams are reactive-store shaped, not request/response —
CodesLedgerSource.listCodes()is a synchronous snapshotDeviceAddSource/PendingSourceusewatch()subscriptions plus sync config getters (communityDomain()/releaseChannel())Making these "live over HTTP" needs reactive HTTP stores that poll/cache — a shape the members migration (request/response) didn't need to solve.
Open question — needs a ruling before implementation starts
Is a reactive HTTP store (poll/cache) compatible with the manifest's
out_of_scope: [screen changes], or does a real reactive source require a component/seam change? This is a design call, not an implementation detail — flagged explicitly by the agent as something it shouldn't guess.What to build (once ruled on)
Wire
CodesLedgerSource,DeviceAddSourceandPendingSourceonto the real control plane, in whatever shape the ruling above settles on.Acceptance criteria
Blocked by
main)Task manifest
Human ruling (Ben, in-session 2026-07-28): the reactive HTTP store is IN-SCOPE transport wiring — the #129 "B implement fully" precedent extends to reactive-store-shaped seams.
Concretely, for the
needs_human_decisionquestion in the manifest:CodesLedgerSource,DeviceAddSourceandPendingSourcebehind their existingwatch()contracts: the store polls the corresponding GET endpoint while ≥1 watcher is subscribed, stops at zero (the fakes'watcherCount()cleanup discipline carries over), and pushes to watchers on change.pending.ts's own contract comment already names this production shape ("List as a watched query").communityDomain()/releaseChannel(), andlistCodes()'s synchronous snapshot) following the established #129/#152/#153 sync→async precedent, with the consequent component refactors (ref+onMounted+reload) in-scope.out_of_scope: [screen changes]means the design contract, not component code (the settled reading of the B ruling).productionDashboardDeps(the pending strip's deliberate unwired slot atmountRegistry.tsis waiting for exactly this) — no fake in production wiring (#132).Re-labelling
ready-for-human→ready-for-agent.Blocked → ready-for-human (Sandcastle, 2026-07-28): a new seam-DATA gap on the pending strip, distinct from the reactive-shape question already ruled on.
Implementing Ben's 2026-07-28 ruling, two of the three sources are cleanly buildable and I am ready to ship them the moment the fork below is settled:
CodesLedgerSource (DF2/A4) and DeviceAddSource (P2/P3 mint + call-in) wire against the existing
enroll.Operatorface —ListCodes/MintCode/RevokeCode, the call-in watcher polled from the code's ledger state (active= waiting, else called-in), andcommunityDomain()/releaseChannel()served from control-plane config (ADR 0054). No seam change, no fakes.PendingSource (Fleet P2-S4/S5 strip) is blocked. The P2-S4 wireframe card renders
name(tōtara),community,code,issuedBy,issuedAgo. The Operator face'sListreturnsRequestView, which carries none of these (onlystatus/probe/mode/network). So a real pending GET cannot fill the card without either (a) anenroll-domain projection change adding those display fields — a seam change in another slice, which the ruling put out of scope — or (b) inventingname/issuer/communityin the handler, a production fake (ADR 0100 + acceptance clause 3 forbid it).Ruling item 3 requires the P2-S4 fields to stay rendered, but the enroll seam cannot supply them today — a genuine fork the reactive-shape ruling did not resolve. A human must pick:
name/issuer/community/code) to theenrollOperator face — the strip stays deliberately unwired-not-faked until then (exactly its state today).enrollpending-projection in-scope for #151 (allow the seam change the ruling deferred), then wire all three here.RequestViewas-is, rendering the card withoutname/issuer/community— a wireframe deviation until enroll grows those fields.An
ask-humanwas posted to Mattermost (threadmfhexod73pgzudpqj3gcteusba) and timed out with no reply in 20 min; a late reply resumes that same thread. No code was changed this iteration. Re-arm withready-for-agentonce the fork is chosen.Human ruling (Ben, 2026-07-30): Option A — ship the two unblocked sources now; the pending strip splits out.
enroll.Operatorface, reactive per the poll/cache ruling — no seam change, no fakes. The pending strip stays deliberately unwired-not-faked here (its state today).transport:pending-strip-live, blocked by this ticket via native dependency): the additive pending projection on the Operator face (name / community / code / issuedBy / issuedAt) plus the strip's live wiring — the deliberate seam growth recorded in its own ticket rather than slipped into this one.Re-armed
ready-for-agent. The ask-human thread (mfhexod73pgzudpqj3gcteusba) is answered with the same ruling.Done (Ruling A) — landed on
mainas commit8ec3496(sandcastle: transport:device-add-live #151).What shipped — the DF2/A4 codes ledger and the P2/P3 mint + call-in watcher now read/act over
enroll's Operator face live over HTTP, per Ben's reactive poll/cache ruling (Option A, 2026-07-30). No seam change, no fakes.packages/openapi-spec/openapi.yaml):GET/POST /enroll/codes,POST /enroll/codes/{code}/revoke,GET /enroll/config(the install/download config, ADR 0054) +CodeView/CodeState/MintCodeRequest/EnrollConfigschemas.generated.tsregenerated;check:clientin sync.internal/controlapi/enroll.go):WithEnroll(EnrollCodesService, EnrollConfig)— a thin projection over the real*enroll.Ledger(the Operator face satisfies the narrow port by construction). Go seam test (enroll_integration_test.go): mint→list→revoke, redeem-binds→called-in, unknown→404, config read.src/lib/api/enrollClient.ts):HttpCodesLedgerClient(caches the ledger read, serves synclistCodes(), re-reads after revoke — one ledger, two views) andHttpDeviceAddClient(mint/revoke; synccommunityDomain()/releaseChannel()from a cached config read;watchCallInpolls the ledger read — active → waiting, else called-in; polling stops at zero watchers). Both wired real intoproductionDashboardDeps(newdeviceAdd/codesLedgerslots); not tab-bound yet (their mount is a needs-design decision), riding the composition value like provisioning/updates. Node-env round-trip testenrollLive.test.ts.Acceptance
productionDashboardDepsuses the real Http clients). ✅Verify:
go build/vet/gofmtclean;go test ./internal/controlapi ./internal/enroll ./control-plane/...ok; openapicheck:clientin sync;vue-tscclean; all 678 dashboard tests green.Scope kept: the pending strip (P2-S4/S5) stayed deliberately unwired-not-faked here — it splits out as #184 (
transport:pending-strip-live), now unblocked by this close.Note for the compose follow-up:
WithEnrollis built and integration-tested but not yet registered incontrol-plane/cmd/control-plane/main.go— wiring the real enroll ledger + itsEnrollConfig(community domain / release channel from clan vars, ADR 0054) into the composition root is the compose ticket's job (the #128→#155 precedent).