device-add: approve-enroll-land — Approve, enrol, and land at Connected #60
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
Depends on
Reference
Matou/idss#60
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
Feature spec: #13 (device-add).
What to build
The human gate the whole code discipline exists to reach, and the honest landing after it. The operator opens Fleet and sees a pending-device card (P2-S4 / P3-S4) showing the echoed probe and label, offering approve and decline; the pending list is a live query over connection requests, so devices appear and resolve without a refresh and terminal requests leave the list. On the device side the joining screen (P3-S4) long-polls honestly for days across reboots and network loss — nothing can reach the device inbound before mesh admission, so polling is the only forward mechanism.
On approval the weak code is spent forever and converted into strong device identity: the IdentityGrant carries the community-CA-signed NodeCert (binding device key, consented mode, and role-hint context), the community-signed SSH host cert, the ClanTrust material, and a single-use Netbird setup key. The dashboard shows the device as joined only when it truly is — only after the agent has joined the mesh, installed its certs, and brought the clan connection up does the request reach Enrolled (the Approved → Enrolled split). The device then lands at Connected — not yet set up (P2-S5 / P3-S5): no role or services assigned, the next action offered is provisioning's Assess (P4-S1), and it appears on the resting Fleet list with its probed identity.
From Enrolled the agent heartbeats on the fleet-reporting face (NodeCert mTLS over the mesh): agent version, uptime, clan-connection state, and VM health in VM mode — a missed heartbeat being the staleness signal monitoring surfaces. On the app path the owner rests at Device home (P3-S5 → shell) showing this device's state; provisioning happens from the operator's side, not theirs.
Acceptance criteria
Blocked by
Task manifest
Done in commit
f6824d7(sandcastle: device-add:approve-enroll-land #60).At the ADR 0057 seam (
internal/join/land_test.go, real enroll ledger + clock, fake mesh admission + clan adapter):enroll.Approvenow spends the code forever at grant-mint (consumed, unrevocable — moved from ConfirmEnrolled, since approval is the weak→strong conversion). Grant contents asserted: community-CA NodeCert (device key, consented mode, role-hint, 90-day validity), community-signed SSH host cert, ClanTrust, single-use Netbird setup key; re-approve re-delivers verbatim.internal/join/land.goadds the Enroll continuation: mesh join → cert install → clan up → only then ConfirmEnrolled, order asserted; a failing clan connection holds the gate (request stays Approved, never shown joined early) and retries clean.enroll.ProbeReport+ consented mode; terminal requests leave the list.Heartbeaton the fleet-reporting face from Enrolled: agent version, uptime, clan state, VM health in VM mode only; latest-wins.Screens (rule 2b) — all four wireframes ship as components:
dashboard/src/components/device-add/PendingDeviceCard.vue+PendingDevicesSurface.vueoverlib/pending.ts— a live query composed above the resting Fleet list (FleetSurfaceoptionalpendingprop); rows appear/resolve/leave without a reload; approve renders joining, never joined early.ConnectedScreen.vue— connected — not set up, one actionset-up-this-device→ provisioning Assess (P4-S1);enrolledFleetNodemaps the landing onto the resting-list row with its probed identity (story 26).app/src/components/device-add/JoiningScreen.vue— checklist to the wireframe (VM step for VM mode only, "you can close this — we’ll keep waiting"), held honestly through approved.JoinedScreen.vue— ● Approved pill, "helping run" line, Done → Device home (story 28) viaJoinProgressSurface.Verified: full Go suite +
go vetgreen (7 new seam tests); dashboard 235/235 and app 98/98 vitest,vue-tscboth, eslint clean. Also fixed #40’s time-of-day-flaky expiry test. STATUS.md updated in the same commit.idss-rental-expires-tag on a LIVE rental once the broker actually deploys (#741's broker half is merged but not installed) #745