ci(unit-test): run lint on push to dev/main to catch baseline rebase race - #828
Merged
Conversation
…race Issue #802: baseline-style lint (sys.modules pollution check) only ran on pull_request, so two PRs disjointly touching baseline + new test file could both pass pre-merge CI yet leave dev red post-merge. Concrete case: #791 landed the lint baseline 4h after CI green; meanwhile #783 merged a new test file with 3 baselined-elsewhere violations. No re-run on either side caught the resulting state — the next PR off dev (#606) inherited a red CI. Adds a push trigger on dev/main so lint-sys-modules fires post-merge. Per-PR diff jobs (test, diff) are gated to pull_request only since base/head don't exist on a push. Related to #802 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vybe
approved these changes
May 13, 2026
vybe
left a comment
Contributor
There was a problem hiding this comment.
Clean CI-only fix. Push trigger on dev/main gives the post-merge alarm that the PR trigger can't catch. Gating test/diff jobs to pull_request only is correct — no base/head on a push.
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.
Summary
push: branches: [dev, main]trigger tobackend-unit-test.ymlso thelint-sys-modulesbaseline check fires post-merge, catching the rebase race documented in bug(tests): lint baseline rebase race — #791 CI passed against pre-#783 dev, post-merge dev broken #802.test,diff) topull_requestonly — they have no base/head to compare on a push.Why
lint-sys-modules(added in #791) is a baseline-style invariant: a passing run only proves the PR is consistent with its base at CI-run time, not with the actual post-merge state. Two PRs touching disjoint paths can each pass their pre-merge CI, then leave dev red after the second merges. #791 + #783 hit this exact case 2026-05-11; #606 inherited the red CI as a side effect.Adding a
pushtrigger is option (B) from the issue — gives a fast post-merge alarm. Option (A) (branch-protection "require up-to-date before merging") is intentionally out of scope here; it's an admin repo setting and a separate decision.Test plan
lint-sys-modulesjob runs andpytest (base/head, seed *)+regression diffjobs are skipped.github.refso PR run and push run on the merge commit don't cancel each other.Related to #802
🤖 Generated with Claude Code