Skip to content

test_mrviewerpy: the prompt test waits for the child instead of sleeping - #6968

Merged
Fedr merged 2 commits into
masterfrom
test-prompt-pump-no-sleep
Sep 29, 2026
Merged

Fedr merged 2 commits into
masterfrom
test-prompt-pump-no-sleep

Conversation

@Fedr

@Fedr Fedr commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

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 on macos-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-test run 36558390836; a manual rerun of the job passed and published the wheels.

🤖 Generated with Claude Code

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>
@Fedr
Fedr merged commit 12e6449 into master Sep 29, 2026
32 checks passed
@Fedr
Fedr deleted the test-prompt-pump-no-sleep branch September 29, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants