Repository navigation
ci(drift): wire the CI-summary gate's own test and shrink the budget - #1934
Merged
Merged
Conversation
`ci/test_gate_jobs.py` guards `ci/gate_jobs.py`, the aggregator behind the required `CI summary` check, and `ci/gate_script_tests.toml` already lists it as that script's covering test. Nothing executed it: the drift step's module list and `ci/local_gate.py` both come from `ci/local_suites.py`, which did not name it, so the registry's coverage claim was decorative. Register it in `DRIFT_UNITTEST_MODULES` (propagating to the drift step and the local gate) and drop it from `KNOWN_UNWIRED`, lowering `MAX_UNWIRED` 6 -> 5. Promoting the module to a real gate also exposes its weakest seam: every existing test drives a helper and `main()` -- the function GitHub calls, whose exit code decides whether a merge is blocked -- had no test at all. Cover the three outcomes: a finished failing job returns 1 and annotates that job, an all-green run returns 0 with no annotation, and an unreadable job list fails closed instead of reading as "nothing is wrong".
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 6, 2026
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
ci/test_gate_jobs.pyguardsci/gate_jobs.py— the aggregator behind therequired
CI summarycheck, which is what decides whether a PR with anyfailed (or silently
cancelled) job can merge here.ci/gate_script_tests.tomlalready lists it as that script's covering test, so the coverage ledger claimed
it was covered.
Nothing executed it. The drift step's module list and
ci/local_gate.pybothcome from
ci/local_suites.py, which did not name it — the claim wasdecorative, exactly the class #1933 just pinned a budget for.
What changed
ci.test_gate_jobsintoDRIFT_UNITTEST_MODULES(so it reaches boththe drift workflow step and
ci/local_gate.py) and into the workflow step.KNOWN_UNWIRED;MAX_UNWIRED6 → 5. The list keeps shrinkingand the budget keeps it honest.
Promoting the module to a load-bearing gate exposed its weakest seam: every
existing test drives a helper, and
main()— the function GitHub actuallyruns, whose exit code blocks the merge — had no test at all. Three added:
::error::;JobListError→ 1), because"could not look" must never read as "nothing is wrong".
Real output
RED in every direction, each mutation applied to the committed tree and
reverted:
a ci/test_*.py file that nothing runs is a decorative guardtest_drift_workflow_step_matches_registrysequence mismatchtest_gate_jobsput back intoKNOWN_UNWIREDdrop the now-wired moduleand6 not less than or equal to 5main()returns 0 unconditionallytest_failing_job_fails_the_gate_and_names_itNo behaviour change to the gate itself — this is coverage plus the budget.