Skip to content

ci(unit-test): run lint on push to dev/main to catch baseline rebase race - #828

Merged
vybe merged 1 commit into
devfrom
feature/802-lint-rebase-race
May 13, 2026
Merged

ci(unit-test): run lint on push to dev/main to catch baseline rebase race#828
vybe merged 1 commit into
devfrom
feature/802-lint-rebase-race

Conversation

@dolho

@dolho dolho commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

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 push trigger 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

  • Push trigger fires on next merge to dev — verify lint-sys-modules job runs and pytest (base/head, seed *) + regression diff jobs are skipped.
  • PR trigger unchanged — this PR's own CI runs the full matrix.
  • Concurrency key still keys off github.ref so PR run and push run on the merge commit don't cancel each other.

Related to #802

🤖 Generated with Claude Code

…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>
@dolho
dolho requested a review from vybe May 13, 2026 08:41

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@vybe
vybe merged commit 0c8226a into dev May 13, 2026
9 checks passed
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.

2 participants