Repository navigation
CI: run the Pester guard on Windows without the smoke suite - #7753
Conversation
The workflow's paths filter covers tests/studio/*.ps1, which does not match the guard's .py file, so editing the guard alone did not run the job that executes it on windows-latest. That is how the backslash comparison fixed in #7750 was merged without the Windows job ever running. Add the guard to the filter and assert its own coverage, so this cannot regress.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6e391238e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # The guard runs on windows-latest, so editing it must run this job. Without | ||
| # this, a Windows-only break in the guard lands and only shows up later, on an | ||
| # unrelated PR. | ||
| - 'tests/studio/test_pester_bootstrap_hardening.py' |
There was a problem hiding this comment.
Avoid launching every smoke job for guard-only changes
When a PR changes only this Python guard, this workflow-level paths entry enables the entire workflow, not just pester. The inspected workflow has no job-level path conditions, so the unrelated inference, Visual Studio, and VC++ jobs also launch—including multiple 30–35 minute GGUF download and inference jobs—despite the adjacent filter comment explicitly avoiding GGUF jobs for Python-only changes. Move the guard to a lightweight workflow or add change-based job gating so guard-only edits run pester without starting every Windows smoke job.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed: none of the eight jobs in that workflow has an if:, so a guard-only .py edit would have launched all of them, including the four 30 to 35 minute GGUF download and inference jobs. That is the opposite of what the entry was for. Reverted it and moved the guard to a dedicated one-job pester-guard-ci.yml on windows-latest, which runs the same guard in about a minute. The guard now asserts that workflow stays a single Windows job, and three negative controls (dropping the path, moving it off windows-latest, deleting the workflow) each fail the guard.
Listing the guard's .py file in studio-windows-inference-smoke.yml made a guard-only edit launch all eight Windows smoke jobs, four of which download GGUF models and run 30+ minutes, because that workflow has no job-level path gating. Run the same guard on the same OS in a single one-job workflow instead, and assert it stays one Windows job.
|
Reworked after the review point about launching the whole smoke suite. Verified on staging that a guard-only change now runs one job, not eight. Staging PR (shimmyshimmer#179) changed exactly the two files a guard-only edit would touch:
Coverage is unchanged and split by cost:
The one red check on staging is |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
On the cancelled checks above: those are workflows I stopped by hand to keep the org runners free, not failures. This PR adds a workflow file and edits one test file. Left running here:
|
Problem
The Pester guard added in #7743 runs on
windows-latestinside thepesterjob, so editing the bootstrap runs the guard. Editing the guard itself did not run it on any Windows runner.That is not theoretical. #7750 fixed a Windows-only bug in the guard (
Path.relative_to()returns backslashes, so a membership test against the forward-slash paths in the YAML could never match). It changed exactly one file,tests/studio/test_pester_bootstrap_hardening.py, and thesetup.ps1 unit testsjob never appeared in its checks. A Windows-only fix merged with no Windows coverage.The obvious fix, adding the guard to
studio-windows-inference-smoke.yml'spaths, is worse than the problem: none of that workflow's eight jobs has anif:, so a guard-only.pyedit would launch all of them, including four GGUF download and inference jobs that run 30 to 35 minutes.Changes
.github/workflows/pester-guard-ci.yml: one job,windows-latest, checkout + setup-python + pytest. It triggers on the guard file and on itself.paths, stays a single job, and stays onwindows-latest.studio-windows-inference-smoke.ymlis unchanged. Coverage is now split by cost:pesterjob, at no extra costVerification
Measured on a staging repo, changing only the two files a guard-only edit touches:
Pester guard / Pester bootstrap guardran onwindows-latest, 9 passed, 26 seconds wall clockWindows Unsloth GGUF CIdid not triggerNegative controls, each of which fails the guard: dropping the guard from the new workflow's
paths, moving the job offwindows-latest, deleting the workflow.The six bootstrap mutations from #7743 are all still caught: dropping the
Install-PSResourcecall, dropping either or both registration commands, re-silencing a registration, dropping the initial client selection, dropping the guard step.