fix(smoke): batch probes to avoid Windows stdin deadlock#354
Merged
Conversation
The frozen server iterates `for line in sys.stdin`, which does read-ahead buffering and on Windows never yields a line until EOF. The previous write-one/read-one ping-pong deadlocked there (CI ran >17m). Write all probes, close stdin, then read responses after EOF — deadlock-free, bounded by a 180s timeout, and ~15x faster (36s -> 2s) since domains are no longer cold-started one request at a time. Co-authored-by: Cursor <cursoragent@cursor.com>
…dling Add a focused workflow that builds the PyInstaller core and runs scripts/smoke_core.py on all four platforms, triggered on pull_request (red-on-PR feedback) and merge_group (ejects a failing PR from the queue). Skips electron-builder so it is far cheaper than Pack Electron. A single aggregated "Core smoke gate" job lets branch protection require one check regardless of matrix size. This closes the gap where Pack Electron only ran post-merge and was never a required check, letting a Windows-deadlocking change merge on green pytest alone. Co-authored-by: Cursor <cursoragent@cursor.com>
Building the PyInstaller core on four platforms is too costly to repeat on every PR push. Drop the pull_request trigger; the gate runs on merge_group only, which is where it belongs — a failing PR is ejected from the queue back to PR status while PR updates stay cheap (pytest only). Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Follow-up to #353. That PR merged with a smoke-test script (
scripts/smoke_core.py) that probes the frozen core with a write-one/read-one ping-pong. The frozen server iteratesfor line in sys.stdin, which does read-ahead buffering and on Windows never yields a line until EOF — so the script deadlocks. ThePack ElectronWindows job hung for ~17 min before this was caught.This change (commit c2385b8, already on the branch) writes all probes up front, closes stdin (EOF), then reads responses — deadlock-free, cross-platform, bounded by a 180s timeout, and ~15x faster (36s → ~2s) since domains are no longer cold-started one request at a time.
Test plan
uv run python scripts/smoke_core.pyagainst the locally-built frozen binary — all 19 domains pass in ~2sSmoke-test corestep completes quickly on all platforms, especially WindowsMade with Cursor