Skip to content

fix(smoke): batch probes to avoid Windows stdin deadlock#354

Merged
clstaudt merged 4 commits into
mainfrom
fix/core-bundle-all-domains
Jun 28, 2026
Merged

fix(smoke): batch probes to avoid Windows stdin deadlock#354
clstaudt merged 4 commits into
mainfrom
fix/core-bundle-all-domains

Conversation

@clstaudt

Copy link
Copy Markdown
Contributor

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 iterates for line in sys.stdin, which does read-ahead buffering and on Windows never yields a line until EOF — so the script deadlocks. The Pack Electron Windows 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.py against the locally-built frozen binary — all 19 domains pass in ~2s
  • CI Smoke-test core step completes quickly on all platforms, especially Windows

Made with Cursor

clstaudt and others added 4 commits June 28, 2026 13:24
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>
@clstaudt clstaudt added this pull request to the merge queue Jun 28, 2026
Merged via the queue into main with commit 473d288 Jun 28, 2026
2 checks passed
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