founding enroll relay carrier: the SSH-relayed dial from the agent's join socket to the in-helper ledger (ADR 0043) — unblocks the drive's consent + pair legs #583

Closed
opened 2026-08-15 06:51:34 +00:00 by ben · 1 comment
Owner

Split from #581 (the agent-side founding-mode fix). #581 landed Part 1: on the founding path (no OURCLOUD_COMMUNITY_ORIGIN) the agent no longer dies at construction — enrollTransportFor (agent/cmd/agent/wiring_prod.go) wires a foundingEnroll CP so agent join serves the join socket and becomes the standing service (unblocks the drive's agent-install service-active bar). Every founding CP verb (redeem/pair/poll/report) now fails loud with the honest ADR 0043/0100 message when driven, naming this carrier as its own slice.

What's left — the SSH-relayed dial (ADR 0043)

Per ADR 0043 the founding enroll face is the in-helper enroll ledger, reached from the box over SSH: "the helper reaches the device over SSH and relays the agent's redeem/pair calls through it (the agent serves its enrollment calls on a local Unix socket)." The pieces the #581 exploration confirmed already live:

  • the in-helper ledger enroll face — newEnrollLedger() / foundingPorts() "enroll" port (app/helper/cmd/helper/wiring_prod.go:208,346), durable over enroll.json;
  • the agent's local join socket — internal/join/socket.go, served by agent join;
  • the agent's founding CP seam — foundingEnroll (#581), the fail-loud placeholder to REPLACE with the real relay-socket client.

The missing piece is the SSH-relayed dial between them: a founding CP on the agent that speaks the enroll protocol over a local Unix socket, and a helper-side bridge that (over the SSH session the wizard's S4b captured — IP + access) forwards those redeem/pair calls to the in-helper ledger, whose resulting request record + IdentityGrant the seeded control plane inherits (ADR 0043 §Consequences).

  • consent: ourcloud-agent enroll <code> answered over the SSH PTY prints consent recorded and connection request sent (redeem + pair reach the in-helper ledger).
  • pair: the app renders [data-status="spec-gate-pass"] — the ledger holds the Pending request with the droplet's probed hardware.

Notes / a design question the builder must settle first

The phase-3 install script (bootstrap/cmd/bootstrap/installscript.go) currently execs agent enroll <code> in the foreground (spec 2026-08-14 §Task 1), which blocks the drive's non-interactive agent-install leg (sshDroplet, expects exit 0) — the drive re-attaches the terminal join separately at the consent leg (sshDropletInteractive). Reconcile the "foreground enroll for a real operator" shape with the drive's install-then-reattach split as part of this carrier (a mode flag, or the install script installs the service only and the operator/helper drives enroll). This is the remaining judgement call the relay design turns on.

Blocks the phase-3 standing drive #523 for the consent/pair frontier. Split from #581; advances #523.

Split from **#581** (the agent-side founding-mode fix). #581 landed Part 1: on the founding path (no `OURCLOUD_COMMUNITY_ORIGIN`) the agent no longer dies at construction — `enrollTransportFor` (`agent/cmd/agent/wiring_prod.go`) wires a `foundingEnroll` CP so `agent join` serves the join socket and becomes the standing service (unblocks the drive's `agent-install` service-active bar). Every founding CP verb (redeem/pair/poll/report) now fails loud with the honest ADR 0043/0100 message **when driven**, naming this carrier as its own slice. ## What's left — the SSH-relayed dial (ADR 0043) Per ADR 0043 the founding enroll face is the **in-helper enroll ledger**, reached from the box over SSH: *"the helper reaches the device over SSH and relays the agent's redeem/pair calls through it (the agent serves its enrollment calls on a local Unix socket)."* The pieces the #581 exploration confirmed already live: - the in-helper ledger enroll face — `newEnrollLedger()` / `foundingPorts()` "enroll" port (`app/helper/cmd/helper/wiring_prod.go:208,346`), durable over `enroll.json`; - the agent's local join socket — `internal/join/socket.go`, served by `agent join`; - the agent's founding CP seam — `foundingEnroll` (#581), the fail-loud placeholder to REPLACE with the real relay-socket client. The missing piece is **the SSH-relayed dial between them**: a founding CP on the agent that speaks the enroll protocol over a local Unix socket, and a helper-side bridge that (over the SSH session the wizard's S4b captured — IP + access) forwards those redeem/pair calls to the in-helper ledger, whose resulting request record + `IdentityGrant` the seeded control plane inherits (ADR 0043 §Consequences). ## Acceptance (the phase-3 drive's `consent` + `pair` legs — `journey.selfhosted.spec.ts`) - `consent`: `ourcloud-agent enroll <code>` answered over the SSH PTY prints `consent recorded` **and** `connection request sent` (redeem + pair reach the in-helper ledger). - `pair`: the app renders `[data-status="spec-gate-pass"]` — the ledger holds the Pending request with the droplet's probed hardware. ## Notes / a design question the builder must settle first The phase-3 install script (`bootstrap/cmd/bootstrap/installscript.go`) currently `exec`s `agent enroll <code>` in the **foreground** (spec 2026-08-14 §Task 1), which blocks the drive's non-interactive `agent-install` leg (`sshDroplet`, expects exit 0) — the drive re-attaches the terminal join **separately** at the `consent` leg (`sshDropletInteractive`). Reconcile the "foreground enroll for a real operator" shape with the drive's install-then-reattach split as part of this carrier (a mode flag, or the install script installs the service only and the operator/helper drives enroll). This is the remaining judgement call the relay design turns on. Blocks the phase-3 standing drive **#523** for the `consent`/`pair` frontier. Split from #581; advances #523.
Author
Owner

Closing as a duplicate of #582 — I filed this before discovering #581 had already landed (commit 4c72704) and had filed #582 for the identical relay-carrier follow-up (enrollwire-over-SSH device server on the in-helper ledger + app-side pairing observation). #582 is the more complete ticket (it carries the ADR 0152 reconciliation and the installScript/leg-separation ruling). Track the carrier there.

Closing as a **duplicate of #582** — I filed this before discovering #581 had already landed (commit `4c72704`) and had filed #582 for the identical relay-carrier follow-up (enrollwire-over-SSH device server on the in-helper ledger + app-side pairing observation). #582 is the more complete ticket (it carries the ADR 0152 reconciliation and the installScript/leg-separation ruling). Track the carrier there.
ben closed this issue 2026-08-15 06:53:13 +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.

Dependencies

No dependencies set.

Reference
Matou/idss#583
No description provided.