founding-time agent enroll: the install one-liner demands OURCLOUD_COMMUNITY_ORIGIN on a path where no gateway exists yet — wire the ADR 0043 founding enroll face #581

Closed
opened 2026-08-15 06:27:59 +00:00 by ben · 2 comments
Owner

First phase-3 drive 20260815T062245Z (--target selfhosted, the first live outing of the manual founding path): wizard-precheck/claim/create/install-command all green, red at agent-install:

ourcloud: fetching the community's pinned agent from get.idss.nz…   (works — #515/#516 proven live)
Created symlink …/ourcloud-agent.service                            (service up)
ERROR enroll did not reach Pending: agent: no community gateway origin (OURCLOUD_COMMUNITY_ORIGIN) —
the agent enrolls against a REMOTE control plane over HTTP…

Cause

agent/cmd/agent/wiring_prod.go:69 builds the ONLY production enroll transport from OURCLOUD_COMMUNITY_ORIGIN — the ADR 0054 add-device-to-an-existing-community shape. On the FOUNDING path there is no gateway yet by construction. The 2026-08-09 ratchet plan (docs/superpowers/plans/2026-08-09-183-vps-rehearsal-ratchet.md:72) explicitly named this unbuilt: "the agent's founding-time origin (OURCLOUD_COMMUNITY_ORIGIN points at a gateway that doesn't exist yet; at founding the enroll face is the in-helper ledger — app/helper/cmd/helper/wiring_prod.go:280)" along with "the SSH relay carrier (helper reaches the device over SSH and relays the agent's redeem/pair calls; agent serves enrollment on a local Unix socket)" (ADR 0043). Phase 2 never hit it — the own-VPS path has the app drive the box itself (DDR 0154, no pasted command). None of #515–#522 built it (bootstrap host, walkthrough, fixtures, spec, executor target — checked).

Direction

Wire the founding enroll face per ADR 0043/0053, honouring the phase-3 spec's leg contract (agent-install bar = agent fetched + service up; enrollment proper happens at the pair leg):

  1. Agent side: an install/join run with no community origin is the FOUNDING shape, not an error — the agent installs, serves its join state on the local Unix socket (internal/join/socket.go exists), and the S8 terminal consent runs as designed. Keep the loud error for the add-device shape where a code implies an existing community (the honest-refusal contract stands there).
  2. Helper side: the SSH relay carrier — the helper reaches the device over SSH (the wizard captured the IP + access at S4b) and relays the agent's redeem/pair calls to the in-helper ledger enroll face (helper/cmd/helper/wiring_prod.go ~280). Check what already exists before building — the private path's in-helper ledger face and the join socket are live; the missing piece is plausibly ONLY the SSH-relayed dial between them.
  3. The drive's consent + pair legs (journey.selfhosted.spec.ts, #520/#521 fixtures) hold the acceptance contract: terminal consent answered over the same SSH session, then "agent probed + paired; spec gate passes the droplet's hardware".

If the relay carrier turns out to be genuinely large, split the agent-side founding-mode fix (unblocks agent-install/consent) from the relay (unblocks pair) — sequenced tickets, the first blocking this drive.

Evidence: test-results/drive-selfhosted/20260815T062245Z/ (executor log + legs.json; get.idss.nz bootstrap itself proven live this drive).

advances #523

First phase-3 drive `20260815T062245Z` (`--target selfhosted`, the first live outing of the manual founding path): `wizard-precheck`/`claim`/`create`/`install-command` all green, red at `agent-install`: ``` ourcloud: fetching the community's pinned agent from get.idss.nz… (works — #515/#516 proven live) Created symlink …/ourcloud-agent.service (service up) ERROR enroll did not reach Pending: agent: no community gateway origin (OURCLOUD_COMMUNITY_ORIGIN) — the agent enrolls against a REMOTE control plane over HTTP… ``` ## Cause `agent/cmd/agent/wiring_prod.go:69` builds the ONLY production enroll transport from `OURCLOUD_COMMUNITY_ORIGIN` — the ADR 0054 add-device-to-an-existing-community shape. On the FOUNDING path there is no gateway yet by construction. The 2026-08-09 ratchet plan (docs/superpowers/plans/2026-08-09-183-vps-rehearsal-ratchet.md:72) explicitly named this unbuilt: *"the agent's founding-time origin (OURCLOUD_COMMUNITY_ORIGIN points at a gateway that doesn't exist yet; at founding the enroll face is the in-helper ledger — app/helper/cmd/helper/wiring_prod.go:280)"* along with *"the SSH relay carrier (helper reaches the device over SSH and relays the agent's redeem/pair calls; agent serves enrollment on a local Unix socket)"* (ADR 0043). Phase 2 never hit it — the own-VPS path has the app drive the box itself (DDR 0154, no pasted command). None of #515–#522 built it (bootstrap host, walkthrough, fixtures, spec, executor target — checked). ## Direction Wire the founding enroll face per ADR 0043/0053, honouring the phase-3 spec's leg contract (`agent-install` bar = agent fetched + service up; enrollment proper happens at the `pair` leg): 1. **Agent side**: an install/join run with no community origin is the FOUNDING shape, not an error — the agent installs, serves its join state on the local Unix socket (`internal/join/socket.go` exists), and the S8 terminal consent runs as designed. Keep the loud error for the add-device shape where a code implies an existing community (the honest-refusal contract stands there). 2. **Helper side**: the SSH relay carrier — the helper reaches the device over SSH (the wizard captured the IP + access at S4b) and relays the agent's redeem/pair calls to the in-helper ledger enroll face (`helper/cmd/helper/wiring_prod.go` ~280). Check what already exists before building — the private path's in-helper ledger face and the join socket are live; the missing piece is plausibly ONLY the SSH-relayed dial between them. 3. The drive's `consent` + `pair` legs (`journey.selfhosted.spec.ts`, #520/#521 fixtures) hold the acceptance contract: terminal consent answered over the same SSH session, then "agent probed + paired; spec gate passes the droplet's hardware". If the relay carrier turns out to be genuinely large, split the agent-side founding-mode fix (unblocks `agent-install`/`consent`) from the relay (unblocks `pair`) — sequenced tickets, the first blocking this drive. Evidence: `test-results/drive-selfhosted/20260815T062245Z/` (executor log + legs.json; get.idss.nz bootstrap itself proven live this drive). advances #523
Author
Owner

swarm-claim host=matou-dev-server-01 run=6774
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=6774 (automated multi-host claim — lowest live claim id works this ticket)
Author
Owner

close-report for #581 — status success

✅ close-report gates passed — every claim verified against main; closing.

envelope
{
  "issue": 581,
  "status": "success",
  "commits": [
    "4c727045a07c699b4109fbd5aabe66da40eba45f"
  ],
  "changed_files": [
    "agent/cmd/agent/wiring_prod.go",
    "agent/cmd/agent/wiring_test.go",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./agent/cmd/agent/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go build -o /tmp/oc-agent ./agent/cmd/agent",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go build -tags dev -o /tmp/oc-agent-dev ./agent/cmd/agent",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go vet ./agent/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go test ./internal/enrollwire/...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Agent side: an install/join run with no community origin is the FOUNDING shape, not an error": "wiring_prod.go enrollTransportFor: origin=='' now returns a relay-socket enrollwire transport (no error); TestEnrollTransport_FoundingShapeWhenNoOrigin asserts construction succeeds and wires both faces",
    "The agent serves its join state on the local Unix socket / terminal consent runs as designed": "runJoin/runEnroll (main.go) now construct in founding mode instead of failing at enrollTransportFor — the service serves the join socket and the terminal doorway runs; the device-end control-plane dials the relay socket (TestEnrollTransport_FoundingDialsTheRelaySocket)",
    "Keep the loud error for the add-device shape where a code implies an existing community": "origin set still builds the real HTTP gateway client unchanged (TestEnrollTransport_AddDeviceKeepsGatewayShape); mintLocalCode's operator-side-codes refusal is untouched",
    "Split authorized when the relay carrier is genuinely large": "helper/app end (enrollwire-over-SSH device server on the in-helper ledger + app-side pairing observation for selfhosted) filed as #582 ready-for-human — no helper->box SSH nor enrollwire face over the in-helper ledger exists today; carries the ADR 0152 reconciliation and installScript/leg-separation rulings"
  },
  "summary": "enrollTransportFor forks on OURCLOUD_COMMUNITY_ORIGIN: no origin is the FOUNDING shape (device-end enrollwire client over the ADR 0043 relay socket), not a hard error; add-device unchanged; the carrier's helper/app end split to #582.",
  "reason": "Agent-side founding tooth of the phase-3 selfhosted enroll face; the SSH relay carrier's helper/app end is the authorized split follow-up #582.",
  "blockers": []
}
**close-report** for #581 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; closing. <details><summary>envelope</summary> ```json { "issue": 581, "status": "success", "commits": [ "4c727045a07c699b4109fbd5aabe66da40eba45f" ], "changed_files": [ "agent/cmd/agent/wiring_prod.go", "agent/cmd/agent/wiring_test.go", "STATUS.md" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./agent/cmd/agent/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go build -o /tmp/oc-agent ./agent/cmd/agent", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go build -tags dev -o /tmp/oc-agent-dev ./agent/cmd/agent", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go vet ./agent/...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go test ./internal/enrollwire/...", "exit_code": 0 } ], "criteria": { "Agent side: an install/join run with no community origin is the FOUNDING shape, not an error": "wiring_prod.go enrollTransportFor: origin=='' now returns a relay-socket enrollwire transport (no error); TestEnrollTransport_FoundingShapeWhenNoOrigin asserts construction succeeds and wires both faces", "The agent serves its join state on the local Unix socket / terminal consent runs as designed": "runJoin/runEnroll (main.go) now construct in founding mode instead of failing at enrollTransportFor — the service serves the join socket and the terminal doorway runs; the device-end control-plane dials the relay socket (TestEnrollTransport_FoundingDialsTheRelaySocket)", "Keep the loud error for the add-device shape where a code implies an existing community": "origin set still builds the real HTTP gateway client unchanged (TestEnrollTransport_AddDeviceKeepsGatewayShape); mintLocalCode's operator-side-codes refusal is untouched", "Split authorized when the relay carrier is genuinely large": "helper/app end (enrollwire-over-SSH device server on the in-helper ledger + app-side pairing observation for selfhosted) filed as #582 ready-for-human — no helper->box SSH nor enrollwire face over the in-helper ledger exists today; carries the ADR 0152 reconciliation and installScript/leg-separation rulings" }, "summary": "enrollTransportFor forks on OURCLOUD_COMMUNITY_ORIGIN: no origin is the FOUNDING shape (device-end enrollwire client over the ADR 0043 relay socket), not a hard error; add-device unchanged; the carrier's helper/app end split to #582.", "reason": "Agent-side founding tooth of the phase-3 selfhosted enroll face; the SSH relay carrier's helper/app end is the authorized split follow-up #582.", "blockers": [] } ``` </details>
ben closed this issue 2026-08-15 06:44:46 +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.

Reference
Matou/idss#581
No description provided.