Skip to content

ci(drift): wire the dylint orchestration's test and empty the budget - #1940

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

zackees merged 1 commit into
mainfrom
agent/wire-run-dylint-guard

Conversation

@zackees

@zackees zackees commented Nov 6, 2026

Copy link
Copy Markdown
Member

What

ci/test_run_dylint.py guards ci/run_dylint.py — the two-step dylint gate (soldr dylint prepare, then soldr dylint --all -- <scope> --all-targets) that the developer-facing uv run --script lint ends with (RUST-033, #1793) and that CI's dylint lanes drive. ci/local_suites.py::KNOWN_UNWIRED listed 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.

  • wired into DRIFT_UNITTEST_MODULES (which propagates to ci/local_gate.py by construction) and the ci-workflow-drift.yml step
  • dropped from KNOWN_UNWIRED, MAX_UNWIRED 1 -> 0 — the list is now empty

Why 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 prepare ran with check=True, so the process died with a CalledProcessError traceback — exit 1 no matter what the tool actually reported, and no reason on stderr.

ci/run_dylint.py now 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):

  • failed prepare returns its code (3, not 1), prints the reason, and issues no lint command
  • a green run writes nothing to stderr
  • CARGO_HOME is derived from ~/.cargo when 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 reusable
  • RUSTUP_TOOLCHAIN is dropped in package mode as well (the pinned stable toolchain must not leak into the nightly dylint driver)
  • both commands run from the repo root
  • activate() (which puts soldr on PATH) runs before the first subprocess

Verification (real output)

  • python -m unittest ci.test_run_dylint — 11 tests OK (0.03 s)
  • whole drift registry, 29 modules — 457 tests OK in 25.5 s, rc 0 (was 446 / 28)
  • ci.test_local_suites + ci.test_gate_script_coverage — 23 tests OK
  • ci/gate_script_coverage.py --budget 0 — rc 0
  • ruff check ci/ — all checks passed; ci/check_python_complexity.py — all checks passed
  • ci/render_workflows.py --check — rc 0

RED eight ways: 5 mutations in ci/run_dylint.py each kill exactly the tests that own them (no early return after a failed prepare; always overwrite CARGO_HOME; keep the observation ledger; keep RUSTUP_TOOLCHAIN; lint from the caller's cwd); registry token removed -> test_drift_workflow_step_matches_registry sequence 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 and 1 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.

`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.
@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 0dc0eea Nov 6, 2026
31 checks passed
@zackees
zackees deleted the agent/wire-run-dylint-guard branch November 6, 2026 23:12
@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