test_mrviewerpy: the prompt test waits for the child instead of sleeping - #6968
Merged
Merged
Conversation
The parent sent exit() after a fixed six seconds; on a GitHub Intel runner importing the wheel alone took that long, so the line was already on stdin when the prompt first waited and the hook had nothing to pump for. Now stdin gets exit() only once the helper thread reports the viewer shut down, or at the child's own timeout. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…eads The parent keeps stdin open and silent through a bare pipe and waits in communicate(); the helper thread closes fd 0 once the viewer is down, so the prompt gets EOF and the interpreter exits on its own. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Grantim
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The macOS prompt-pumping test from #6864 raced the child: the parent sent
exit()after a fixed six seconds, and in the TestPyPI wheel run on a GitHub Intel runner (macos-26-intel, Python 3.8) importing the wheel alone took six seconds, so the line was already on stdin when the prompt first waited and the hook, correctly, had nothing to pump for. The same step passed onmacos-15-intel, the self-hosted Intel Mac and every arm64 runner, so it is the fixed sleep, not the hook.Now the child ends the session itself: once the helper thread has shut the viewer down it closes its own stdin, the prompt gets EOF and the interpreter exits normally. The parent keeps stdin open and silent through a bare pipe and waits in
communicate(), with no fixed delay. The assertions are unchanged.Found by the
publish-testrun 36558390836; a manual rerun of the job passed and published the wheels.🤖 Generated with Claude Code