Skip to content

Ignore BrokenPipe in the no-network refusal test - #168

Merged
jserv merged 1 commit into
mainfrom
fix
Nov 17, 2026
Merged

jserv merged 1 commit into
mainfrom
fix

Conversation

@jserv

@jserv jserv commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

The ZHTW_NO_NETWORK refusal path exits before reading stdin, so writing the fixture in cli_no_network_env_refuses_verify races the process exit and can fail with a broken pipe (seen on the ubuntu-24.04 job of run 43977152132). The test now ignores the write result and keeps its assertions on exit status and stderr.

Verified locally with make check, plus cargo test --test cli-lint cli_no_network. The race is timing dependent and did not reproduce locally before the fix, so CI is the real confirmation.


Summary by cubic

Fixes a race in cli_no_network_env_refuses_verify where writing the stdin fixture could fail with a broken pipe because the refusal path exits before reading stdin. The test now tolerates BrokenPipe write errors and fails on any other error kind, keeping its assertions on exit status and stderr. No behavior change to zhtw-mcp itself; only the test was updated.

Written for commit d5e7fcd. Summary will update on new commits.

View guided diff Turn on auto-fix

cubic-dev-ai[bot]

This comment was marked as resolved.

The ZHTW_NO_NETWORK refusal path exits before reading stdin, so
writing the fixture races the process exit and can fail with a
broken pipe, as seen on the ubuntu-24.04 job. Tolerate only that
error kind and fail on any other, so unrelated I/O failures still
surface. The assertions on exit status and stderr are what the test
verifies.
@jserv
jserv merged commit 9eea954 into main Nov 17, 2026
10 checks passed
@jserv
jserv deleted the fix branch November 17, 2026 01:07
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