ci: only re-run gated matrices on ready-for-ci label transitions#509
Conversation
199fccc to
36c170b
Compare
|
🔁 AI review rerun (requested by @igerber) Head SHA: Overall Assessment The workflow-guard re-review items look resolved, but this PR introduces one unmitigated P1 on the Executive Summary
Methodology
Code Quality No findings. Performance No findings. Maintainability No findings. The previous workflow-test maintainability concerns appear addressed by the explicit guarded-workflow path coverage and the top-level job allowlist / hard existence assertions. tests/test_openai_review.py:L2082 tests/test_openai_review.py:L2126 tests/test_openai_review.py:L2284 Tech Debt No separate finding beyond the P1 methodology issue above; the Security No findings. Documentation/Tests No separate findings beyond the P1 methodology/documentation issue above. The earlier workflow-test P3s are resolved in this revision. tests/test_openai_review.py:L2274 .github/workflows/rust-test.yml:L32 Path to Approval
|
The rust-test, notebooks, and docs-tests workflows are gated on the ready-for-ci label and list labeled/unlabeled in their pull_request trigger types. Their job guards only checked that ready-for-ci was PRESENT, so churning any unrelated label (e.g. adding `bug`) on a PR that already carried ready-for-ci re-fired the entire matrix — including the multi-hour pure-Python fallback. Refine the 7 job guards across the three matrices so a labeled/unlabeled event only (re)runs when the triggering label is ready-for-ci; code pushes and the initial ready-for-ci add are unaffected. ci-gate.yml (the cheap one-step required check) is intentionally left to re-evaluate on every label event so the gate still flips red/green on add/remove. Lock the behavior with TestCiWorkflowLabelEventGuard in tests/test_openai_review.py and drop the resolved TODO row. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36c170b to
e6bd4de
Compare

Summary
rust-test.yml,notebooks.yml,docs-tests.yml) listlabeled/unlabeledin theirpull_requesttrigger and gate jobs on theready-for-cilabel. Their guards only checked the label was present, so churning any unrelated label (e.g. addingbug) on a PR that already carriedready-for-cire-fired the entire matrix — including the multi-hour pure-Python fallback. The refined guard skips alabeled/unlabeledevent unless the triggering label isready-for-ci; code pushes and the initialready-for-ciadd are unaffected.ci-gate.ymldeliberately untouched. It is the cheap one-step required check and must keep re-evaluating on every label event to flip the gate red/green whenready-for-ciis added/removed.TestCiWorkflowLabelEventGuardparses each guarded workflow and exact-matches the per-jobif:guard, locksci-gate.yml's presence-based contract (parsed triggertypes+ named-stepif:), and asserts the matrices keeplabeled/unlabeledin their trigger types.TestRustTestWorkflowPathFilteris extended so the guarded workflows stay under the suite's path filters (a workflow-only edit still runs the locks).Methodology references (required if estimator / math changes)
diff_diff/,rust/src/, ordocs/methodology/files touched)Validation
tests/test_openai_review.py(TestCiWorkflowLabelEventGuard; extendedTestRustTestWorkflowPathFilter). Full file passes (243 tests). Edited workflows validated to parse and fold to the intendedif:expression.Security / privacy
🤖 Generated with Claude Code