Skip to content

ci(pr-fast): run heavy jobs only in the merge queue, not on every PR - #480

Merged
githubrobbi merged 1 commit into
mainfrom
ci/pr-fast-heavy-jobs-merge-group-only
Jun 26, 2026
Merged

ci(pr-fast): run heavy jobs only in the merge queue, not on every PR#480
githubrobbi merged 1 commit into
mainfrom
ci/pr-fast-heavy-jobs-merge-group-only

Conversation

@githubrobbi

@githubrobbi githubrobbi commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Why

With the merge queue live, the heavy pr-fast.yml jobs (sanity, clippy ×2, rustdoc, test-build, tests, security, windows-lint) ran the full Rust suite twice per PR: once on pull_request (branch in isolation) and again on merge_group (against current main). The pull_request pass is redundant — the queue revalidates against main before merging, and the contributor's local lint-pre-push gate already ran the same suite before the push.

What

Gate the 8 heavy jobs with && github.event_name != 'pull_request' so they run only on merge_group (queue) and push (main). Cheap checks (fmt / file-size / drift / classify) stay on pull_request for fast author feedback.

The required aggregator already treats skipped as a pass (case "$r" in success|skipped) ✅), so on a PR the heavy jobs skip → required is green → the PR enters the queue; on merge_group they run for real and gate the merge.

Effect: Rust-PR CI runs the heavy suite once instead of twice — no loss of safety (the queue is the authoritative validation against current main).

This PR is workflow-only (no code change), so its own heavy jobs skip on both events regardless; the dedup is observable on the next Rust PR.

The heavy jobs (sanity / clippy{,-no-default} / rustdoc / test-build /
tests / security / windows-lint) ran on BOTH `pull_request` and
`merge_group` — i.e. the full Rust suite executed twice per PR: once on
the branch in isolation, then again in the queue against current main.

Gate them with `&& github.event_name != 'pull_request'` so they run only
on `merge_group` (the queue) and `push` (main). The queue already
revalidates every PR against current main before merging, and the
contributor's local `lint-pre-push` gate runs the same suite before the
push — so the `pull_request` pass is a redundant third run. This halves
Rust-PR CI without losing safety.

The `required` aggregator already treats `skipped` as a pass, so a PR
goes green (heavy jobs skipped) and can enter the queue; on `merge_group`
the jobs run for real and gate the merge. Cheap checks (fmt / file-size /
drift / classify) stay on `pull_request` for fast author feedback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@githubrobbi
githubrobbi enabled auto-merge June 26, 2026 16:17
@githubrobbi
githubrobbi added this pull request to the merge queue Jun 26, 2026
Merged via the queue into main with commit 1556c29 Jun 26, 2026
20 checks passed
@githubrobbi
githubrobbi deleted the ci/pr-fast-heavy-jobs-merge-group-only branch June 26, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant