Skip to content

docs(adr): 0058 through a gateway, simlock adb and simctl send stdin only with --stdin - #1175

Merged
V3RON merged 5 commits into
mainfrom
feature/1174-adr
Nov 1, 2026
Merged

V3RON merged 5 commits into
mainfrom
feature/1174-adr

Conversation

@V3RON

@V3RON V3RON commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1174.

ADR 0058, Proposed. Through a gateway, simlock adb and simlock simctl read and send stdin only with --stdin. Without the flag they send empty stdin, so the command sees end of input at once instead of hanging on a pipe that never closes. This narrows ADR 0005 §19c. The wire doesn't change.

Assumptions

none

Review

Spec review: 1 blocking, 1 fixed, 1 notes. Code review: skipped. Claims review: skipped.
Rounds: 1. Tokens: 22.6M.
Runs: 4. Cost USD: 0.6595. Agent seconds: 237.
Assessment: complete

Written by an agent.

@V3RON

V3RON commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Review findings (round 1, commit 700eb8a)

Spec review only (ADR-only; Opus/high). Assessment: complete.

  • R1 (blocking) docs/internal/adr/0005-gateway-and-worker-modes.md:3: the Status line does not say 0058 narrows §19c; only the README row does. ADR rules say a narrowed ADR's Status points at the new one (see 0049 for 0052, 0008 for 0025).
  • R2 (note) ADR 0058 Consequences, "No caller hangs on an open pipe": not true for callers who pass --stdin on a never-closed pipe. The issue accepts that wait, so say "without --stdin".

Decisions the issue left open are all decided; no contradiction with ADR 0005 §19a (empty stdin closes the child's input at once, process-runner.ts:313-318).

Written by an agent.

@V3RON

V3RON commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Review ledger

Round 1: 700eb8a
Round fix-check: ffbf038

Runs: 4. Cost USD: 0.6595. Agent seconds: 237.
Tokens input 62, output 13110, cache read 818272, cache write 121200.
- review 1 reviewer: claude-sonnet-5-5 136 s $0.2213
- review 1 spec-reviewer spec: claude-opus-5-5 44 s $0.2869
- fix implementer: claude-sonnet-5-5 26 s $0.0685
- review fix-check reviewer: claude-sonnet-5-5 31 s $0.0828
Finding outcomes: {"fixed":2}. Classes: {"adr-index: old ADR's Status points at narrowing ADR":1,"stated consequence must be true":1}.
{"findings":[{"id":"R1","role":"spec","class":"adr-index: old ADR's Status points at narrowing ADR","outcome":"fixed","path":"docs/internal/adr/0005-gateway-and-worker-modes.md","round":"1","fix":"ffbf038e6710c0cff73be75e00e25dc99ee5b003"},{"id":"R2","role":"spec","class":"stated consequence must be true","outcome":"fixed","path":"docs/internal/adr/0058-through-a-gateway-simlock-adb-and-simctl-send-stdin-only-with-stdin.md","round":"1","fix":"ffbf038e6710c0cff73be75e00e25dc99ee5b003"}]}

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review November 1, 2026 14:37
@V3RON
V3RON added this pull request to stack #1179 November 1, 2026 14:37
@V3RON
V3RON merged commit 3acdf23 into main Nov 1, 2026
51 checks passed
@V3RON
V3RON deleted the feature/1174-adr branch November 1, 2026 14:58
V3RON added a commit that referenced this pull request Nov 1, 2026
… with --stdin (#1178)

Closes #1176

### Status

Implement: done (4/4 green) Review: round 1 passed, no findings
Hardware: n/a Gate: running (stack #1175 -> #1178)

- [x] Through a gateway, `simlock adb` and `simlock simctl` without
`--stdin` never read stdin and send `stdin: ""`; with `--stdin` they
send stdin's contents (`src/cli/index.test.ts`).
- [x] `--stdin` is taken out of the arguments before the tool's, in
either order with `--lease`, and is accepted and ignored on a worker
(`src/cli/index.test.ts`).
- [x] With `--stdin`, a terminal stdin is read to its end like a pipe
(`readPipedStdin`'s tests in `src/cli/index.test.ts`).
- [x] The gateway e2e exec step runs without `input: ""`, its command
gets `""` as stdin, and it passes (`e2e/gateway-smoke.test.ts`, fast
lane).
- [x] `website/src/content/docs/docs/reference/cli.mdx` lists `--stdin`
in the flag tables of `simlock adb` and `simlock simctl` and says stdin
is sent only with it; `src/cli/AGENTS.md` step 5 says the same and its
Known gaps entry about the hang is gone.
- [x] The PR title (not a commit subject, F11) marks the change breaking
(`feat(cli)!:`), so the release notes say piped input now needs
`--stdin`.

Completion conditions of #1174:

- [x] Through a gateway, `simlock adb` with a piped stdin left open runs
its command and exits with the tool's code (fast e2e, fake devices) —
`e2e/gateway-smoke.test.ts` exec step without `input: ""`
- [x] Through a gateway, `--stdin` sends what stdin carried, and without
it the command gets empty input — `src/cli/index.test.ts`, and the e2e
step's echoed `""`
- [x] On a worker, `--stdin` is accepted and ignored —
`src/cli/index.test.ts`
- [x] The CLI reference and the CLI's manual describe `--stdin`, and the
known gap about the hang is gone — `cli.mdx` and `src/cli/AGENTS.md` in
this PR, checked by the claims review

## Assumptions

none

## Review

Spec review: 0 blocking, 0 fixed, 0 notes. Code review: 0 blocking, 0
fixed, 0 notes. Claims review: 0 blocking, 0 fixed, 0 notes.
Rounds: 1. Tokens: 23.7M.
Runs: 6. Cost USD: 1.7234. Agent seconds: 991.
Assessment: complete

*Written by an agent.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant