ci: skip the Windows build for changes that cannot affect it - #9
Merged
Conversation
Documentation-only pull requests spent ~3 minutes on a full Windows build. The pull_request trigger cannot simply take a paths filter: build-test is a required check on main, so a filtered-out run reports no status at all and the PR blocks forever waiting for it. (The existing comment on the trigger records exactly this constraint.) Instead the job always runs and always reports. A new first step diffs the PR against its base and decides whether any Windows-relevant path changed; every expensive step is guarded on that result, so an unrelated PR gets a green build-test in seconds. The path allowlist mirrors the push trigger rather than denylisting docs, so a new top-level file is treated as irrelevant only if it really is. CODE_SIGNING.md, SECURITY.md and THIRD-PARTY-NOTICES.md stay on the relevant list: they are release metadata that Test-ReleaseSource.ps1 validates, not documentation. global.json is added to both the allowlist and the push trigger, since it now pins the SDK that produces the lock files. If the diff cannot be computed the step fails open and runs the full build. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c41229190
ℹ️ 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".
Both found in review of the previous commit. git diff --name-only applies rename detection, so moving a file out of Windows/ reports only the destination path and the removal matches no relevant pattern -- the required check would then pass without compiling. Pass --no-renames so both sides of a move are listed. TokenMeter.Windows.Core.Tests.csproj pulls the shared parser fixtures from TokenMeterCore/Tests/TokenMeterCoreTests/Fixtures/*.jsonl into its test output, so editing a fixture can break the Windows tests. Add that directory to the allowlist and to the push trigger it mirrors; the push filter had the same gap before this change. A sweep of the Windows project files confirms it is the only path they reference outside Windows/, and the scripts build-test runs stay inside it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.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.
Docs-only PRs currently sit through a full ~3 minute Windows build.
build-testis a required check on main, so thepull_requesttrigger cannot take apaths-ignorefilter — a filtered-out run reports no status and the PR blocks forever on "waiting for status to be reported". The comment already on the trigger records that constraint.So the job keeps running and reporting on every PR, but decides up front whether the build is needed:
run_build.steps.scope.outputs.run_build == 'true'.CODE_SIGNING.md,SECURITY.mdandTHIRD-PARTY-NOTICES.mdstay relevant — they are release metadata validated byTest-ReleaseSource.ps1, not documentation.global.jsonis added to the allowlist and the push trigger, since it now pins the SDK that produces the lock files.release-packageis untouched — it isworkflow_dispatch-only.Test plan
windows.yml, sobuild-testmust run the full build and pass (no regression to the existing path).Determine whether the Windows build must runstep logs.github/workflows/windows.ymlas a Windows-relevant change.build-testin seconds without building.🤖 Generated with Claude Code