Repository navigation
ci(drift): wire the release wheel gate's test and shrink the budget - #1935
Merged
Merged
Conversation
ci/test_wheel_check.py guards ci/wheel_check.py -- the step release-auto.yml runs on every wheel before it uploads to PyPI (debug-info scan + the 10 GB project quota that stranded 2.5.x in #1756). Nothing executed the test, so the ledger's coverage claim was decorative. Wire it into DRIFT_UNITTEST_MODULES (which propagates to ci/local_gate.py) and the drift step, drop it from KNOWN_UNWIRED, MAX_UNWIRED 5 -> 4. Promoting it to a real gate exposed its weakest seam: every existing test drove a helper, and main() -- the exit code the release obeys -- had no test. A main() returning 0 would publish a debug-info wheel with a green suite. Added three: unstripped wheel -> rc 1 + ::error annotation, clean wheel -> rc 0 with no annotation, empty argv -> usage error (exit 2).
|
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.
What
ci/test_wheel_check.pyguardsci/wheel_check.py, the steprelease-auto.ymlruns on every wheel before it reaches PyPI. It asserts three release-blocking policies: no embedded debug info in any native binary (ELF/Mach-O/PE section tables, not filenames), a per-wheel size budget, and the 10 GB project quota whose exhaustion stranded a release in #1756.ci/gate_script_tests.tomlalready claimed that coverage, but nothing executed the module — it sat inKNOWN_UNWIRED. The ledger's claim was decorative.This wires it into
DRIFT_UNITTEST_MODULES(the single source of truth, soci/local_gate.pypicks it up too) plus the drift workflow step, drops it fromKNOWN_UNWIRED, and lowersMAX_UNWIRED5 → 4 so the shrink cannot regrow.Why the test needed work first
Promoting it to a real gate exposed its weakest seam: all 12 existing tests drove a helper (
debug_sections,check_wheels).main()— the exit code the release actually obeys — had no test. Amain()that returned0regardless would publish a debug-info wheel with the entire suite green.Three added (
MainTests, 12 → 15 tests):::error::annotation naming the memberSystemExit(2)— auditing nothing must not "pass"Real output
Ran 15 tests in 0.007s — OK(was 12)Ran 406 tests in 10.2s — OK(was 391)ruff check ci/local_suites.py ci/test_wheel_check.py→ All checks passedpython ci/check_python_complexity.py→ All checks passedpython ci/render_workflows.py --check→ rc 0ci.test_gate_script_coverage+ci.test_local_suites→ 16 / 7 tests OKRED, all four directions
a ci/test_*.py file that nothing runs is a decorative guard: … 'test_wheel_check'KNOWN_UNWIRED→ bothdrop the now-wired module from KNOWN_UNWIREDand5 not less than or equal to 4main() -> 0→test_unstripped_wheel_fails_the_run_with_an_annotation: 0 != 1Part of the decorative-guard burn-down: four entries remain (
test_check_test_layout,test_lint_entrypoint,test_run_dylint,test_select_boards), matching the newMAX_UNWIRED = 4.