Skip to content

ci(drift): wire the test-layout gate's test and shrink the budget - #1936

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

zackees merged 1 commit into
mainfrom
agent/wire-test-layout-guard

Conversation

@zackees

@zackees zackees commented Nov 6, 2026

Copy link
Copy Markdown
Member

Why

ci/check_test_layout.py is the Crate Gate step (.github/workflows/crate-gate.yml) that keeps the workspace at no more than 8 integration-test binaries (#1577) — it rejects top-level crates/<crate>/tests/*.rs files, unknown category dirs, [[test]] targets, and test = false targets that still contain #[test].

ci/gate_script_tests.toml already named ci/test_check_test_layout.py as its covering test, so ci.test_gate_script_coverage was green — but nothing executed it. The ledger's claim was decorative: the gate could regress and only the gate itself would notice.

What

  • ci/local_suites.py: added ci.test_check_test_layout to DRIFT_UNITTEST_MODULES (the single source of truth, which also propagates to ci/local_gate.py), removed it from KNOWN_UNWIRED, MAX_UNWIRED 4 -> 3.
  • .github/workflows/ci-workflow-drift.yml: appended the module to the drift unittest step so the hosted lane and the registry stay in sequence.
  • ci/test_check_test_layout.py: 8 -> 10 tests. Promoting the module exposed the seam from ci(drift): wire the CI-summary gate's own test and shrink the budget #1934/ci(drift): wire the release wheel gate's test and shrink the budget #1935 — every test drove violations(), while main() (the exit code the Crate Gate actually obeys) had none, so a main() returning 0 would let a stray test binary through with a green suite. Now:
    • clean tree -> rc 0, ok: <N> integration-test categories on stdout, empty stderr;
    • violations -> rc 1, one error: <problem> line per finding, empty stdout, count summary.

Verification (real output)

  • python -m unittest ci.test_check_test_layout: 10 tests OK (0.015 s)
  • full drift registry (DRIFT_UNITTEST_MODULES, 26 modules): 416 tests OK in 22.7 s, rc 0 (was 406)
  • ci.test_gate_script_coverage + ci.test_local_suites: 23 tests OK
  • ruff check ci/: All checks passed · ci/check_python_complexity.py: clean · ci/render_workflows.py --check: rc 0

RED proofs (mutations)

mutation result
registry token removed (workflow only) sequence mismatch, FAILED (failures=1)
both tokens removed decorative-guard test fires: "Items in the first set but not the second"
re-added to KNOWN_UNWIRED drop the now-wired module from KNOWN_UNWIRED and 4 not less than or equal to 3
main() forced to return 0 1 != 0 (+ missing ok line)
per-problem error: print dropped 2 != 0

🤖 Generated with Hermes

`ci/check_test_layout.py` is the Crate Gate step that keeps the workspace
at no more than 8 integration-test binaries (#1577). Its unit test existed
and `ci/gate_script_tests.toml` named it as the covering test, but nothing
executed it -- the ledger's claim was decorative, so a regression in the
stray-binary rule would have shipped green.

Wired into `DRIFT_UNITTEST_MODULES` (the single source of truth that
propagates to `ci/local_gate.py`) and the drift step, dropped from
`KNOWN_UNWIRED`, `MAX_UNWIRED` 4 -> 3.

Promoting it exposed the same seam as #1934/#1935: all 8 tests drove
`violations()`, while `main()` -- the exit code the Crate Gate obeys --
had no test, so a `main()` returning 0 would permit a stray test binary
with a green suite. Added two: clean tree -> rc 0 + the category count on
stdout and empty stderr; violations -> rc 1 with one `error: <problem>`
line per finding plus the count summary, empty stdout.
@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 4100fa0 Nov 6, 2026
31 checks passed
@zackees
zackees deleted the agent/wire-test-layout-guard branch November 6, 2026 18:16
@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