enroll: the gateway control plane wires no Granter — device-add approve fails loud (ErrNoCA) and reds the #854 drive's approve leg #945
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
2 participants
Notifications
Due date
No due date set.
Blocks
Reference
Matou/idss#945
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?
Failure
The #854 standing device drive (
test-results/drive-device/20260828T152314Z) ran 23 legs green and red atapproveafter the full 300 s ceiling (artifacts/legs.json,artifacts/verdict.json—firstRedLeg: approve, commite453b8f4). Playwright reports onlylocator('[data-field="connected-device"]')never appearing, but that is the symptom. The accessibility snapshot taken at the moment of failure shows the real answer already on screen:(
artifacts/journey.device-device-add--809eb-e-standing-rented-community/error-context.md:58.) The pending card was correct and scoped — codeUZPR-NDUS-LTFJ-V2QS-XLTN, the probe table carrying the member droplet's real facts — and the operator's Approve click landed. The control plane refused to mint the grant.Diagnosis
The rendered sentence is
enroll.ErrNoCAverbatim and unwrapped (internal/enroll/community_ca.go:32). That matters: the productionDirGranterwraps it as"%w (no root at %s)"(internal/enroll/community_ca_store.go:138) andApprovefurther wraps a granter error as"mint grant: %w"(internal/enroll/ledger.go:614). An unadorned sentence can come from exactly one place — the nil-Granter branch:internal/enroll/ledger.go:602-604—if l.cfg.Granter == nil { return rec.View, ErrNoCA }internal/controlapi/enroll.go:248-249— maps it to a 503no_community_caProblem whose detail iserr.Error(), which the dashboard renders as the alert above.The device journey drives the gateway's public dashboard, not the operator app's own surface:
app/tests/e2e/journey.device.spec.tssetsdash = cb.page(the ceremony browser), signs in athttps://id.<apex>, anddash.goto(portalAddress); every later leg —mint,decline-resume,join,approve— drivesdash. So the ledger in play is the gateway control plane's, served bycontrol-plane(pid 2909 on:8080,logs/gateway-units.txt).That composition never wires a
Granter:control-plane/cmd/control-plane/whole_composition.go:160-167—var enrollCfg enroll.Configsets onlyCommunitySourceand (when a clan adapter exists)OnEnrolled, thenopenEnrollLedger(deps.stateDir, enrollCfg). NoGranterfield is ever assigned, andcomposeDepscarries no CA home.control-plane/cmd/control-plane/compose.go:599-600— "Where the ledger carries no community CA, Approve honestly fails loud (ErrNoCA, ADR 0111) — the transport lands the act, the CA wiring is #210's separate slice"; same note atwhole_composition.go:477-481.control-plane/cmd/control-plane/compose_enroll_test.go:196-224(TestComposeEnroll_WholeActsOverRealLedger) asserts approve returns503. Verified one453b8f4:CGO_ENABLED=0 go test ./cmd/control-plane/ -run TestComposeEnroll_WholeActsOverRealLedger→ PASS.This is therefore an unbuilt slice, not a regression. #210 landed the CA seam and wired it on the app-helper side only (
app/helper/cmd/helper/wiring_prod.go:261-263—Granter: enroll.DirGranter{Dir: communityCADir()}, mint atwiring_prod.go:184via the foundingtrust-rootport,internal/founding/standup.go:706-713). The founding-side root exists for this drive —logs/founding-state.logshowsfounded: trueand the gateway approved wizard-implicitly — but it lives in the workstation helper's state dir (<state>/community-ca,wiring_prod.go:116). Nothing puts it, or any signer, on the gateway.The crown-jewel
root-cavar is declaration-only and cannot currently serve as the transport:internal/founding/seed.go:344lists it incrownJewelKeysandplaceCrownJewels(seed.go:350-366) callsConfig().SetVarSpec, which records generator + recipients into the inventory and nothing else (internal/clan/config.go:169-191;clan.VarSpechas no value field,internal/clan/clan.go:738-744). The founding-minted PEM pair is never handed into it.founding-state.log'scrown_jewelsentry forroot-ca(recipientsmachine:gateway,recovery:rehearsal-d) is that spec, not sealed key material.Suspected layer
Composition + founding hand-off, not the enroll seam.
internal/enrollis correct and fails loud exactly as ADR 0100/0111 ask. The gap is that post-founding device-add is operated from the gateway's dashboard while the only wired signer lives in the operator app.What plugging it needs
A ruling first, then wiring — this is why the report is not marked confident:
machine:gatewayrecipient implies), or the operator app's helper with the gateway's ledger delegating to it? Founding's own S9 grant is signed app-side today; device-add cannot be, because the approve click never reaches the helper.root-caa real value at seeding (the recipient set is already right) and reading it back throughclan.Vars— comparebackup.NewCrownJewelKeyReader(deps.clan.Vars(), node)atwhole_composition.go:~197, which is the same shape for thebackup-rootjewel. A re-mint on the gateway must be ruled out: it would orphan every grant the founding-side root already signed (internal/enroll/community_ca_store.go:28-33).enrollCfg.Granterinwhole_composition.go:160-167, and flipcompose_enroll_test.go's 503 pin to the new posture (the resting composition should keep failing loud).Secondary, same evidence — the drive burns 5 minutes blind
app/tests/e2e/journey.device.spec.ts(fixtureapprovePending, theexpect(...).toBeVisible({ timeout: 5 * 60_000 })at line 193) waits only on the success locator. The refusal alert is on the page within milliseconds, so the leg spends the entire 300 s ceiling (legs.json:approvems: 300357) and then reportselement(s) not found— hiding a sentence the control plane stated plainly. Racing theconnected-devicecard against the approve-refusal alert would make this class of red self-explaining and cheap. Worth folding in, but it is presentation only: the leg stays red until the Granter is wired.drive
20260828T152314Zred atapprove:expect(locator).toBeVisible() failed Locator: locator('[data-field="connected-device"]') Expected: visible Timeout: 300000ms Error: element(s) not found Call log: - Expect "toBeVisible" with timeout 3evidence:
/home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T152314Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRouted
ready-for-human— the Granter wiring is a one-way door (ADR 0174)Ruled by agent under ADR 0174 — veto anytime.
I confirmed the diagnosis end-to-end on
ed4499f5and it holds exactly as filed:internal/enroll/ledger.go:602-604— the nil-Granterbranch returns the bareErrNoCAsentence, unwrapped; that is why the dashboard's refusal alert readsenroll: no community CA configured …verbatim (only the nil branch skips theDirGranter/mint grant:wrappers).control-plane/cmd/control-plane/whole_composition.go:162-167—enrollCfgsetsonly
CommunitySource(+OnEnrolledwhen a clan adapter exists); noGranteris ever assigned, so the gateway ledger the device journey approves on refuses
the mint. The composition note at
:479-481andcompose.go:599-600say so in asmany words, and
compose_enroll_test.go'sTestComposeEnroll_WholeActsOverRealLedgerpins the 503 (PASS on this checkout). This is an unbuilt slice (#210's CA seam was
wired app-side only), not a regression.
Why human
This ticket asks for a ruling, and the ruling it needs is a one-way door — so
under ADR 0174 rule 2 I stop that part rather than self-authorize. Wiring the Granter
is not a config flip; it forces a security-posture decision that is on ADR 0174's
one-way-door list ("security-posture widenings: a new deliberately-public surface …"):
operator app's helper with the gateway's ledger delegating to it? Founding's own
S9 grant is signed app-side; device-add cannot be, because the approve click never
reaches the helper (the journey drives the gateway's public dashboard).
private half at all, and how does the root get there? ADR 0111 rules the root key
is a crown jewel sealed at rest under ADR 0104's rescue posture but does not
settle transport. Placing a community root's private signing key onto the
deliberately-public gateway is a security-posture widening — not revertible by a
commit once the exposure decision is made — and so belongs to the human.
(A re-mint on the gateway must be ruled out either way: it would orphan every
grant the founding-side root already signed —
community_ca_store.go:28-33.)The ticket carries no proposed default ruling (ADR 0174 rule 4), so there is
nothing for a session to adopt under rule 1. The obvious candidate wiring is sketched
in the report (give
root-caa real value at seeding — themachine:gatewayrecipientset is already right — and read it back through
clan.Vars, the same shape asbackup.NewCrownJewelKeyReaderatwhole_composition.go:199), but choosing it is thehuman's call because of (2). Once ruled: assign
enrollCfg.Granteratwhole_composition.go:162-167and flipcompose_enroll_test.go's 503 pin to the newposture (the resting composition should keep failing loud).
## Why human: a one-way-door ruling — the signing-authority + private-key-transportposture for post-founding device grants on the public gateway.
The two-way part landed this session (
ed4499f5)The secondary finding — the drive burns the full 300 s ceiling blind — was revertible
and provable, so I fixed it.
app/tests/e2e/fixtures/deviceAdd.tsapprovePendingnowraces the
connected-devicesuccess card against the strip's refusal alert(
PendingDevicesSurface'sOcErrorState,status="pending-device-error") withlocator.or(): a mint refusal now loses the race in milliseconds and reds the leg withthe control plane's own
error-messagetext as the reason, instead of a bareelement(s) not foundafter 5 minutes. Presentation only — theapproveleg stayscorrectly red until the Granter is wired; it just fails fast and self-explaining.
Proof:
vue-tscclean,prettier --checkclean,vitest tests/e2e/fixtures/deviceAdd.test.ts10/10 green. STATUS.md unchanged (no phase/gate/feature moved — the drive leg is still red).
Leaving the ticket open and relabelled
ready-for-session→ready-for-human; theGranter wiring is the human residue.
RULED by Ben (2026-08-28): the gateway signs, from the
root-caclan vars — landedbb80306d(ADR 0111 amendment)Who signs: the gateway control plane. How the root gets there: founding feeds the minted root's two PEM halves into two persisted-prompt clan vars on the gateway node —
idss-community-ca-key/idss-community-ca-cert— at the seed leg, beside the claim secret (communityCAAnswers, all three carrier paths). The control-plane unit exports their.paths asIDSS_COMMUNITY_CA_KEY_FILE/_CERT_FILE(file paths, never$(cat)); the whole composition wiresenroll.FilesGranterover them. One root, two homes — the gateway-signed grant verifies against the operator-minted root. May it hold the private half: yes — the gateway already holdsssh-ca,gateway-vars,backup-rootunder the same recipient set (machine key + recovery, operator keys excluded). Rejected: delegating each grant to the operator's laptop (approval would need it online).Tests:
FilesGranter; all four gateway renders declare + export, gated onGatewayFacts.CommunityCA(dual-render, GOTCHAS #12);TestSelfHosted_DeployFeedsTheCommunityCA;TestComposeEnroll_WholeApprovesWithTheCommunityCA(204, grant verifies) beside the standingErrNoCApin for the resting composition. Secondary (fixture self-explains the refusal) landed earlier ased4499f5.The next #854 drive re-founds the standing community (agent-affecting change) with the vars fed, so
approveis its live proof. Closing.approve, sig c1ac37bc5a0d) #952approve, sig c1ac37bc5a0d) #952