Repository navigation
CI: compare the workflow path as posix so the Pester guard passes on Windows - #7750
Merged
Merged
Conversation
The guard step added in #7743 runs on windows-latest, where Path.relative_to() renders backslashes. The paths in the workflow YAML use forward slashes, so the membership check never matched and the pester job failed on every PR that touches this workflow's paths.
danielhanchen
added a commit
to shimmyshimmer/unsloth-staging-4
that referenced
this pull request
Aug 2, 2026
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 unslothai#7750 was merged without the Windows job ever running. Add the guard to the filter and assert its own coverage, so this cannot regress.
danielhanchen
added a commit
that referenced
this pull request
Aug 3, 2026
* Run the Windows Pester job when the guard itself changes 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. * Give the Pester guard its own cheap workflow instead of the smoke suite 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.
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.
Problem
The
Guard the Pester bootstrapstep added in #7743 fails onwindows-latest, sosetup.ps1 unit tests (VS 2026 / CMake guard)now fails on every PR that touches this workflow'spaths(studio/**,unsloth/**,unsloth_cli/**,install.ps1,pyproject.toml,tests/studio_setup_ps1/**).Path.relative_to()renders Windows separators, while the paths in the workflow YAML use forward slashes, so the membership check could never match:The guard itself is correct. Only the path comparison was platform-dependent, and it was written and run on Linux, where
str()andas_posix()happen to agree.Fix
Compare with
as_posix().Verification
Reproduced and confirmed on the real
windows-latestrunner rather than only locally:Guard the Pester bootstrapfails,Install Pester v5andRun Pester suiteskipped, job red.The other seven assertions in the file are substring checks against the step body and are unaffected by path separators.