Repository navigation
infra(ci): start the macOS/Windows Rust lanes with Fast Gate (#2985) - #2999
Merged
Merged
Conversation
…2985) RED: the four platform lanes still depend on rust-tests-linux, so test_platform_lanes_have_no_fast_gate_ancestor fails for each of them (8 failures in 5 tests). The pin records the measured cost (3.6 min of a 14.4 min platform critical path on merge-queue run 40993230941) and the run-level failure gate (ci/gate_jobs.py in CI Gate) that keeps a red Fast Gate out of a merge once the lanes no longer wait for it.
The four platform Rust lanes needed rust-tests-linux only to avoid
spending a macOS/Windows runner on a diff Fast Gate rejects. They consume
none of its output, and GitHub cannot express a per-event `needs`, so every
merge paid the gate's duration on its critical path: on merge-queue run
40993230941 the platform lanes started at 02:46:25 after a gate that ran
02:42:46-02:46:22, and Rust Tier 2 (macos-26) ended at 03:00:49 of a
03:01:05 run -- 3.6 min of a 14.4 min critical path that the gate owned.
Drop the gate from the needs of rust-tests-macos, rust-tests-windows,
rust-tier2-macos and rust-tier2-windows. This is the same decision
rust-linux-tier2-build already carries ("Compilation consumes no Fast Gate
output and can overlap its runner").
Merge protection does not move: a failed Fast Gate still fails the run,
because ci.yml's CI Gate lists every job of the run attempt
(ci/gate_jobs.py, #1793) and the caller's required check sees it. What
changes is only when the platform runners start. rust-cross-lint keeps its
gate: it runs on the gate's own Linux pool, so an early start saves no
wall time.
Trade recorded in the PR: on the 3 of the last 20 PR runs whose Fast Gate
failed, the platform lanes now run to completion on a red run instead of
not starting. Cancelling them would need actions: write, which this
workflow deliberately withholds.
Closed
12 tasks done
This was referenced Nov 17, 2026
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.
What
rust-tests-macos,rust-tests-windows,rust-tier2-macosandrust-tier2-windowsno longerneeds: rust-tests-linux, so they are created together with Fast Gate instead of after it.rust-cross-lintkeeps its gate (see below).RED
cf979c0e3(first commit of the branch) addsci/test_platform_lane_overlap.pyand fails on the unmodified workflow — 8 failures in 5 tests, one per lane and per assertion:ci/test_rust_scope.py::test_costly_lanes_wait_for_the_fast_gatepinned the old arrangement; it is renamedtest_costly_lanes_overlap_the_fast_gatein the GREEN commit and keeps asserting thatrust-cross-lintstill waits.GREEN
84567914drops the gate from the four lanes'needsand from theirif:(needs.rust-tests-linux.result != 'failure'would otherwise be a dangling reference).Why this is the trade the issue asks for
The lanes consume none of Fast Gate's output, and
needsis static in GitHub Actions, so "keep the gate onpull_request" cannot be expressed: the choice is every event or none. The issue's option (a) is the one that gets the wall time back, and the repo already carries the same decision for Tier 2 compilation (#966/ci/test_tier2_compile_overlap.py: "Compilation consumes no Fast Gate output and can overlap its runner").Measured, merge-queue run 40993230941 (a PR touching macOS and Windows code — the only lane shape this shortens):
The critical path was 14.4 min and 3.6 min of it was the gate's own duration. In runs where the gate replayed lane proofs it was 1.8–3.6 min; on a PR run in the same window (
#2593recorded 10.4–11.2 min) it is longer.Failure gating does not move
A red Fast Gate still fails the run:
ci.yml'sCI Gate ✅lists every job of the run attempt (ci/gate_jobs.py,#1793), so the required check goes red even though the platform lanes started early.test_a_failed_fast_gate_still_fails_the_runpins that wiring.The cost this moves: on a PR whose Fast Gate fails, the platform lanes now run to completion on an already-red run instead of never starting. In the last 40 PR runs, 3 of 20 sampled had a failed Fast Gate; those were the only ones where the wasted runner time appears. Cancelling the siblings on gate failure would need
actions: write, which this workflow deliberately withholds from every job.rust-cross-lintstays gated: it runs on the gate's ownubuntu-26.04pool, so starting it early saves no wall time and would only spend a runner on a rejected diff.Tests
cd ci && uv run --no-project python -m unittest discover -s . -p 'test_*.py'→ 2060 tests, 3 pre-existing failures unrelated to this branch (test_check_changes.OutputsTest,test_master_scope_base,test_flatpak_manifest_validator);test_check_changesfails identically on cleanorigin/masterwith the branch stashed, the other two are cwd-relative and pass from the repo root.test_platform_lane_overlap,test_rust_scope,test_tier2_compile_overlap,test_ci_job_timeouts,test_gate_jobs,test_merge_queue,test_ci_scope,test_ci_toml→ OK.ruff checkclean on both touched files.Acceptance left for the merge
The second acceptance criterion in the issue — "a queue run shows them starting with Fast Gate" — is only observable on a
merge_grouprun of this branch's result. The first queue run after this lands is that evidence; if it shows anything else, this PR's body is wrong and the change should be reverted rather than patched around.Refs #2985