join: the published curl|sh doorway exits 0 at 'connection request sent', never waits #939

Closed
opened 2026-08-28 12:59:36 +00:00 by matou-build-agent · 2 comments

The failure

join is the last of 23 legs and the only red — verdict.json: "firstRedLeg": "join", {"total": 23, "green": 22, "red": 1, "skip": 0}. The leg runs the dashboard's captured install one-liner verbatim (artifacts/install-command.txt: curl -sSf https://rehearsal-c.idss.nz/get | sh -s -- ED6B-99JH-PJM2-M9YX-3L97, with the post-decline code swapped in) in a PTY and polls for the waiting-on-operator frontier. The doorway ran the whole consent ceremony and then returned 0 without ever entering the wait, so leg 7 (approve) never got a held PTY to approve.

Evidence

artifacts/join-transcript.txt — the last four lines, in full:

probing: linux · x86_64 · 2 threads · 3 GB memory · 76 GB disk
✓ connection request sent to 
Connection to 134.199.152.177 closed.

No waiting for the operator's decision…, no error line, exit 0. artifacts/legs.json:

"leg": "join", "status": "red", "ms": 34293,
"error": "the join one-liner exited 0 before reaching the waiting-on-operator frontier"

The controlled comparison is inside this same run. The green decline-resume leg (ms 8748, ~20 s earlier, same box, same agent build, same fullInstallConsentAnswers()) invoked the agent directly — IDSS_COMMUNITY_ORIGIN=<apex> idss-agent enroll <code> — and artifacts/decline-transcript.txt continues exactly where the join transcript stops:

✓ connection request sent to 
waiting for the operator's decision…
✕ declined by the operator — this machine was not joined and the agent has removed itself
time=2026-08-28T12:54:35.239Z level=ERROR msg="enroll did not complete" component=agent err="join: declined by the operator"

So the wait exists and works — the published /get doorway is the path that drops it. The only line the doorway path adds is its own prefix: idss: fetching this community's pinned agent from rehearsal-c.idss.nz….

logs/device-journal.txt shows what the doorway did instead of waiting — all inside session-11, the join PTY (opened 12:54:40, Removed session 11-side disconnect at 12:55:13):

Aug 28 12:54:41 … systemd[1]: Started idss-agent.service - IDSS agent (ADR 0053).
Aug 28 12:54:42 … idss-agent[8399]: … msg="join socket listening" component=agent path=/run/idss/agent.sock
Aug 28 12:55:11 … systemd[1]: Started netbird.service - NetBird mesh network client.
Aug 28 12:55:13 … sshd[8255]: Received disconnect from 179.65.135.113 port 3714:11: disconnected by user

The box kept going in the background (mesh client up at 12:55:11, join socket listening) while the foreground one-liner returned 0 at 12:55:13. grep -c "waiting for the operator" is 0 in logs/device-journal.txt and in artifacts/join-transcript.txt; 1 in artifacts/decline-transcript.txt.

Second, lesser defect, visible in both transcripts: the community label is empty everywhere the agent prints it — idss-agent unknown · joining and ✓ connection request sent to (trailing space, cat -A confirms sent to ^M$). The name resolves fine elsewhere: the portal header reads Rehearsal C — IDSS. Not the cause of the red, but it ships in the published doorway's output.

Not the known frontier

This is not the own-VPS carrier red. artifacts/legs.json carries no skip reasons at all — zero skips — and pair is green at 121 ms, i.e. pairing did flip on this drive. The red is a fresh, distinct defect at the last leg.

Live box

No live-box section was appended to this brief, so there was no access line and I interrogated nothing on the machine; everything above is from the harvested records. For the record, logs/device-do-forensics.txt (12:55:29Z) shows the device was still answering — tcp/22: a FRESH connect succeeded — but without credentials granted I ran nothing against it. Also absent by design: logs/broker-journal.txt is a harvest failure (dev@100.98.48.68: Permission denied (publickey) — off the admin mesh, ADR 0208, #681), so the broker's view of the connection request is unavailable; and there is no logs/droplet-journal.txt under that name — this drive splits it into device-journal.txt + gateway-journal.txt. The gateway journal carries nothing about the pending device (the broker holds that).

Suspected layer

Product — the published /get doorway script, not the harness and not infra.

  • Not harness: the leg ran the captured one-liner byte-for-byte as the #183 spec requires, and its expectation (waiting for the operator's decision…) is met by the direct-enroll path in the same run, 20 s earlier. Also not the #936 stall bug — that fix landed (a4dfba7) and the fail-fast path it added is what caught this cleanly in 34 s instead of burning the 600 s ceiling.
  • Not infra: the box is up, reachable, and the agent service is running and listening.

Most likely mechanism: the doorway does not exec the agent's enroll in the foreground. Either it hands off to idss-agent.service once the socket is listening and returns, or — given 1f4993c ("the published curl|sh install doorway answers its own wipe-consent prompt") — it feeds the consent answers down a pipe and the agent treats that stdin EOF as "done" and returns success after dispatching the request. Either way the doorway begins an interactive consent ceremony (menu, WIPE typed, probe) and abandons the user before the decision, exiting 0 with the machine unapproved and a full-disk wipe already consented. A human running the published one-liner sees no approval outcome at all.

What plugging it needs

  1. Make the doorway's last step exec the agent's enroll on the caller's terminal, so the waiting-on-operator phase and the landing walk (joined the community network … enrolled) render there and the agent's exit code becomes the one-liner's exit code — non-zero on decline, 0 with the landing walk on approve. If consent is pre-answered on a pipe, re-attach the agent's stdin to the tty (or pass consent as flags/env) so EOF after WIPE cannot be read as completion.
  2. Add a seam test asserting doorway/direct parity: curl … | sh -s -- <code> and idss-agent enroll <code> must both emit waiting for the operator's decision… and must not exit until the operator's decision lands. Nothing today covers the doorway's post-consent behaviour, which is why 1f4993c's consent fix shipped with the wait dropped.
  3. Separately, fill the community display name in the agent's banner and confirmation lines — joining and connection request sent to are empty in both transcripts.

drive 20260828T123909Z red at join: the join one-liner exited 0 before reaching the waiting-on-operator frontier --- transcript --- Warning: Permanently added '134.199.152.177' (ED25519) to the list of known hosts. idss: fetching this c
evidence: /home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T123909Z on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured

## The failure `join` is the last of 23 legs and the only red — `verdict.json`: `"firstRedLeg": "join"`, `{"total": 23, "green": 22, "red": 1, "skip": 0}`. The leg runs the dashboard's **captured install one-liner verbatim** (`artifacts/install-command.txt`: `curl -sSf https://rehearsal-c.idss.nz/get | sh -s -- ED6B-99JH-PJM2-M9YX-3L97`, with the post-decline code swapped in) in a PTY and polls for the waiting-on-operator frontier. The doorway ran the whole consent ceremony and then **returned 0 without ever entering the wait**, so leg 7 (`approve`) never got a held PTY to approve. ## Evidence `artifacts/join-transcript.txt` — the last four lines, in full: ``` probing: linux · x86_64 · 2 threads · 3 GB memory · 76 GB disk ✓ connection request sent to Connection to 134.199.152.177 closed. ``` No `waiting for the operator's decision…`, no error line, exit 0. `artifacts/legs.json`: ``` "leg": "join", "status": "red", "ms": 34293, "error": "the join one-liner exited 0 before reaching the waiting-on-operator frontier" ``` **The controlled comparison is inside this same run.** The green `decline-resume` leg (ms 8748, ~20 s earlier, same box, same agent build, same `fullInstallConsentAnswers()`) invoked the agent *directly* — `IDSS_COMMUNITY_ORIGIN=<apex> idss-agent enroll <code>` — and `artifacts/decline-transcript.txt` continues exactly where the join transcript stops: ``` ✓ connection request sent to waiting for the operator's decision… ✕ declined by the operator — this machine was not joined and the agent has removed itself time=2026-08-28T12:54:35.239Z level=ERROR msg="enroll did not complete" component=agent err="join: declined by the operator" ``` So the wait exists and works — the published `/get` doorway is the path that drops it. The only line the doorway path adds is its own prefix: `idss: fetching this community's pinned agent from rehearsal-c.idss.nz…`. `logs/device-journal.txt` shows what the doorway did instead of waiting — all inside session-11, the join PTY (opened 12:54:40, `Removed session 11`-side disconnect at 12:55:13): ``` Aug 28 12:54:41 … systemd[1]: Started idss-agent.service - IDSS agent (ADR 0053). Aug 28 12:54:42 … idss-agent[8399]: … msg="join socket listening" component=agent path=/run/idss/agent.sock Aug 28 12:55:11 … systemd[1]: Started netbird.service - NetBird mesh network client. Aug 28 12:55:13 … sshd[8255]: Received disconnect from 179.65.135.113 port 3714:11: disconnected by user ``` The box kept going in the background (mesh client up at 12:55:11, join socket listening) while the foreground one-liner returned 0 at 12:55:13. `grep -c "waiting for the operator"` is **0** in `logs/device-journal.txt` and in `artifacts/join-transcript.txt`; **1** in `artifacts/decline-transcript.txt`. **Second, lesser defect, visible in both transcripts:** the community label is empty everywhere the agent prints it — `idss-agent unknown · joining ` and `✓ connection request sent to ` (trailing space, `cat -A` confirms `sent to ^M$`). The name resolves fine elsewhere: the portal header reads `Rehearsal C — IDSS`. Not the cause of the red, but it ships in the published doorway's output. ## Not the known frontier This is **not** the own-VPS carrier red. `artifacts/legs.json` carries **no skip reasons at all** — zero skips — and `pair` is green at 121 ms, i.e. pairing did flip on this drive. The red is a fresh, distinct defect at the last leg. ## Live box **No live-box section was appended to this brief**, so there was no access line and I interrogated nothing on the machine; everything above is from the harvested records. For the record, `logs/device-do-forensics.txt` (12:55:29Z) shows the device was still answering — `tcp/22: a FRESH connect succeeded` — but without credentials granted I ran nothing against it. Also absent by design: `logs/broker-journal.txt` is a harvest failure (`dev@100.98.48.68: Permission denied (publickey)` — off the admin mesh, ADR 0208, #681), so the broker's view of the connection request is unavailable; and there is no `logs/droplet-journal.txt` under that name — this drive splits it into `device-journal.txt` + `gateway-journal.txt`. The gateway journal carries nothing about the pending device (the broker holds that). ## Suspected layer **Product — the published `/get` doorway script**, not the harness and not infra. - Not harness: the leg ran the captured one-liner byte-for-byte as the #183 spec requires, and its expectation (`waiting for the operator's decision…`) is *met by the direct-enroll path in the same run, 20 s earlier*. Also not the #936 stall bug — that fix landed (a4dfba7) and the fail-fast path it added is what caught this cleanly in 34 s instead of burning the 600 s ceiling. - Not infra: the box is up, reachable, and the agent service is running and listening. Most likely mechanism: the doorway does not `exec` the agent's enroll in the foreground. Either it hands off to `idss-agent.service` once the socket is listening and returns, or — given 1f4993c ("the published curl|sh install doorway answers its own wipe-consent prompt") — it feeds the consent answers down a pipe and the agent treats that stdin EOF as "done" and returns success after dispatching the request. Either way the doorway **begins an interactive consent ceremony (menu, WIPE typed, probe) and abandons the user before the decision**, exiting 0 with the machine unapproved and a full-disk wipe already consented. A human running the published one-liner sees no approval outcome at all. ## What plugging it needs 1. Make the doorway's last step `exec` the agent's enroll on the caller's terminal, so the waiting-on-operator phase and the landing walk (`joined the community network` … `enrolled`) render there and **the agent's exit code becomes the one-liner's exit code** — non-zero on decline, 0 with the landing walk on approve. If consent is pre-answered on a pipe, re-attach the agent's stdin to the tty (or pass consent as flags/env) so EOF after `WIPE` cannot be read as completion. 2. Add a seam test asserting doorway/direct parity: `curl … | sh -s -- <code>` and `idss-agent enroll <code>` must both emit `waiting for the operator's decision…` and must not exit until the operator's decision lands. Nothing today covers the doorway's *post-consent* behaviour, which is why 1f4993c's consent fix shipped with the wait dropped. 3. Separately, fill the community display name in the agent's banner and confirmation lines — `joining ` and `connection request sent to ` are empty in both transcripts. drive `20260828T123909Z` red at `join`: `the join one-liner exited 0 before reaching the waiting-on-operator frontier --- transcript --- Warning: Permanently added '134.199.152.177' (ED25519) to the list of known hosts. idss: fetching this c` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T123909Z` on matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured <!-- rehearsal-sig: 227571a3f8a9 -->
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=13234
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=13234 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #939 — status success

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

envelope
{
  "issue": 939,
  "status": "success",
  "commits": [
    "0ca9192"
  ],
  "changed_files": [
    "STATUS.md",
    "agent/cmd/agent/main.go",
    "internal/enrollwire/device_transport_integration_test.go",
    "internal/join/cli.go",
    "internal/join/cli_test.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/join/... ./internal/controlapi/... ./agent/... ./internal/enrollwire/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go vet ./internal/join/... ./agent/cmd/agent/... ./internal/enrollwire/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go build ./...",
      "exit_code": 0
    },
    {
      "command": "pre-push go-ci gate (build/vet/test ./...) on git push",
      "exit_code": 0
    }
  ],
  "criteria": {
    "curl|sh doorway and idss-agent enroll both emit 'waiting for the operator's decision…' and do not exit until the decision lands": "internal/join/cli.go RunInstallCommand now folds AwaitAndLand after RunTerminal reaches Pending; runInstall (agent/cmd/agent/main.go) drives it under a SIGINT-cancellable ctx like runEnroll; TestInstallCommand_PinnedFromGatewayServiceResidueJoinStarts and TestInstallDoorway_DeclineExitsNonzero (internal/join/cli_test.go) assert the wait line + landing/decline; enrollwire integration test asserts the wait line over HTTP",
    "the doorway's exit code is the join's outcome — non-zero on decline, 0 with the landing walk on approve": "RunInstallCommand returns the Landing/error from AwaitAndLand; TestInstallDoorway_DeclineExitsNonzero asserts a non-nil error + honest decline line + self-remove; the approve path lands to StatusEnrolled",
    "seam test asserting doorway/direct parity (both wait, neither exits until decision)": "internal/join/cli_test.go: the folded RunInstallCommand path now takes the identical AwaitAndLand walk runEnroll takes; approve→Enrolled and decline→ErrDeclined both covered, red against the pre-fix return-at-Pending behaviour"
  },
  "summary": "The published curl|sh install doorway now folds AwaitAndLand into RunInstallCommand so it waits on the operator's decision and walks the landing instead of exiting 0 at 'connection request sent', with its exit code becoming the join's outcome.",
  "reason": "",
  "blockers": []
}
**close-report** for #939 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 939, "status": "success", "commits": [ "0ca9192" ], "changed_files": [ "STATUS.md", "agent/cmd/agent/main.go", "internal/enrollwire/device_transport_integration_test.go", "internal/join/cli.go", "internal/join/cli_test.go" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/join/... ./internal/controlapi/... ./agent/... ./internal/enrollwire/...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go vet ./internal/join/... ./agent/cmd/agent/... ./internal/enrollwire/...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go build ./...", "exit_code": 0 }, { "command": "pre-push go-ci gate (build/vet/test ./...) on git push", "exit_code": 0 } ], "criteria": { "curl|sh doorway and idss-agent enroll both emit 'waiting for the operator's decision…' and do not exit until the decision lands": "internal/join/cli.go RunInstallCommand now folds AwaitAndLand after RunTerminal reaches Pending; runInstall (agent/cmd/agent/main.go) drives it under a SIGINT-cancellable ctx like runEnroll; TestInstallCommand_PinnedFromGatewayServiceResidueJoinStarts and TestInstallDoorway_DeclineExitsNonzero (internal/join/cli_test.go) assert the wait line + landing/decline; enrollwire integration test asserts the wait line over HTTP", "the doorway's exit code is the join's outcome — non-zero on decline, 0 with the landing walk on approve": "RunInstallCommand returns the Landing/error from AwaitAndLand; TestInstallDoorway_DeclineExitsNonzero asserts a non-nil error + honest decline line + self-remove; the approve path lands to StatusEnrolled", "seam test asserting doorway/direct parity (both wait, neither exits until decision)": "internal/join/cli_test.go: the folded RunInstallCommand path now takes the identical AwaitAndLand walk runEnroll takes; approve→Enrolled and decline→ErrDeclined both covered, red against the pre-fix return-at-Pending behaviour" }, "summary": "The published curl|sh install doorway now folds AwaitAndLand into RunInstallCommand so it waits on the operator's decision and walks the landing instead of exiting 0 at 'connection request sent', with its exit code becoming the join's outcome.", "reason": "", "blockers": [] } ``` </details>
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#939
No description provided.