Repository navigation
cmux-imessage: a send never waits on a descendant holding stderr (#33301) - #33687
Conversation
… stderr (#33301) Moves the runner into TimedRunner { timeout } (SystemRunner keeps its API and delegates with SEND_TIMEOUT) so tests can use a short timeout, and adds two tests where a backgrounded descendant keeps stderr open: after a timeout, and after a normal exit. Both still wait for the descendant. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-9bf3963ac29d9d619047
…err (#33301) stderr is drained into a shared buffer on its own thread, and nothing joins that thread. After a timeout the send returns as soon as the child is killed and reaped; after a normal exit it takes what arrived within a 2-second grace. The drain thread ends at end of file, when the last holder of the pipe closes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-9bf3963ac29d9d619047
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
web and size checks: green Shipped in:
|
|
Review (subagent claude-opus-5-5 medium): SHIP at cba52bf Visual verdict: unchanged by this diff (no UI). Checked the drain, the exit and timeout paths, and the two new tests. In the normal case nothing is lost: Follow-ups:
|
|
Found 2 test failures on Blacksmith runners: Failures
|
|
Review (codex gpt-6.1-sol xhigh, router-review): BLOCK at cba52bf BLOCK at cba52bf Visual verdict: no images; Leo tries the build
|
The red-test commit picked up stale copies of scripts/reload.sh and two reload tests from the worktree. Restores them to the PR base so this PR changes only cmux-imessage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-9bf3963ac29d9d619047
|
Review (codex, router-review): SHIP at ac50c35 Reviewer: codex gpt-6.1-sol xhigh, fast tier. Follow-ups: 1. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward. SHIP at ac50c35 Visual verdict: no images; Leo tries the build
Rust tooling is unavailable, so tests could not be rerun. Follow-ups:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Fixes #33301, a follow-up from the Codex review of #33219: a send could hang past its timeout when a descendant of
osascriptinherited stderr and kept it open.What changes
TimedRunner { timeout }is the runner.SystemRunnerkeeps its name and API and delegates to it withSEND_TIMEOUT.Tests
Two commits: the failing tests first (both red on Linux CI, each waiting the full 20 s on the descendant), then the fix. Green: 9 send tests pass in about 2 s, including a 1-second timeout with
sleep 20 & waitand an exit that leavessleep 20 &holding stderr. The 13 reader tests still pass. clippy-D warnings, the panic ratchet and rustfmt are clean.Agent session: agent session
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes #33301: an iMessage send no longer hangs past its timeout when a descendant of the child keeps stderr open.
TimedRunner { timeout };SystemRunnerkeeps its API and delegates withSEND_TIMEOUT.sleep 20 & waitand an exit that leavessleep 20 &holding stderr; both previously waited the full 20 seconds.Written for commit ac50c35. Summary will update on new commits.