enroll/join: the member grant's mesh admission is placeholder material — netbird up rejects mesh.internal and no device can land #956
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
Depends on
Reference
Matou/idss#956
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
Drive
20260828T202109Z(--target device), red at legapproveafter the full 300 s ceiling; 23/24 legs green (artifacts/verdict.json,artifacts/legs.json).The Playwright fixture races the Connected card against the strip's refusal alert and neither ever rendered:
The device end says why (
artifacts/join-transcript.txt, held PTY exited 1):Evidence
The defect is the admission material the community CA mints for a member device:
internal/enroll/community_ca.go:210-219—MeshAdmissionForreturns, for any non-gateway role:internal/enroll/community_ca.go:216—Management: "mesh.internal". A bare hostname. netbird's--management-urlrequires an absolute URI, sosetConfigrefuses it before a single packet leaves the box.internal/enroll/community_ca.go:215—SetupKey: randBytes(32). Thirty-two raw random bytes, not a Netbird setup key.agent/internal/meshup/meshup.go:46passes it throughstring(adm.SetupKey), which is the binary argv printed in the error above. Even with a valid management URL this key could not be redeemed.internal/enroll/enroll.go:290—Redeemable()is true onManagement != ""alone, so placeholder material reads as redeemable.internal/join/land.go:86-90—Enrolltherefore callsMesh.Joinunconditionally for a member device and returns beforeConfirmEnrolledwhen it fails.agent/cmd/agent/wiring_prod.go:69— production wiring is the realmeshup.New(run)(the fake is dev-only,wiring_dev.go:40), so the drive hits real netbird.logs/device-journal.txt:1407,Started netbird.service - NetBird mesh network clientat 20:37:15, three seconds before the 20:37:18 failure. This is the material, not a missing binary (ADR 0100'serrNetbirdAbsentpath was not taken).spikes/kanidm-netbird/clan/modules/netbird.nix— a spike module, not referenced by the shipped clan config. No.nixunder the deployed community declaresservices.netbird.server.Why this fires now
0ca9192c("the published curl|sh install doorway waits on the operator's decision instead of exiting 0 at 'connection request sent'") implemented ADR 0209 decision 1. Before it,agent enrollreturned at Pending and the landing had no production caller, so the placeholder admission was never redeemed against real netbird. The drive now walks the landing for real and hits the rung that was never built.Secondary: the failure has no operator-facing surface
Worth fixing alongside, because it is what cost this run 300 s and a whole droplet:
dashboard/src/components/device-add/PendingDevicesSurface.vue:40-48rendersdata-status="pending-device-error"only from the Approve verb's own error (useAsyncGuard). A landing that dies on the device end never touches it.internal/join/land.go:87-89returns the mesh failure to the device's terminal and nothing reports it back to the control plane, so the request sits at Approved forever.app/tests/e2e/fixtures/deviceAdd.ts:202-209can therefore only time out. The gateway journal carries noConfirmEnrolledfor this request, consistent with a request stuck at Approved.ADR 0209's honesty rule ("never a line the machine cannot back") arguably cuts both ways here: a landing that failed should be visible to the operator who approved it, not only to whoever is watching the device's terminal.
Suspected layer
The enrollment/mesh seam —
internal/enroll(grant minting) and the mesh control plane that does not yet exist under the community's clan config. Not the agent adapter:agent/internal/meshup/meshup.godid exactly the right thing with what it was handed, and failed loud.What plugging it needs
This is #844's rung and needs a ruling before code, because the two ways forward differ in scope and both touch ADR 0209 §3 ("the mesh address is a first-class fact, reported at landing"):
spikes/kanidm-netbird/clan/modules/netbird.nixinto the shipped clan config (management + signal + TURN, kanidm-backed per ADR 0039), give the gateway a real management URL, and haveMeshAdmissionFormint a genuine single-use setup key against it instead ofrandBytes(32). This is the ADR 0209 §3 end state — the device joins a real mesh and reports a realwt0address. It is a multi-commit slice with a dependency and NixOS-service surface.Redeemable()is honestly false, and let the landing skip mesh admission the way the founding gateway already does (internal/join/land.go:83-90, #907). The device would land at Connected with an empty mesh address — which ADR 0209 §3 permits as "an honest empty, never a fabricated one" — but the fleet then cannot route to a service on a member device, so this is a knowing deferral, not a fix.Either way, the secondary surface gap should close too:
ConfirmEnrolled(or a sibling call) needs a path for the device to report a failed landing, andPendingDevicesSurface.vueneeds to render it, so the next red fails in seconds rather than burning a 300 s ceiling and a stood-up droplet.A healer cannot take this: it is a dependency/infra change outside this checkout, the choice between (1) and (2) is a design ruling, and neither is verifiable on this machine.
drive
20260828T202109Zred atapprove:expect(locator).toBeVisible() failed Locator: locator('[data-field="connected-device"]').or(locator('[data-status="pending-device-error"]')).first() Expected: visible Timeout: 300000ms Error: element(evidence:
/home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T202109Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was capturedRULED by Ben (2026-08-28): option 1 — build the management plane
The community mesh controller ships on the gateway per ADR 0039 (management + signal + relay, a peer on every node); placeholder admission is never shipped. Routing
ready-for-session→needs-design: this is a spec-sized slice, not a session fix.Scope sketch for the design lane (from today's evidence, drive
20260828T202109Z):spikes/kanidm-netbird/clan/modules/netbird.nix(268 lines: management + signal + coturn, OIDC config, WireGuard 51820/udp fleet-wide, peer auto-login by setup key) into the shipped clan config, rendered by both gateway renders (GOTCHAS #12). The spike's own header names the split: daemons + config are declarative; minting a setup key and approving peers are runtime provisioning the control plane must do.internal/idp/deviceapprove.go, ADR 0199).enroll.MeshAdmissionForbecomes aMeshMinterport on the ledger's Approve: the gateway control plane mints a single-use setup key from its own management API at approve time and the grant carries it; the founding gateway still gets none (#907). ADR 0209 §3 (address reported by the device at landing) stands.wt0-bound service renders stop being declarative-only.ConfirmEnrolledor a sibling for a failed landing, rendered byPendingDevicesSurface.vue.Why option 1 over gating (option 2): gating only moves the wall one leg —
assessandnextcloud-on-device(ADR 0210 mesh route) need the mesh regardless.Design tier — ADR 0214 drafted (local
7f316018, pushing behind the in-flight IDIP publish)docs/adr/0214-community-mesh-plane-ships-on-the-gateway.md— six decisions, all two-way doors under ADR 0174::8011, signal:8012, coturn) promoted from thekanidm-netbirdspike's content (not the file), gated onGatewayFacts.Mesh; generatorsnetbird-datastore/netbird-coturn; no netbird dashboard.mesh.<apex>(gRPC path routes); admissionManagement = https://mesh.<apex>:443,TLSPindropped to empty.idss-idpclient-credentials); members never log in, devices admit by setup key only. Named verification V1: a client-credentials token creates/owns the Netbird account and mints a key on both carriers (fallback: service user + PAT as a clan var).MeshMinterport besideGranter;Ledger.Approvemints a single-use, request-TTL,node-<requestID>setup key via the local management API; nil minter = honestErrNoMeshPlaneat Approve;enroll.MeshAdmissionFordeleted; management plane is NOT the address oracle (ADR 0209 stands).idss-mesh-self-admitoneshot) and the ADR 0159meshBound()ordering ships in the same slice for everywt0-binding unit.ReportLandingFailedsibling toConfirmEnrolled,LandingErroron the view, rendered aspending-device-error(✎ state onp3-device-add-app).CONTEXT.md gains mesh plane and setup key.
Next (needs Ben):
/to-specis user-invocation-only — run it against ADR 0214 to mint the child spec (no-triage), then/slice-map→/to-tickets. Phase 5 (#854) stays parked until the minter slice lands.Pipeline run in auto mode on Ben's instruction: spec #960 → slice map
7e705fcb(5 slices indocs/slices/device-add) → tickets #961 plane render + V1 (frontier) · #962 front-doormesh.<apex>(← 961) · #963 MeshMinter at Approve (← 961, 962; closes this rung) · #964 gateway self-peer + ADR 0159 ordering (← 961) · #965 failed-landing report (frontier). Allready-for-agent+priority. This ticket and #854 are now blocked by #963 so the phase-5 executor parks honestly instead of red-driving.Closing: the rung is built — #961 (plane render,
dc4ff8cf), #962 (front door,7d1b5cad), #963 (MeshMinter at Approve,353ec1c6;MeshAdmissionFordeleted), #965 (failed-landing report,f24a38a7). Live proof rides the standing phase-5 drive #854 once the seed-leg PAT provisioning residue and #964 land.