Skip to content

test: error-path e2e, and a race fix in the slow-pipe tests - #8

Merged
coderbuzz merged 1 commit into
mainfrom
e2e-error-paths
Oct 13, 2026
Merged

coderbuzz merged 1 commit into
mainfrom
e2e-error-paths

Conversation

@coderbuzz

Copy link
Copy Markdown
Owner

Two test improvements from the (cancelled) native-binary experiment. No runtime change.

  • Error paths: a new e2e test for a bad API key (401) and an unknown model (400). Each must end with status failed, exit 1, and the reason. A failing tool (exit 7) and malformed tool arguments must come back as tool results, and the run goes on. A crash, an empty stdout or a silent success fails the test.
  • Slow-pipe race: the slow-pipe tests now attach the data listener before pausing. If the child exits while the stream is paused with no listener, Node's flushStdio resumes it and drops the data. A CLI that exits fast hit this in 3 of 20 runs under load. A mutation back to process.exit() still fails all three slow-pipe tests, so the 0.1.4: stop truncating stdout at 64 KiB through a pipe #5 regression stays covered.

npm test: 12/12.

🤖 Generated with Claude Code

… slow reader

- e2e: bad API key (401) and unknown model (400) end as status failed, exit 1, with
  the reason; a failing tool (exit 7) and malformed tool arguments come back as tool
  results and the run goes on
- slow-pipe tests attach the reader before pausing: a child that exited while the
  stream was paused lost its output to Node's flushStdio (3 in 20 runs under load
  with a fast-exiting CLI); a mutation back to process.exit() still fails them

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderbuzz
coderbuzz merged commit d1a3aa9 into main Oct 13, 2026
1 check passed
@coderbuzz
coderbuzz deleted the e2e-error-paths branch October 13, 2026 05:41
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