BuildRequest slurps stdin on no-body ops — GETs hang forever under held-open pipes
- Dominant language
- Go
- Stars
- 1
- Forks
- 0
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 18
Description
**Behavior:** every command — including body-less GETs and `--dry-run` — blocks forever when stdin is a held-open pipe or socket. `tail -f /dev/null | growthbook projects list` hangs with zero output; CI runners and agent harnesses that keep the child's stdin open hit this constantly.
**Root cause:** `BuildRequest`'s "Priority 2: stdin" branch calls `io.ReadAll(stdin)` whenever stdin is a non-char-device, without checking whether the operation takes a body at all.
**Carried fix:** `.speakeasy/patches/internal/flagutil/metadata.go.patch` (PR #48) gates the read on `bodyFlagName != ""`. Body-taking ops keep the stdin-as-body feature (a held-open pipe still blocks those — defensible, documented behavior; see also #25).
**Retire when:** Speakeasy's generated `flagutil/metadata.go` skips the stdin read for no-body operations.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with .speakeasy/patches/internal/flagutil/metadata.go.patch and the generated internal/flagutil/metadata.go mentioned in the issue. Inspect BuildRequest's stdin handling and compare the carried fix in PR #48. Done means no-body operations, including GETs and --dry-run, no longer read held-open stdin, while body-taking operations retain stdin-as-body behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100