BuildRequest slurps stdin on no-body ops — GETs hang forever under held-open pipes

Open Beginner friendly
#49 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
go
Domain
cli

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.

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.

Dominant language
Go
Stars
1
Forks
0
Avg merge
1d 5h
Merged PRs (30d)
18

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from growthbook/cli

All issues in growthbook/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.