Repository navigation
ci(drift): wire the test-layout gate's test and shrink the budget - #1936
Merged
Merged
Conversation
`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.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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/check_test_layout.pyis 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-levelcrates/<crate>/tests/*.rsfiles, unknown category dirs,[[test]]targets, andtest = falsetargets that still contain#[test].ci/gate_script_tests.tomlalready namedci/test_check_test_layout.pyas its covering test, soci.test_gate_script_coveragewas 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: addedci.test_check_test_layouttoDRIFT_UNITTEST_MODULES(the single source of truth, which also propagates toci/local_gate.py), removed it fromKNOWN_UNWIRED,MAX_UNWIRED4 -> 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 droveviolations(), whilemain()(the exit code the Crate Gate actually obeys) had none, so amain()returning 0 would let a stray test binary through with a green suite. Now:ok: <N> integration-test categorieson stdout, empty stderr;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)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 OKruff check ci/: All checks passed ·ci/check_python_complexity.py: clean ·ci/render_workflows.py --check: rc 0RED proofs (mutations)
FAILED (failures=1)KNOWN_UNWIREDdrop the now-wired module from KNOWN_UNWIREDand4 not less than or equal to 3main()forced to return 01 != 0(+ missing ok line)error:print dropped2 != 0🤖 Generated with Hermes