Skip to content

ci(drift): wire the CI-summary gate's own test and shrink the budget - #1934

Merged
zackees merged 1 commit into
mainfrom
agent/wire-gate-jobs-guard
Nov 6, 2026
Merged

zackees merged 1 commit into
mainfrom
agent/wire-gate-jobs-guard

Conversation

@zackees

@zackees zackees commented Nov 6, 2026

Copy link
Copy Markdown
Member

Why

ci/test_gate_jobs.py guards ci/gate_jobs.py — the aggregator behind the
required CI summary check, which is what decides whether a PR with any
failed (or silently cancelled) job can merge here. ci/gate_script_tests.toml
already 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.py both
come from ci/local_suites.py, which did not name it — the claim was
decorative, exactly the class #1933 just pinned a budget for.

What changed

  • Wire ci.test_gate_jobs into DRIFT_UNITTEST_MODULES (so it reaches both
    the drift workflow step and ci/local_gate.py) and into the workflow step.
  • Drop it from KNOWN_UNWIRED; MAX_UNWIRED 6 → 5. The list keeps shrinking
    and 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 actually
runs, whose exit code blocks the merge — had no test at all. Three added:

  • a finished failing job returns 1 and annotates the offending job;
  • an all-green run returns 0 and prints no ::error::;
  • an unreadable job list fails closed (JobListError → 1), because
    "could not look" must never read as "nothing is wrong".

Real output

uv run --with pyyaml --no-project python -m unittest ci.test_gate_jobs -v
Ran 11 tests ... OK            (was 8; 0.005 s, stdlib only)

<drift step registry, verbatim from ci-workflow-drift.yml — now 24 modules>
Ran 391 tests in 13.804s       rc=0   (was 380 before this PR)

ruff check ci/local_suites.py ci/test_gate_jobs.py   -> All checks passed!
python ci/check_python_complexity.py                 -> All checks passed!
python ci/render_workflows.py --check                -> rc 0
check_workflow_concurrency + ci.test_workflow_concurrency -> OK

RED in every direction, each mutation applied to the committed tree and
reverted:

mutation result
registry entry removed (workflow token kept) a ci/test_*.py file that nothing runs is a decorative guard
drift step token removed (registry kept) test_drift_workflow_step_matches_registry sequence mismatch
test_gate_jobs put back into KNOWN_UNWIRED 2 failures: drop the now-wired module and 6 not less than or equal to 5
main() returns 0 unconditionally test_failing_job_fails_the_gate_and_names_it

No behaviour change to the gate itself — this is coverage plus the budget.

`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".
@coderabbitai

coderabbitai Bot commented Nov 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@zackees
zackees added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 56c49ce Nov 6, 2026
31 checks passed
@zackees
zackees deleted the agent/wire-gate-jobs-guard branch November 6, 2026 15:08
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant