fix: stop Build Gate from passing when no build actually ran - #8861
Conversation
Two issues introduced in #8822 caused PRs to show a green Build Gate without producing any build artifact: 1. concurrency.cancel-in-progress evaluated true for almost every pull_request event, so an incidental event (e.g. a transient draft toggle) cancelled the real in-flight Windows/macOS builds. 2. The Build Gate auto-passed whenever prebuild was skipped/cancelled (only required prebuild.result != success), which is exactly what happens after the cancellation above — leaving a green gate on a commit that was never built. Invert the cancel-in-progress logic to only cancel for events that will actually produce a new build, and make the gate fail closed for any prebuild outcome other than a successful "no Explorer/ changes" decision.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Claude finished @aixaCode's task in 2m 25s —— View job Code Review
Root-cause checkPASS. This PR fixes both root causes directly:
The three blocking issues raised in the prior review round (undocumented removal of Blocking issuesNone. Non-blocking notes
REVIEW_RESULT: PASS ✅ |
|
Claude finished @aixaCode's task in 2m 15s —— View job Security ReviewThis PR modifies one workflow file:
Workflow review (Step W)
Untrusted-input handling in the modified lines
Correctness notes (non-blocking)1. The earlier review's "Blocking issues" are false positives. A prior automated review (2026-05-22T14:31:11Z) flagged removals of
Looks like that review compared against the wrong base — safe to disregard those three "blocking" items. 2. Allowlist duplication — 3. 4. Empty VerdictNet improvement.
|
|
🔒 Claude reviewed this PR — sensitive paths modified ( |
Summary
PRs have been showing a green
Build Gate (Windows + macOS)check without any build artifact being produced — most recently visible on #8858. Two bugs introduced in #8822 combine to cause this:concurrency.cancel-in-progressevaluatedtruefor almost everypull_requestevent (the expression was "cancel unless it's a non-override label change"). An incidental PR event — e.g. a transient draft toggle, an auto-labeler firing — would cancel the real in-flight Windows/macOS builds.prebuild.result != 'success', which is exactly what happens after the cancellation above. The skipped/cancelled prebuild produced "Gate not applicable → exit 0", and the PR went green on a commit nothing was ever built for.Repro on #8858
26285219799fires, Prebuild succeeds, Build matrix starts.pull_requestevent lands on the same SHA (the second Auto-Assign-Reviewers log on that run says "Skips ... since PR type is draft", so the PR briefly went back to draft).cancel-in-progressevaluatestrue→ cancels the in-flightBuild (windows64)andBuild (macos)of run 1.if:rejects the action), skips Build, and the gate posts ✅ via the "Gate not applicable" branch.Changes
concurrency.cancel-in-progressto only cancel for events that will actually produce a new build (push, workflow_dispatch, merge_group, or PR actionsopened/reopened/synchronize/ready_for_review, orlabeled/unlabeledforforce-build/clean-build/windows-only/macos-only).build-gatefail closed. Only the legitimate skip path (prebuild.result == 'success' && should_build != 'true', i.e. noExplorer/changes — already covered by Prebuild's per-target commit-status step) auto-passes. Any other prebuild outcome now fails with an actionable error pointing at re-trigger paths.Behavior change to flag
Draft PRs without a
force-build/clean-buildoverride will now show a red Build Gate instead of a green one. That's arguably more correct (drafts aren't built), but it's user-visible. If we'd rather hide the gate on those, we can gate it behind a job-levelif:mirroringprebuild's whitelist — happy to follow up.Test plan
windows-only/macos-onlylabels and confirm the gate correctly fails (only one target built) — unchanged behavior from feat: windows-only and macos-only ci flags #8822.Closes the regression introduced in #8822. cc @NickKhalow