Repository navigation
ci(drift): wire the dylint orchestration's test and empty the budget - #1940
Merged
Merged
Conversation
`ci/test_run_dylint.py` guards `ci/run_dylint.py` -- the two-step gate (`soldr dylint prepare` then `soldr dylint --all`) that the developer-facing `uv run --script lint` ends with and that CI's dylint lanes drive. No entry point executed the module, so it was the last decorative guard in `KNOWN_UNWIRED`. Wired into `DRIFT_UNITTEST_MODULES` (which propagates to `ci/local_gate.py`) and the drift step; dropped from `KNOWN_UNWIRED`, `MAX_UNWIRED` 1 -> 0. Promoting it exposed the same seam as #1934-#1938: the 3 existing tests covered the happy path, so the environment contract and the exit code were untested. Worst of all, a failed `soldr dylint prepare` raised `CalledProcessError` (`check=True`), so the process exited 1 with a traceback and the real code was lost. Now it reports its own code on stderr and stops before the lint. Added 8 tests (3 -> 11): failed prepare returns its code and never lints; a green run writes nothing to stderr; CARGO_HOME is derived from the home dir when unset and NOT overwritten when set; the CI-only `FBUILD_PLATFORM_BOUNDARY_OBSERVED` ledger and the pinned `RUSTUP_TOOLCHAIN` are dropped from both calls' env; every command runs from the repo root; activate() precedes the first subprocess.
|
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_run_dylint.pyguardsci/run_dylint.py— the two-step dylint gate (soldr dylint prepare, thensoldr dylint --all -- <scope> --all-targets) that the developer-facinguv run --script lintends with (RUST-033, #1793) and that CI's dylint lanes drive.ci/local_suites.py::KNOWN_UNWIREDlisted it as a decorative guard: the test existed and passed, but no entry point ever executed it, so the gate could rot silently.This is the last entry in that list.
DRIFT_UNITTEST_MODULES(which propagates toci/local_gate.pyby construction) and theci-workflow-drift.ymlstepKNOWN_UNWIRED,MAX_UNWIRED1 -> 0 — the list is now emptyWhy it needed more than a wiring line
Same seam as #1934–#1938, in its sharpest form: the 3 existing tests covered the all-green path only, so the environment contract and the exit code were untested. A failed
soldr dylint prepareran withcheck=True, so the process died with aCalledProcessErrortraceback — exit 1 no matter what the tool actually reported, and no reason on stderr.ci/run_dylint.pynow fails closed explicitly: the prepare's own return code is printed and returned, and the lint never runs against a toolchain that failed to fetch.8 tests added (3 -> 11):
CARGO_HOMEis derived from~/.cargowhen unset, and not overwritten when the caller set one (soldr's post-install self-check resolves against it)FBUILD_PLATFORM_BOUNDARY_OBSERVED(CI's observation ledger) is dropped in workspace mode too, not just package mode — locally Cargo fingerprints must stay reusableRUSTUP_TOOLCHAINis dropped in package mode as well (the pinned stable toolchain must not leak into the nightly dylint driver)activate()(which puts soldr on PATH) runs before the first subprocessVerification (real output)
python -m unittest ci.test_run_dylint— 11 tests OK (0.03 s)ci.test_local_suites+ci.test_gate_script_coverage— 23 tests OKci/gate_script_coverage.py --budget 0— rc 0ruff check ci/— all checks passed;ci/check_python_complexity.py— all checks passedci/render_workflows.py --check— rc 0RED eight ways: 5 mutations in
ci/run_dylint.pyeach kill exactly the tests that own them (no early return after a failed prepare; always overwriteCARGO_HOME; keep the observation ledger; keepRUSTUP_TOOLCHAIN; lint from the caller's cwd); registry token removed ->test_drift_workflow_step_matches_registrysequence mismatch; both tokens removed ->... is a decorative guard: register it in the drift workflow and ci/local_suites.py; re-allowlisted while wired -> stale entry and1 not less than or equal to 0.No workflow semantics changed (the drift step's module list only). No production behaviour changes outside the failed-prepare exit path.