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
🌱 Skip heavy CI jobs on refresh-only pull request heads #19276
Every hive App base refresh of a pull request ("Merge branch 'v5' into ...", authored by the App and signed by GitHub) is a new head, so every pull_request workflow reruns: about 16 workflows and 38 runner-minutes per refresh. 133 refreshes landed in 48 hours. The heaviest jobs on such a head are the Docker multi-arch build (about 8.7 minutes), FOSSA (about 6.8 minutes) and Mutation (about 3.2 minutes), and none of them can find anything new when the PR content did not change.
Proposal
Detect a refresh-only head inside the jobs (not with trigger paths: filters, so required contexts still attach to every head) and skip only the heavy jobs:
the new head is a GitHub-verified two-parent merge authored by the hive App, with the previous head as one parent and a base-branch commit (the merge-base) as the other, mirroring HeadIsBaseRefreshOf in src/pkg/github/pr_decision_base_refresh.go;
its three-dot diff against the base is identical, blob for blob, to the previous head's;
the same workflow already passed on the previous head (walking back through at most 5 earlier verified refreshes when the previous run was cancelled);
the base delta touches no go.mod/go.sum, other dependency manifest, Dockerfile, src/deploy/, workflow or action definition, or the detector itself.
When all hold: skip the docker.yml build jobs (the required gate still reports success), the FOSSA scan steps and the Mutation run, each with a skipped: refresh-only head step summary. build-and-test, test shards and coverage keep running. Any doubt or lookup failure runs everything.
Acceptance
Helper under .github/scripts/ (not src/scripts/, which is pinned by TRUSTED_SCRIPTS_TREE), with a fixture test wired into CI.
Activity
clubanderson commentedon Nov 19, 2026
Claiming: working on this now, PR to follow.
clubanderson commentedon Nov 19, 2026
PR: #19277
🌱 Docker skips refresh-only heads only for docs-only base deltas