Repository navigation
ci: skip the jobs a diff cannot affect - #614
Merged
Merged
Conversation
Bookkeeping PRs (capability sync, baseline refresh) and their merges ran the full gate, mutation and annotation validation although they touch no file those checks read. changed-areas.sh classifies the diff (code / csharp) and each workflow skips what it cannot affect, decided from the files alone, never from the PR's author, title, branch or commit message. - PRs from this repository's own branches are format-blocked; only fork PRs keep --bypass-format, so format PRs after merge become rare. - format-master and capability-matrix-sync drop their commit-message skips, which let any change titled chore(...) skip formatting or sync.
Tr00d
force-pushed
the
ci/diff-based-skips
branch
from
October 30, 2026 13:10
e8b8029 to
a667a7c
Compare
Tr00d
marked this pull request as ready for review
October 30, 2026 13:18
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.
Why
Almost half of master's recent commits are bookkeeping:
refresh sdk-compliance,refresh baseline, release and format. Each one ran the full gate with E2E, plus mutation and annotation validation, once on its PR and again after merge. None of those checks reads the files these PRs touch.What changes
scripts/quality-gate/changed-areas.sh <base-sha>classifies the diff:codesdk-compliance.yaml,CHANGELOG.md,packages/*/.gate-baseline.jsonbuild-and-test)csharp.csfileEach workflow has a small
changesjob, and the heavy jobs depend on it throughif:. A skipped job reports as passing.The skip is decided by the files, not the PR. Titles, branch names, commit messages and the PR's author are all chosen by whoever opens or merges the PR, so none of them decides a skip. A diff that only touches
sdk-compliance.yamlcannot break the build, whoever wrote it.An unknown range runs everything. That covers an empty diff, a base the runner can't find, and a manual dispatch.
Fewer format PRs. Only PRs from forks pass
--bypass-formatnow (head.repo.full_name != github.repository). PRs from this repo's own branches (maintainers, agents, release-please, bots) must pass the format check before merge, soformat-masterrarely has anything to commit.Commit-message skips are gone. They let any change titled that way skip formatting or the sync:
format-masterchore(format)orchore(quality-gate).csfile changedcapability-matrix-syncchore(.csfile changedcapability-matrix-syncalso gainsworkflow_dispatch, so a change to the canonical spec insupabase/sdk, which never pushes here, can be picked up.Effect per PR type
changesonly; merge: nothing heavyCHANGELOG, manifest,*.csproj).csprojchange can break the build, andrelease.ymlwaits onbuild-and-testbefore publishingPublicAPI.*.txt)Known edge
On master, runs of the same workflow still cancel each other, as before. Suppose a bookkeeping push lands right after a code push and cancels the code push's master run. That code push then gets no post-merge gate run or capability sync until the next code merge.
That's acceptable:
Verification
scripts/quality-gate/fixtures-changed-areas/run.sh: 15/15 cases. Each one commits files into a throwaway repository and checks the classification, covering every rule plus an empty, all-zero or unknown base.actionlintisn't available locally.The baseline-loosening check and the coverage-ratchet fix moved to #615. Neither PR depends on the other.