join: the published curl | sh -s -- doorway can't answer its own consent prompt #938

Closed
opened 2026-08-28 12:20:22 +00:00 by matou-build-agent · 3 comments

What red'd

artifacts/verdict.json:

{ "verdict": "red", "firstRedLeg": "join",
  "legs": { "total": 23, "green": 22, "red": 1, "skip": 0 } }

Everything through leg 5 (decline-resume) is green. join is the only red, at 40 289 ms.

This is NOT the known frontier

The brief names the KNOWN frontier as "pairing never flips — the own-VPS carrier issue named in legs.json's skip reasons." That is not this red. artifacts/legs.json carries no skip reasons at all ("skip": 0), and the pair leg is green:

{ "leg": "pair", "status": "green", "ms": 111 }

The drive got past pairing, past deploy, activation, founded, mint, device-create, agent-install and the honesty leg decline-resume, and died on the real join. Fresh red; needs plugging.

The failure

artifacts/join-transcript.txt, in full:

Warning: Permanently added '170.64.151.24' (ED25519) to the list of known hosts.
idss: fetching this community's pinned agent from rehearsal-c.idss.nz…
idss-agent unknown · joining 

How should this machine contribute?

 [1] Full install — wipe → community OS at first deploy
     Most reliable · hard to reverse · consent given now
 [2] VM on the existing OS — keep this OS
     Easier to reverse · less reliable

> time=2026-08-28T12:11:59.266Z level=ERROR msg="install command did not reach Pending" component=agent err="join: terminal closed before a mode was chosen"
Connection to 170.64.151.24 closed.

The agent draws the mode prompt, prints its > cursor, and in the same breath reports EOF on the read. Exit 1. The harness's leg-6 fail-fast branch (tests/e2e/journey.device.spec.ts:539, the branch #936 / a4dfba7 added, source quoted verbatim in artifacts/journey.device-.../error-context.md:174) caught it:

Error: the join one-liner exited 1 before reaching the waiting-on-operator frontier

The controlled comparison that names the defect

This run contains the same consent walk driven two ways, six minutes apart, on the same box, through the same PTY helper and the same fullInstallConsentAnswers() answer script.

Leg 5 decline-resume — GREEN. It invokes the binary directly (spec lines 459-464):

sshDropletInteractive(
  ip,
  `IDSS_COMMUNITY_ORIGIN=${apex} idss-agent enroll ${currentCode}`,
  fullInstallConsentAnswers(),
  CEILING.declineResume,
).done;

artifacts/decline-transcript.txt shows the keystrokes landing:

> 1
Type WIPE to consent, anything else to stop: WIPE
✓ consent recorded — the wipe runs at first deploy
probing: linux · x86_64 · 2 threads · 3 GB memory · 76 GB disk
✓ connection request sent to 
waiting for the operator's decision…

Leg 6 join — RED. It runs the dashboard's published doorway byte-for-byte (artifacts/install-command.txt):

curl -sSf https://rehearsal-c.idss.nz/get | sh -s -- 56R7-4YLU-M44W-FPKL-NAKJ

The only variable between green and red is the curl … | sh -s -- wrapper. Under it the shell's stdin is the curl pipe, so the interactive join inherits fd 0 pointing at a pipe curl has already closed: the read returns EOF the instant the prompt is drawn — which is precisely the agent's own words, join: terminal closed before a mode was chosen. Nothing the harness types can reach it; the 1 and the WIPE go to a stdin the agent is not reading.

logs/device-journal.txt corroborates the shape and rules out a slow-prompt / timeout story. Session 16 is the join PTY (12:11:20 → 12:11:59, ≈ the leg's 40 289 ms):

Aug 28 12:11:21 … systemd[1]: Started idss-agent.service - IDSS agent (ADR 0053).
Aug 28 12:11:21 … idss-agent[8135]: … msg="join socket listening" component=agent path=/run/idss/agent.sock
Aug 28 12:11:56 … systemd[1]: Started netbird.service - NetBird mesh network client.
Aug 28 12:11:59 … sshd[7994]: Received disconnect from 179.65.135.113 port 29749

The installer spends 12:11:21 → 12:11:56 laying down the agent and netbird, then hands off to the interactive join, which dies ~3 s later. Not a stall — an immediate EOF. Note also that the journal carries no mode was chosen, did not reach Pending or How should this machine line: the doorway's failure never reaches journald, so the PTY transcript is its only record. The gateway journal likewise shows no connection request in that window — the agent never got far enough to send one.

Suspected layer

Product — the install doorway, not the harness. The string in install-command.txt is what the dashboard hands a real community member to paste (logs/gateway-journal.txt:1728: install doorway wired: /get serves the pinned agent from the gateway's seeded cache (ADR 0054)). Any human pasting it gets the mode prompt and then terminal closed before a mode was chosen, exit 1 — the doorway cannot answer its own consent question.

The harness is behaving correctly. Leg 6 exists precisely to run the doorway verbatim, and #936's new session.settled() fail-fast branch is what turned a silent 600 s stall into this legible transcript. Read against the spec comment at lines 524-530 (the old peek() read /var/log/idss-agent-enroll.log, a path nothing writes), this red is newly legible, not newly broken — the same defect very likely produced the previous run's frontier timeout.

What plugging it needs

  1. In the script served at /get, reattach the controlling terminal before the interactive join — exec idss-agent join "$CODE" < /dev/tty (or 0</dev/tty) — so the consent prompts read the terminal rather than the exhausted curl pipe.
  2. Belt and braces on the agent side: when idss-agent join finds stdin is not a TTY, open /dev/tty for the consent prompts instead of reading fd 0; if /dev/tty cannot be opened (a genuinely non-interactive pipe), exit with an actionable message naming the fix, not terminal closed before a mode was chosen.
  3. Add a seam test that pipes the doorway through sh -s -- and asserts the mode choice is answerable, so this cannot reach the drive again.

Cheap confirmation before coding — the device box was still up and answering at harvest (logs/device-do-forensics.txt: tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did, status: active, ping 0% loss): fetch the script and look at the invocation, e.g. curl -sSf https://rehearsal-c.idss.nz/get | tail -30, and grep it for </dev/tty.

What's absent

  • No live-box section was appended to this brief — no access line, no credentials, and this session is sandboxed to the run directory. Everything above is diagnosed from the harvested artifacts alone. The device droplet (170.64.151.24) was active and reachable at 12:12:16Z per logs/device-do-forensics.txt; I did not touch it, and I read nothing outside the run directory.
  • logs/broker-journal.txt is an expected harvest failure: dev@100.98.48.68: Permission denied (publickey) … "a drive on an off-mesh host harvests nothing by design and the drive's verdict does not depend on it (#681)".
  • artifacts/journey.json stops at 23 rows: legs 7 onward — approve, assess, select-files, deploy-takeover — never ran. This drive says nothing about them.
  • logs/device-caddy.txt is -- No entries --, logs/device-units.txt shows an empty systemctl --failed, and no idss-agent process survives in logs/device-stall.txt — all correct for a box that never passed the consent prompt, and none of them evidence of a second fault.

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

## What red'd `artifacts/verdict.json`: ```json { "verdict": "red", "firstRedLeg": "join", "legs": { "total": 23, "green": 22, "red": 1, "skip": 0 } } ``` Everything through leg 5 (`decline-resume`) is green. `join` is the only red, at 40 289 ms. ## This is NOT the known frontier The brief names the KNOWN frontier as "pairing never flips — the own-VPS carrier issue named in legs.json's skip reasons." **That is not this red.** `artifacts/legs.json` carries no skip reasons at all (`"skip": 0`), and the `pair` leg is green: ```json { "leg": "pair", "status": "green", "ms": 111 } ``` The drive got past pairing, past `deploy`, `activation`, `founded`, `mint`, `device-create`, `agent-install` and the honesty leg `decline-resume`, and died on the real join. Fresh red; needs plugging. ## The failure `artifacts/join-transcript.txt`, in full: ``` Warning: Permanently added '170.64.151.24' (ED25519) to the list of known hosts. idss: fetching this community's pinned agent from rehearsal-c.idss.nz… idss-agent unknown · joining How should this machine contribute? [1] Full install — wipe → community OS at first deploy Most reliable · hard to reverse · consent given now [2] VM on the existing OS — keep this OS Easier to reverse · less reliable > time=2026-08-28T12:11:59.266Z level=ERROR msg="install command did not reach Pending" component=agent err="join: terminal closed before a mode was chosen" Connection to 170.64.151.24 closed. ``` The agent draws the mode prompt, prints its `> ` cursor, and in the same breath reports EOF on the read. Exit 1. The harness's leg-6 fail-fast branch (`tests/e2e/journey.device.spec.ts:539`, the branch #936 / a4dfba7 added, source quoted verbatim in `artifacts/journey.device-.../error-context.md:174`) caught it: > Error: the join one-liner exited 1 before reaching the waiting-on-operator frontier ## The controlled comparison that names the defect This run contains the *same* consent walk driven two ways, six minutes apart, on the same box, through the same PTY helper and the same `fullInstallConsentAnswers()` answer script. **Leg 5 `decline-resume` — GREEN.** It invokes the binary directly (spec lines 459-464): ```ts sshDropletInteractive( ip, `IDSS_COMMUNITY_ORIGIN=${apex} idss-agent enroll ${currentCode}`, fullInstallConsentAnswers(), CEILING.declineResume, ).done; ``` `artifacts/decline-transcript.txt` shows the keystrokes landing: ``` > 1 Type WIPE to consent, anything else to stop: WIPE ✓ consent recorded — the wipe runs at first deploy probing: linux · x86_64 · 2 threads · 3 GB memory · 76 GB disk ✓ connection request sent to waiting for the operator's decision… ``` **Leg 6 `join` — RED.** It runs the dashboard's published doorway byte-for-byte (`artifacts/install-command.txt`): ``` curl -sSf https://rehearsal-c.idss.nz/get | sh -s -- 56R7-4YLU-M44W-FPKL-NAKJ ``` The only variable between green and red is the `curl … | sh -s --` wrapper. Under it the shell's stdin **is** the curl pipe, so the interactive join inherits fd 0 pointing at a pipe curl has already closed: the read returns EOF the instant the prompt is drawn — which is precisely the agent's own words, `join: terminal closed before a mode was chosen`. Nothing the harness types can reach it; the `1` and the `WIPE` go to a stdin the agent is not reading. `logs/device-journal.txt` corroborates the shape and rules out a slow-prompt / timeout story. Session 16 is the join PTY (12:11:20 → 12:11:59, ≈ the leg's 40 289 ms): ``` Aug 28 12:11:21 … systemd[1]: Started idss-agent.service - IDSS agent (ADR 0053). Aug 28 12:11:21 … idss-agent[8135]: … msg="join socket listening" component=agent path=/run/idss/agent.sock Aug 28 12:11:56 … systemd[1]: Started netbird.service - NetBird mesh network client. Aug 28 12:11:59 … sshd[7994]: Received disconnect from 179.65.135.113 port 29749 ``` The installer spends 12:11:21 → 12:11:56 laying down the agent and netbird, then hands off to the interactive join, which dies ~3 s later. Not a stall — an immediate EOF. Note also that the journal carries **no** `mode was chosen`, `did not reach Pending` or `How should this machine` line: the doorway's failure never reaches journald, so the PTY transcript is its only record. The gateway journal likewise shows no connection request in that window — the agent never got far enough to send one. ## Suspected layer **Product — the install doorway, not the harness.** The string in `install-command.txt` is what the dashboard hands a real community member to paste (`logs/gateway-journal.txt:1728`: `install doorway wired: /get serves the pinned agent from the gateway's seeded cache (ADR 0054)`). Any human pasting it gets the mode prompt and then `terminal closed before a mode was chosen`, exit 1 — the doorway cannot answer its own consent question. The harness is behaving correctly. Leg 6 exists *precisely* to run the doorway verbatim, and #936's new `session.settled()` fail-fast branch is what turned a silent 600 s stall into this legible transcript. Read against the spec comment at lines 524-530 (the old `peek()` read `/var/log/idss-agent-enroll.log`, a path nothing writes), this red is newly **legible**, not newly **broken** — the same defect very likely produced the previous run's frontier timeout. ## What plugging it needs 1. In the script served at `/get`, reattach the controlling terminal before the interactive join — `exec idss-agent join "$CODE" < /dev/tty` (or `0</dev/tty`) — so the consent prompts read the terminal rather than the exhausted curl pipe. 2. Belt and braces on the agent side: when `idss-agent join` finds stdin is not a TTY, open `/dev/tty` for the consent prompts instead of reading fd 0; if `/dev/tty` cannot be opened (a genuinely non-interactive pipe), exit with an actionable message naming the fix, not `terminal closed before a mode was chosen`. 3. Add a seam test that pipes the doorway through `sh -s --` and asserts the mode choice is answerable, so this cannot reach the drive again. Cheap confirmation before coding — the device box was still up and answering at harvest (`logs/device-do-forensics.txt`: `tcp/22: a FRESH connect succeeded — the box answers, whatever ssh did`, `status: active`, ping 0% loss): fetch the script and look at the invocation, e.g. `curl -sSf https://rehearsal-c.idss.nz/get | tail -30`, and grep it for `</dev/tty`. ## What's absent - **No live-box section was appended to this brief** — no access line, no credentials, and this session is sandboxed to the run directory. Everything above is diagnosed from the harvested artifacts alone. The device droplet (170.64.151.24) was `active` and reachable at 12:12:16Z per `logs/device-do-forensics.txt`; I did not touch it, and I read nothing outside the run directory. - `logs/broker-journal.txt` is an expected harvest failure: `dev@100.98.48.68: Permission denied (publickey)` … "a drive on an off-mesh host harvests nothing by design and the drive's verdict does not depend on it (#681)". - `artifacts/journey.json` stops at 23 rows: legs 7 onward — `approve`, `assess`, `select-files`, `deploy-takeover` — never ran. This drive says nothing about them. - `logs/device-caddy.txt` is `-- No entries --`, `logs/device-units.txt` shows an empty `systemctl --failed`, and no `idss-agent` process survives in `logs/device-stall.txt` — all correct for a box that never passed the consent prompt, and none of them evidence of a second fault. drive `20260828T111510Z` red at `join`: `the join one-liner exited 1 before reaching the waiting-on-operator frontier --- transcript --- Warning: Permanently added '170.64.151.24' (ED25519) to the list of known hosts. idss: fetching this com` evidence: `/home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T111510Z` 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=13222
(automated multi-host claim — lowest live claim id works this ticket)

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

close-report for #938 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 1f4993c9 is not a valid commit object (fabricated, or never pushed)
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
  • changed_files: 'agent/cmd/agent/consent_input.go' is not in the diff of the claimed commits
  • changed_files: 'agent/cmd/agent/consent_input_test.go' is not in the diff of the claimed commits
  • changed_files: 'agent/cmd/agent/main.go' is not in the diff of the claimed commits
  • changed_files: 'docs/GOTCHAS.md' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/install_doorway_test.go' is not in the diff of the claimed commits
  • changed_files: 'internal/controlapi/installscript.go' is not in the diff of the claimed commits
envelope
{
  "issue": 938,
  "status": "success",
  "commits": [
    "1f4993c9"
  ],
  "changed_files": [
    "STATUS.md",
    "agent/cmd/agent/consent_input.go",
    "agent/cmd/agent/consent_input_test.go",
    "agent/cmd/agent/main.go",
    "docs/GOTCHAS.md",
    "internal/controlapi/install_doorway_test.go",
    "internal/controlapi/installscript.go"
  ],
  "tests": [
    {
      "command": "go test ./agent/cmd/agent/ ./internal/controlapi/ ./internal/join/ ./internal/install/",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./... && go build -tags dev ./... && go vet -tags dev ./...",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./... (main + broker)",
      "exit_code": 0
    },
    {
      "command": "go test ./... (full suite)",
      "exit_code": 0
    },
    {
      "command": "sh -n + dash no-tty run of the rendered install script fragment",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Script served at /get reattaches the controlling terminal before the interactive join (exec idss-agent … < /dev/tty)": "internal/controlapi/installscript.go — hand-off renders `idss-agent install \"$1\" < /dev/tty`, guarded by a subshell probe `if (exec 3</dev/tty) 2>/dev/null; then`; proven by TestInstallDoorway_InteractiveInstallReattachesTheControllingTerminal",
    "Agent side: when idss-agent join finds stdin is not a TTY, open /dev/tty for the consent prompts instead of fd 0": "agent/cmd/agent/consent_input.go consentInput/resolveConsentInput detect non-char-device stdin and open /dev/tty; wired into runInstall+runEnroll (agent/cmd/agent/main.go). Proven by TestConsentInput_PipeStdinReattachesTheControllingTerminal and TestConsentInput_TerminalStdinIsReturnedUnchanged",
    "If /dev/tty cannot be opened (genuinely non-interactive pipe), exit with an actionable message naming the fix, not 'terminal closed before a mode was chosen'": "resolveConsentInput returns a fmt.Errorf naming the fix; proven by TestConsentInput_NonInteractivePipeFailsLoudWithTheFix, which asserts the message does NOT contain the EOF symptom",
    "Add a seam test that pipes the doorway through sh -s -- and asserts the mode choice is answerable": "controlapi seam test asserts the rendered script reattaches /dev/tty (the mechanism that makes the mode choice answerable under `curl … | sh -s --`); agent seam tests assert consentInput resolves an answerable reader for a pipe stdin. The true byte-for-byte `curl | sh -s --` end-to-end is leg 6 of the device drive itself."
  },
  "summary": "The curl|sh install doorway now answers its own wipe-consent prompt: the rendered /get script reattaches /dev/tty (subshell-guarded for dash+set -e) and the agent opens /dev/tty itself when stdin is a pipe, failing loud with the fix when there is no controlling terminal.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #938 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 1f4993c9 is not a valid commit object (fabricated, or never pushed) - changed_files: 'STATUS.md' is not in the diff of the claimed commits - changed_files: 'agent/cmd/agent/consent_input.go' is not in the diff of the claimed commits - changed_files: 'agent/cmd/agent/consent_input_test.go' is not in the diff of the claimed commits - changed_files: 'agent/cmd/agent/main.go' is not in the diff of the claimed commits - changed_files: 'docs/GOTCHAS.md' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/install_doorway_test.go' is not in the diff of the claimed commits - changed_files: 'internal/controlapi/installscript.go' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 938, "status": "success", "commits": [ "1f4993c9" ], "changed_files": [ "STATUS.md", "agent/cmd/agent/consent_input.go", "agent/cmd/agent/consent_input_test.go", "agent/cmd/agent/main.go", "docs/GOTCHAS.md", "internal/controlapi/install_doorway_test.go", "internal/controlapi/installscript.go" ], "tests": [ { "command": "go test ./agent/cmd/agent/ ./internal/controlapi/ ./internal/join/ ./internal/install/", "exit_code": 0 }, { "command": "go build ./... && go vet ./... && go build -tags dev ./... && go vet -tags dev ./...", "exit_code": 0 }, { "command": "golangci-lint run ./... (main + broker)", "exit_code": 0 }, { "command": "go test ./... (full suite)", "exit_code": 0 }, { "command": "sh -n + dash no-tty run of the rendered install script fragment", "exit_code": 0 } ], "criteria": { "Script served at /get reattaches the controlling terminal before the interactive join (exec idss-agent … < /dev/tty)": "internal/controlapi/installscript.go — hand-off renders `idss-agent install \"$1\" < /dev/tty`, guarded by a subshell probe `if (exec 3</dev/tty) 2>/dev/null; then`; proven by TestInstallDoorway_InteractiveInstallReattachesTheControllingTerminal", "Agent side: when idss-agent join finds stdin is not a TTY, open /dev/tty for the consent prompts instead of fd 0": "agent/cmd/agent/consent_input.go consentInput/resolveConsentInput detect non-char-device stdin and open /dev/tty; wired into runInstall+runEnroll (agent/cmd/agent/main.go). Proven by TestConsentInput_PipeStdinReattachesTheControllingTerminal and TestConsentInput_TerminalStdinIsReturnedUnchanged", "If /dev/tty cannot be opened (genuinely non-interactive pipe), exit with an actionable message naming the fix, not 'terminal closed before a mode was chosen'": "resolveConsentInput returns a fmt.Errorf naming the fix; proven by TestConsentInput_NonInteractivePipeFailsLoudWithTheFix, which asserts the message does NOT contain the EOF symptom", "Add a seam test that pipes the doorway through sh -s -- and asserts the mode choice is answerable": "controlapi seam test asserts the rendered script reattaches /dev/tty (the mechanism that makes the mode choice answerable under `curl … | sh -s --`); agent seam tests assert consentInput resolves an answerable reader for a pipe stdin. The true byte-for-byte `curl | sh -s --` end-to-end is leg 6 of the device drive itself." }, "summary": "The curl|sh install doorway now answers its own wipe-consent prompt: the rendered /get script reattaches /dev/tty (subshell-guarded for dash+set -e) and the agent opens /dev/tty itself when stdin is a pipe, failing loud with the fix when there is no controlling terminal.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Author
Member

close-report for #938 — status success

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

envelope
{
  "issue": 938,
  "status": "success",
  "commits": [
    "1f4993c2d1b973e4b364534e81598a89e22c349a"
  ],
  "changed_files": [
    "STATUS.md",
    "agent/cmd/agent/consent_input.go",
    "agent/cmd/agent/consent_input_test.go",
    "agent/cmd/agent/main.go",
    "docs/GOTCHAS.md",
    "internal/controlapi/install_doorway_test.go",
    "internal/controlapi/installscript.go"
  ],
  "tests": [
    {
      "command": "go test ./agent/cmd/agent/ ./internal/controlapi/ ./internal/join/ ./internal/install/",
      "exit_code": 0
    },
    {
      "command": "go build ./... && go vet ./... && go build -tags dev ./... && go vet -tags dev ./...",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./... (main + broker)",
      "exit_code": 0
    },
    {
      "command": "go test ./... (full suite)",
      "exit_code": 0
    },
    {
      "command": "sh -n + dash no-tty run of the rendered install script fragment",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Script served at /get reattaches the controlling terminal before the interactive join (exec idss-agent … < /dev/tty)": "internal/controlapi/installscript.go — hand-off renders `idss-agent install \"$1\" < /dev/tty`, guarded by a subshell probe `if (exec 3</dev/tty) 2>/dev/null; then`; proven by TestInstallDoorway_InteractiveInstallReattachesTheControllingTerminal",
    "Agent side: when idss-agent join finds stdin is not a TTY, open /dev/tty for the consent prompts instead of fd 0": "agent/cmd/agent/consent_input.go consentInput/resolveConsentInput detect non-char-device stdin and open /dev/tty; wired into runInstall+runEnroll (agent/cmd/agent/main.go). Proven by TestConsentInput_PipeStdinReattachesTheControllingTerminal and TestConsentInput_TerminalStdinIsReturnedUnchanged",
    "If /dev/tty cannot be opened (genuinely non-interactive pipe), exit with an actionable message naming the fix, not 'terminal closed before a mode was chosen'": "resolveConsentInput returns a fmt.Errorf naming the fix; proven by TestConsentInput_NonInteractivePipeFailsLoudWithTheFix, which asserts the message does NOT contain the EOF symptom",
    "Add a seam test that pipes the doorway through sh -s -- and asserts the mode choice is answerable": "controlapi seam test asserts the rendered script reattaches /dev/tty (the mechanism that makes the mode choice answerable under `curl … | sh -s --`); agent seam tests assert consentInput resolves an answerable reader for a pipe stdin. The true byte-for-byte `curl | sh -s --` end-to-end is leg 6 of the device drive itself."
  },
  "summary": "The curl|sh install doorway now answers its own wipe-consent prompt: the rendered /get script reattaches /dev/tty (subshell-guarded for dash+set -e) and the agent opens /dev/tty itself when stdin is a pipe, failing loud with the fix when there is no controlling terminal.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #938 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 938, "status": "success", "commits": [ "1f4993c2d1b973e4b364534e81598a89e22c349a" ], "changed_files": [ "STATUS.md", "agent/cmd/agent/consent_input.go", "agent/cmd/agent/consent_input_test.go", "agent/cmd/agent/main.go", "docs/GOTCHAS.md", "internal/controlapi/install_doorway_test.go", "internal/controlapi/installscript.go" ], "tests": [ { "command": "go test ./agent/cmd/agent/ ./internal/controlapi/ ./internal/join/ ./internal/install/", "exit_code": 0 }, { "command": "go build ./... && go vet ./... && go build -tags dev ./... && go vet -tags dev ./...", "exit_code": 0 }, { "command": "golangci-lint run ./... (main + broker)", "exit_code": 0 }, { "command": "go test ./... (full suite)", "exit_code": 0 }, { "command": "sh -n + dash no-tty run of the rendered install script fragment", "exit_code": 0 } ], "criteria": { "Script served at /get reattaches the controlling terminal before the interactive join (exec idss-agent … < /dev/tty)": "internal/controlapi/installscript.go — hand-off renders `idss-agent install \"$1\" < /dev/tty`, guarded by a subshell probe `if (exec 3</dev/tty) 2>/dev/null; then`; proven by TestInstallDoorway_InteractiveInstallReattachesTheControllingTerminal", "Agent side: when idss-agent join finds stdin is not a TTY, open /dev/tty for the consent prompts instead of fd 0": "agent/cmd/agent/consent_input.go consentInput/resolveConsentInput detect non-char-device stdin and open /dev/tty; wired into runInstall+runEnroll (agent/cmd/agent/main.go). Proven by TestConsentInput_PipeStdinReattachesTheControllingTerminal and TestConsentInput_TerminalStdinIsReturnedUnchanged", "If /dev/tty cannot be opened (genuinely non-interactive pipe), exit with an actionable message naming the fix, not 'terminal closed before a mode was chosen'": "resolveConsentInput returns a fmt.Errorf naming the fix; proven by TestConsentInput_NonInteractivePipeFailsLoudWithTheFix, which asserts the message does NOT contain the EOF symptom", "Add a seam test that pipes the doorway through sh -s -- and asserts the mode choice is answerable": "controlapi seam test asserts the rendered script reattaches /dev/tty (the mechanism that makes the mode choice answerable under `curl … | sh -s --`); agent seam tests assert consentInput resolves an answerable reader for a pipe stdin. The true byte-for-byte `curl | sh -s --` end-to-end is leg 6 of the device drive itself." }, "summary": "The curl|sh install doorway now answers its own wipe-consent prompt: the rendered /get script reattaches /dev/tty (subshell-guarded for dash+set -e) and the agent opens /dev/tty itself when stdin is a pipe, failing loud with the fix when there is no controlling terminal.", "reason": "", "blockers": [], "no_code_change": "" } ``` </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#938
No description provided.