Skip to content

Build the code under review in the pyinstaller workflow - #332

Open
happyarts wants to merge 1 commit into
kaixxx:mainfrom
happyarts:fix/ci-build-checks-the-pr
Open

Build the code under review in the pyinstaller workflow#332
happyarts wants to merge 1 commit into
kaixxx:mainfrom
happyarts:fix/ci-build-checks-the-pr

Conversation

@happyarts

Copy link
Copy Markdown
Contributor

The problem

The pyinstaller build smoke test has never run against a pull request.

on: workflow_run starts a job whose actions/checkout resolves to the
repository's default branch, not the commit that triggered the run. So the
workflow has been re-building main every time and reporting success.

Evidence from 2026-07-26 — eight runs, all triggered by pushes to five
different PR branches:

2026-07-26T16:51  workflow_run  branch=main  sha=dc4231e1  success
2026-07-26T16:50  workflow_run  branch=main  sha=dc4231e1  success
2026-07-26T15:24  workflow_run  branch=main  sha=dc4231e1  success
   ... (5 more, same sha)

Same commit every time, and gh pr checks on those PRs lists only
pytest (3.10) and pytest (3.13) — no pyinstaller check to gate on.

Why it matters right now

#330 makes noScribe.main load lazily, which PyInstaller's static analysis
cannot follow. Without a hidden import the packaged app dies at startup with
ModuleNotFoundError while the whole test suite stays green. The
./dist/noScribe/noScribe -h step in this workflow is exactly the check that
catches that class of breakage — it just never saw the branch.

(#330 declares the hidden import, so it is fine; the point is that CI would
not have told either of us.)

The change

Trigger the workflow directly, the same way pytest.yml does. One line, plus
a comment recording why it must not go back to workflow_run.

The trade-off is a build on a PR whose tests are failing. The
"only after pytest succeeded" ordering in the old comment cannot be expressed
across two workflows without giving up the correct checkout — if the build
minutes matter more than the isolation, the alternative is moving the job into
pytest.yml with needs: pytest, which keeps both. Happy to switch to that
if you prefer it.

🤖 Generated with Claude Code

The build smoke test never ran against a pull request. A `workflow_run` job
checks out the repository's default branch rather than the commit that
triggered it, so every run built main again -- on 2026-07-26 eight runs
triggered by pushes to five different PR branches all built the same main
commit and all reported success, while none of those PRs showed a pyinstaller
check at all.

Trigger it directly, like the pytest workflow, so a pull request that breaks
`pyinstaller` or the packaged startup is caught before merge. The cost is one
build on a PR whose tests fail; the previous "only after pytest succeeded"
ordering cannot be expressed across workflows without giving up the correct
checkout.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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