You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(ci): start the macOS/Windows Rust lanes with Fast Gate in the merge queue (~10 min per merge) #2985
rust-tests-macos, rust-tests-windows, rust-tier2-macos, rust-tier2-windows and rust-cross-lint all needs: rust-tests-linux (Fast Gate) in .github/workflows/build-project.yaml, so they are created only when Fast Gate ends. Measured on #2514 (#2593 timeline comment): Fast Gate ends at 10.4–11.2 min, the macOS/Windows lanes then run 7.1–14.9 min, run length ~26 min. Started together the run would take ~15 min (the longest lane): ~10 min per run, ~20 min per clean merge (PR + queue).
Why it is serial today
The needs gate saves macOS/Windows runner time when Fast Gate fails (needs.rust-tests-linux.result != 'failure'). Starting them in parallel spends those runners on a PR that Fast Gate will reject.
Proposal
Drop rust-tests-linux from the needs of the macOS/Windows Rust lanes in merge_group runs (and on master pushes), where Fast Gate already passed on the PR and failures are rare, so the parallel start almost never wastes a runner. Keep the gate on pull_request, where Fast Gate failures are common. If the queue is the bottleneck (it is serial), this takes ~10 min off every merge at near-zero extra compute.
Acceptance: a ci/ test pins that the macOS/Windows lanes do not wait on Fast Gate in merge-group runs; a queue run shows them starting with Fast Gate.
Implementation note: needs is static in GitHub Actions, so it can't differ by event. Options: (a) drop the needs for every event and have Fast Gate cancel the run on failure (gh run cancel step on failure()), which caps wasted runner time at the time Fast Gate takes to fail; (b) keep needs, and in merge_group runs let Fast Gate replay its PR verdict (local-gate stamp / verdict cache) so it finishes in seconds. (b) keeps the compute saving everywhere; (a) is simpler. Worker's choice; (b) preferred if the verdict replay already covers Fast Gate.
Triage: meets Ready. Measured problem (Fast Gate 10.4–11.2 min before macOS/Windows lanes start), acceptance criteria stated (a ci/ test pins the merge-group start; a queue run shows it), no blocking dependency, and the (a)/(b) choice is explicitly left to the worker with (b) preferred. P2 (saves ~10 min per merge on the serial queue), size:M.
Claiming: #2985 — start the macOS/Windows Rust lanes with Fast Gate in the merge queue.
Plan (one PR, option (b) unless the verdict replay turns out not to exist on master):
Find out what Fast Gate actually costs in a merge-group run and whether a PR-head verdict is already recorded: read ci/local_gate.py, ci-attestations.yml and the rust-tests-linux job's steps for the attestation/stamp path, then check one merge-group run's job timings.
If the stamp already lets the gate short-circuit, make rust-tests-linux do that replay in merge_group (and master pushes) instead of re-running the lane, so the four platform jobs it gates start seconds in rather than ~10 min in.
RED first: a ci/ test pinning that in merge_group the macOS/Windows lanes are not made to wait on a full Fast Gate, and that the PR path still does. Then the workflow change.
Evidence in the PR: a merge-group run's job table showing the platform lanes starting with Fast Gate, plus the PR path unchanged.
PR: #2999 (RED cf979c0e3, GREEN 84567914, Refs #2985).
What changed: rust-tests-macos, rust-tests-windows, rust-tier2-macos and rust-tier2-windows no longer needs: rust-tests-linux; they start with Fast Gate. rust-cross-lint keeps its gate (same Linux pool, no wall-time gain).
Measured cost removed: merge-queue run 40993230941 started the platform lanes 3.6 min into a 14.4 min critical path, all of it the gate's own duration.
Failure gating does not move — CI Gate lists every job of the run attempt (ci/gate_jobs.py), so a red Fast Gate still fails the required check. The trade, stated in the PR body: on a PR whose gate fails the platform lanes now run to completion on an already-red run (3 of the last 20 sampled PR runs), because cancelling them would need actions: write.
The queue-run half of the acceptance criteria is only observable after this lands; the first merge_group run is the evidence.
Landed: #2999 merged as 5543dd9c4 (queue run 41007878029 green, CI Gate ✅).
On master now: the four platform lanes are needs: [check-event, ci-mode] and no longer read needs.rust-tests-linux; rust-cross-lint still waits. Pinned by ci/test_platform_lane_overlap.py and the renamed ci/test_rust_scope.py::test_costly_lanes_overlap_the_fast_gate.
What is still unproven, and why this issue stays open: the second acceptance criterion — "a queue run shows them starting with Fast Gate" — cannot be shown by this PR's own runs, because a ci/-only diff skips the macOS/Windows lanes (ci_scope.py). It needs the next merge-queue run whose PR touches macOS or Windows code; that run's job table is the evidence. If those lanes still wait for Fast Gate, revert this change rather than patching around it.
Cost side, for the record: on a PR whose Fast Gate fails, the platform lanes now run to completion on an already-red run (3 of the last 20 sampled PR runs). Cancel-on-failure would need actions: write.
Evidence: .github/workflows/build-project.yaml:2125, :2263, :2916, and :3067 give the four macOS/Windows Rust and Tier 2 lanes needs: [check-event, ci-mode], with no rust-tests-linux dependency. The regression test ci/test_platform_lane_overlap.py:64-76 enforces that none has Fast Gate as an ancestor and passed locally: uv run --no-project ci/test_platform_lane_overlap.py (5 tests, OK). The related scope test also passed: uv run --no-project ci/test_rust_scope.py (10 tests, OK).
This was implemented and merged by #2999 (5543dd9c4), so no new change or PR is needed.
Activity
zackees commentedon Oct 30, 2026
Implementation note:
needsis static in GitHub Actions, so it can't differ by event. Options: (a) drop theneedsfor every event and have Fast Gate cancel the run on failure (gh run cancelstep onfailure()), which caps wasted runner time at the time Fast Gate takes to fail; (b) keepneeds, and in merge_group runs let Fast Gate replay its PR verdict (local-gate stamp / verdict cache) so it finishes in seconds. (b) keeps the compute saving everywhere; (a) is simpler. Worker's choice; (b) preferred if the verdict replay already covers Fast Gate.zackees commentedon Oct 30, 2026
/ready
Triage: meets Ready. Measured problem (Fast Gate 10.4–11.2 min before macOS/Windows lanes start), acceptance criteria stated (a
ci/test pins the merge-group start; a queue run shows it), no blocking dependency, and the (a)/(b) choice is explicitly left to the worker with (b) preferred. P2 (saves ~10 min per merge on the serial queue), size:M.zackees commentedon Oct 30, 2026
Claiming: #2985 — start the macOS/Windows Rust lanes with Fast Gate in the merge queue.
Plan (one PR, option (b) unless the verdict replay turns out not to exist on master):
ci/local_gate.py,ci-attestations.ymland therust-tests-linuxjob's steps for the attestation/stamp path, then check one merge-group run's job timings.rust-tests-linuxdo that replay inmerge_group(and master pushes) instead of re-running the lane, so the four platform jobs it gates start seconds in rather than ~10 min in.ci/test pinning that inmerge_groupthe macOS/Windows lanes are not made to wait on a full Fast Gate, and that the PR path still does. Then the workflow change.zackees commentedon Oct 30, 2026
PR: #2999 (RED
cf979c0e3, GREEN84567914,Refs #2985).What changed:
rust-tests-macos,rust-tests-windows,rust-tier2-macosandrust-tier2-windowsno longerneeds: rust-tests-linux; they start with Fast Gate.rust-cross-lintkeeps its gate (same Linux pool, no wall-time gain).Measured cost removed: merge-queue run 40993230941 started the platform lanes 3.6 min into a 14.4 min critical path, all of it the gate's own duration.
Failure gating does not move — CI Gate lists every job of the run attempt (
ci/gate_jobs.py), so a red Fast Gate still fails the required check. The trade, stated in the PR body: on a PR whose gate fails the platform lanes now run to completion on an already-red run (3 of the last 20 sampled PR runs), because cancelling them would needactions: write.The queue-run half of the acceptance criteria is only observable after this lands; the first
merge_grouprun is the evidence.zackees commentedon Oct 30, 2026
Landed: #2999 merged as
5543dd9c4(queue run 41007878029 green, CI Gate ✅).On master now: the four platform lanes are
needs: [check-event, ci-mode]and no longer readneeds.rust-tests-linux;rust-cross-lintstill waits. Pinned byci/test_platform_lane_overlap.pyand the renamedci/test_rust_scope.py::test_costly_lanes_overlap_the_fast_gate.What is still unproven, and why this issue stays open: the second acceptance criterion — "a queue run shows them starting with Fast Gate" — cannot be shown by this PR's own runs, because a
ci/-only diff skips the macOS/Windows lanes (ci_scope.py). It needs the next merge-queue run whose PR touches macOS or Windows code; that run's job table is the evidence. If those lanes still wait for Fast Gate, revert this change rather than patching around it.Cost side, for the record: on a PR whose Fast Gate fails, the platform lanes now run to completion on an already-red run (3 of the last 20 sampled PR runs). Cancel-on-failure would need
actions: write.zackees commentedon Oct 30, 2026
Verified fixed on current master (ddbece4).
Evidence:
.github/workflows/build-project.yaml:2125,:2263,:2916, and:3067give the four macOS/Windows Rust and Tier 2 lanesneeds: [check-event, ci-mode], with norust-tests-linuxdependency. The regression testci/test_platform_lane_overlap.py:64-76enforces that none has Fast Gate as an ancestor and passed locally:uv run --no-project ci/test_platform_lane_overlap.py(5 tests, OK). The related scope test also passed:uv run --no-project ci/test_rust_scope.py(10 tests, OK).This was implemented and merged by #2999 (
5543dd9c4), so no new change or PR is needed.infra(ci): start the macOS/Windows Rust lanes with Fast Gate (obs-rus…