connect-dial-in: the S4d dial-in door never opens the enroll-relay forward #1629

Closed
opened 2026-09-19 13:50:55 +00:00 by matou-build-agent · 2 comments

The failure

The drive dies at its third leg, connect-dial-in (S4d, the self-hosted "machine at your place" dial-in door). The box installs the agent fine, but idss-agent enroll <code> on the box cannot find the SSH-forwarded enroll relay socket, because the app never opened the forward.

artifacts/legs.json — the only red, no skips:

{ "leg": "connect-dial-in", "status": "red", "ms": 35875,
  "error": "the dial-in terminal join exited 1\n--- transcript ---\n…
    level=ERROR msg=\"enroll did not complete\" component=agent
    err=\"enrollwire: POST http://enroll-relay/api/v1/enroll/redeem:
    dial unix /run/idss/enroll-relay.sock: connect: no such file or directory\"" }

artifacts/verdict.json: "firstRedLeg": "connect-dial-in", "legs": {"total": 3, "green": 2, "red": 1, "skip": 0}, commit 6bfde109.

This is not the KNOWN frontier. legs.json carries zero skip entries, so nothing in this drive's own skip reasons names an own-VPS carrier issue, and the red is two stages earlier than pairing — the box never got as far as redeeming, let alone flipping a pair. The frontier named in the brief is not what stopped this run.

Evidence from the live box (134.199.174.116, still up; ssh answered)

The socket the agent dials was never bound, and the only thing in /run/idss is the agent's own listener:

# ls -la /run/idss
srwxr-xr-x 1 root root 0 Sep 19 13:45 agent.sock
# find /run -type s | grep idss
/run/idss/agent.sock
# stat -c '%n %y' /run/idss /run/idss/agent.sock
/run/idss 2026-09-19 13:45:03.551000000 +0000
/run/idss/agent.sock 2026-09-19 13:45:03.551000000 +0000

So /run/idss was created by idss-agent itself at 13:45:03.551 — matching its journal, journalctl -u idss-agent:

Sep 19 13:45:03 … idss-agent[4634]: level=INFO msg="join socket listening" component=agent path=/run/idss/agent.sock

The agent then failed at 13:45:34.671 — 31 seconds later. The forwarder is documented to supervise with a 2s backoff (internal/fleetwire/relay.go: Backoff … default 2s, ExitOnForwardFailure=yes), so a running supervisor would have produced ~15 SSH auth attempts in that window. journalctl -u ssh over 13:44:55 → 13:45:40 shows no such cadence — only the harness's own sessions (13:44:57, 13:44:59, 13:45:04, 13:45:08, then a steady ~10s harvest poll at 13:45:19 / :30 / :41 / :53). sshd -T confirms the box would have allowed it (allowstreamlocalforwarding yes), and no bind error appears anywhere in the boot journal (journalctl -b -p warning is clean of ssh entries). The forward was never attempted.

Helper end was up: enroll-relay-serve.sock exists at the run-dir root (srw------- swarm swarm, Sep 19 13:44), i.e. IDSS_ENROLL_RELAY_SERVE_SOCKET was served as app/tests/e2e/fixtures/launch.ts:89,106 intends.

The defect (product)

internal/founding/connectcheck.go:225 gates the forward on an address argument:

func (o *Orchestrator) OfferDialIn(ctx context.Context, device, address string) (DialIn, error) {
	…
	if address = strings.TrimSpace(address); address != "" {
		o.ensureRelayTo(ctx, address)
	}

But the app's S4d door never sends one. app/src/components/founding/FoundingConnectDevice.vue:501:

dialIn.value = await props.client.offerDialIn(props.device || undefined);

and the client (app/src/lib/founding.ts:1630, 2096) is declared offerDialIn(device?: string) and wires only this.call('offer-dial-in', { device }) — while internal/founding/stdio.go:433-441 decodes an Address field that is therefore always "". The self-hosted journey has no address surface at all to fill it from (s4AccessSelfHosted in app/tests/e2e/fixtures/wizard.ts:547 clicks the option and Continue — nothing typed).

The other two ensureRelay call sites cannot cover S4d either: internal/founding/manualpath.go:167,244 run at BeginStandup, and internal/founding/selfhostedcarrier.go:107 (ObservePairing) returns early unless st.Step == StandupInstallMachine. At connect-dial-in no stand-up exists yet — logs/founding-state.log shows "founded": false, draft "step": "review", and no standup key at all (grep count 0). So the S4d dial-in door is the only hook, and it is the one that is gated shut.

Note the box address itself was available the whole time: app/helper/cmd/helper/wiring_prod.go:733 wires founding.WithSelfHostedBoxAddress(os.Getenv("OC_E2E_DROPLET_IP")), which launch.ts passes through via ...process.env. ensureRelay (selfhostedcarrier.go:31) needs only relayCarrier != nil && selfHostedBoxIP != "" — both true. Nothing was missing except the call.

What plugging it needs

In OfferDialIn, move the gate off "an address was typed" and onto "a box address is known": call o.ensureRelay(ctx) unconditionally, keeping ensureRelayTo(ctx, address) for the case where the operator did supply one. ensureRelay already no-ops honestly on an unwired carrier or empty selfHostedBoxIP (ADR 0100 — no fake bridge), so this changes nothing on any non-drive path, and it matches ADR 0174's ruling that the wired box address is the provenance. Extend internal/founding/connectcheck_test.go / selfhostedcarrier_test.go with the case the drive just hit: self-hosted dial-in door opened at S4d with no address argument but a wired box address → the carrier's Open is called once.

The alternative — threading the address through offerDialIn — is a bigger ask and would need a design ruling, since self-hosted deliberately has no address field on S4d.

What is absent from this run directory

Expected, given the drive died at leg 3 of ~15, but stated so the gaps are not read as signal: logs/droplet-caddy.txt and logs/droplet-keri.txt are -- No entries -- / "could not be found" (no gateway was ever built — ss -tlnp on the box shows only sshd:22 and systemd-resolved); every logs/guest-*.log is a 129-byte stub and logs/qemu.log records no qemu (this rail is a droplet, not a VM); logs/state-logs.log reports no state/logs dir; logs/clan-config-snapshot.log says "a drive that never built one". logs/broker-journal.txt failed to harvest (dev@100.98.48.68: Permission denied (publickey)) — off the admin mesh by design, ADR 0208/#681, and the verdict does not depend on it. artifacts/journey.json was written and agrees with legs.json row-for-row.

drive 20260919T134346Z red at connect-dial-in: the dial-in terminal join exited 1 --- transcript --- Warning: Permanently added '134.199.174.116' (ED25519) to the list of known hosts. time=2026-09-19T13:45:34.671Z level=ERROR msg="enroll did not c
evidence: /home/swarm/session-runner/idss/test-results/drive-idip/20260919T134346Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure The drive dies at its third leg, `connect-dial-in` (S4d, the self-hosted "machine at your place" dial-in door). The box installs the agent fine, but `idss-agent enroll <code>` on the box cannot find the SSH-forwarded enroll relay socket, because **the app never opened the forward**. `artifacts/legs.json` — the only red, no skips: ``` { "leg": "connect-dial-in", "status": "red", "ms": 35875, "error": "the dial-in terminal join exited 1\n--- transcript ---\n… level=ERROR msg=\"enroll did not complete\" component=agent err=\"enrollwire: POST http://enroll-relay/api/v1/enroll/redeem: dial unix /run/idss/enroll-relay.sock: connect: no such file or directory\"" } ``` `artifacts/verdict.json`: `"firstRedLeg": "connect-dial-in"`, `"legs": {"total": 3, "green": 2, "red": 1, "skip": 0}`, commit `6bfde109`. **This is not the KNOWN frontier.** `legs.json` carries **zero skip entries**, so nothing in this drive's own skip reasons names an own-VPS carrier issue, and the red is two stages earlier than pairing — the box never got as far as redeeming, let alone flipping a pair. The frontier named in the brief is not what stopped this run. ## Evidence from the live box (134.199.174.116, still up; ssh answered) The socket the agent dials was never bound, and the only thing in `/run/idss` is the agent's own listener: ``` # ls -la /run/idss srwxr-xr-x 1 root root 0 Sep 19 13:45 agent.sock # find /run -type s | grep idss /run/idss/agent.sock # stat -c '%n %y' /run/idss /run/idss/agent.sock /run/idss 2026-09-19 13:45:03.551000000 +0000 /run/idss/agent.sock 2026-09-19 13:45:03.551000000 +0000 ``` So `/run/idss` was created **by `idss-agent` itself at 13:45:03.551** — matching its journal, `journalctl -u idss-agent`: ``` Sep 19 13:45:03 … idss-agent[4634]: level=INFO msg="join socket listening" component=agent path=/run/idss/agent.sock ``` The agent then failed at **13:45:34.671** — 31 seconds later. The forwarder is documented to supervise with a 2s backoff (`internal/fleetwire/relay.go`: `Backoff … default 2s`, `ExitOnForwardFailure=yes`), so a running supervisor would have produced ~15 SSH auth attempts in that window. `journalctl -u ssh` over `13:44:55 → 13:45:40` shows **no such cadence** — only the harness's own sessions (13:44:57, 13:44:59, 13:45:04, 13:45:08, then a steady ~10s harvest poll at 13:45:19 / :30 / :41 / :53). `sshd -T` confirms the box would have allowed it (`allowstreamlocalforwarding yes`), and no bind error appears anywhere in the boot journal (`journalctl -b -p warning` is clean of ssh entries). **The forward was never attempted.** Helper end was up: `enroll-relay-serve.sock` exists at the run-dir root (`srw------- swarm swarm, Sep 19 13:44`), i.e. `IDSS_ENROLL_RELAY_SERVE_SOCKET` was served as `app/tests/e2e/fixtures/launch.ts:89,106` intends. ## The defect (product) `internal/founding/connectcheck.go:225` gates the forward on an **address argument**: ```go func (o *Orchestrator) OfferDialIn(ctx context.Context, device, address string) (DialIn, error) { … if address = strings.TrimSpace(address); address != "" { o.ensureRelayTo(ctx, address) } ``` But the app's S4d door never sends one. `app/src/components/founding/FoundingConnectDevice.vue:501`: ```ts dialIn.value = await props.client.offerDialIn(props.device || undefined); ``` and the client (`app/src/lib/founding.ts:1630, 2096`) is declared `offerDialIn(device?: string)` and wires only `this.call('offer-dial-in', { device })` — while `internal/founding/stdio.go:433-441` decodes an `Address` field that is therefore always `""`. The self-hosted journey has no address surface at all to fill it from (`s4AccessSelfHosted` in `app/tests/e2e/fixtures/wizard.ts:547` clicks the option and Continue — nothing typed). The other two `ensureRelay` call sites cannot cover S4d either: `internal/founding/manualpath.go:167,244` run at BeginStandup, and `internal/founding/selfhostedcarrier.go:107` (`ObservePairing`) returns early unless `st.Step == StandupInstallMachine`. At `connect-dial-in` no stand-up exists yet — `logs/founding-state.log` shows `"founded": false`, draft `"step": "review"`, and **no `standup` key at all** (grep count 0). So the S4d dial-in door is the *only* hook, and it is the one that is gated shut. Note the box address itself was available the whole time: `app/helper/cmd/helper/wiring_prod.go:733` wires `founding.WithSelfHostedBoxAddress(os.Getenv("OC_E2E_DROPLET_IP"))`, which `launch.ts` passes through via `...process.env`. `ensureRelay` (`selfhostedcarrier.go:31`) needs only `relayCarrier != nil && selfHostedBoxIP != ""` — both true. Nothing was missing except the call. ## What plugging it needs In `OfferDialIn`, move the gate off "an address was typed" and onto "a box address is known": call `o.ensureRelay(ctx)` unconditionally, keeping `ensureRelayTo(ctx, address)` for the case where the operator *did* supply one. `ensureRelay` already no-ops honestly on an unwired carrier or empty `selfHostedBoxIP` (ADR 0100 — no fake bridge), so this changes nothing on any non-drive path, and it matches ADR 0174's ruling that the wired box address is the provenance. Extend `internal/founding/connectcheck_test.go` / `selfhostedcarrier_test.go` with the case the drive just hit: self-hosted dial-in door opened at S4d with **no address argument** but a wired box address → the carrier's `Open` is called once. The alternative — threading the address through `offerDialIn` — is a bigger ask and would need a design ruling, since self-hosted deliberately has no address field on S4d. ## What is absent from this run directory Expected, given the drive died at leg 3 of ~15, but stated so the gaps are not read as signal: `logs/droplet-caddy.txt` and `logs/droplet-keri.txt` are `-- No entries --` / "could not be found" (no gateway was ever built — `ss -tlnp` on the box shows only sshd:22 and systemd-resolved); every `logs/guest-*.log` is a 129-byte stub and `logs/qemu.log` records no qemu (this rail is a droplet, not a VM); `logs/state-logs.log` reports no `state/logs` dir; `logs/clan-config-snapshot.log` says "a drive that never built one". `logs/broker-journal.txt` failed to harvest (`dev@100.98.48.68: Permission denied (publickey)`) — off the admin mesh by design, ADR 0208/#681, and the verdict does not depend on it. `artifacts/journey.json` was written and agrees with `legs.json` row-for-row. drive `20260919T134346Z` red at `connect-dial-in`: `the dial-in terminal join exited 1 --- transcript --- Warning: Permanently added '134.199.174.116' (ED25519) to the list of known hosts. time=2026-09-19T13:45:34.671Z level=ERROR msg="enroll did not c` evidence: `/home/swarm/session-runner/idss/test-results/drive-idip/20260919T134346Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 61952685f971 -->
Owner

Taking this by hand (Ben's session, 2026-09-19 14:30Z) — it blocks the debug IDIP drive for #1522/#1531 and no worker has claimed it in 35 minutes. ready-for-agent dropped so the swarm does not double-land it. Fix as the ticket names it: OfferDialIn calls ensureRelay whenever a box address is wired, test-first.

Taking this by hand (Ben's session, 2026-09-19 14:30Z) — it blocks the debug IDIP drive for #1522/#1531 and no worker has claimed it in 35 minutes. `ready-for-agent` dropped so the swarm does not double-land it. Fix as the ticket names it: `OfferDialIn` calls `ensureRelay` whenever a box address is wired, test-first.
Owner

Fixed in 4091563e, as the ticket named it. OfferDialIn now calls ensureRelay when no address is supplied, so the door opens the forward to the wired box address (WithSelfHostedBoxAddress); an unwired carrier or an empty address still opens nothing (ADR 0100), and a second offer opens no second forward.

Red first: TestSelfHostedRelay_DialInDoorOpensTheForwardWithNoAddressArgument failed 0 opens, want 1 before the change; its honest twin …OpensNothingWithoutAWiredBoxAddress passes on both sides. go test ./internal/founding/... ./app/helper/... green, go vet clean. GOTCHAS #271 records the shape (a hook gated on an argument no caller sends).

Live-unproven until the re-fire passes connect-dial-in — that fire is starting now on elitebook-03 (debug, ADR 0221); I will note the result here.

Fixed in `4091563e`, as the ticket named it. `OfferDialIn` now calls `ensureRelay` when no address is supplied, so the door opens the forward to the **wired** box address (`WithSelfHostedBoxAddress`); an unwired carrier or an empty address still opens nothing (ADR 0100), and a second offer opens no second forward. Red first: `TestSelfHostedRelay_DialInDoorOpensTheForwardWithNoAddressArgument` failed `0 opens, want 1` before the change; its honest twin `…OpensNothingWithoutAWiredBoxAddress` passes on both sides. `go test ./internal/founding/... ./app/helper/...` green, `go vet` clean. GOTCHAS #271 records the shape (a hook gated on an argument no caller sends). **Live-unproven** until the re-fire passes `connect-dial-in` — that fire is starting now on elitebook-03 (debug, ADR 0221); I will note the result here.
ben closed this issue 2026-09-19 14:32:45 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#1629
No description provided.