Skip to content

ci(drift): wire the lint entry point's test and shrink the budget - #1937

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

zackees merged 1 commit into
mainfrom
agent/wire-lint-entrypoint-guard

Conversation

@zackees

@zackees zackees commented Nov 6, 2026

Copy link
Copy Markdown
Member

What

Wires ci/test_lint_entrypoint.py into the hosted drift registry and lowers the decorative-guard budget.

ci/test_lint_entrypoint.py guards the root lint script — the developer-facing uv run --script lint entry point that runs rustfmt --check, soldr cargo clippy --workspace --all-targets -- -D warnings and then python -m ci.run_dylint (the mandatory local Clippy + Dylint rule of RUST-033, #1793). Nothing executed the test: it was one of the three entries left in KNOWN_UNWIRED, so a lint that silently stopped running Dylint, or that returned 0 after a red Clippy, would keep passing review.

  • ci/local_suites.py: added ci.test_lint_entrypoint to DRIFT_UNITTEST_MODULES (the single source of truth for both the drift workflow and ci/local_gate.py), dropped it from KNOWN_UNWIRED, MAX_UNWIRED 3 -> 2.
  • .github/workflows/ci-workflow-drift.yml: added the module token to the drift unit-test step (the guard compares the registry and the workflow sequence).

Guard hardening (the main() seam again)

The three existing tests only asserted the all-green path, so the exit code — the only thing that makes uv run lint fail — was untested. Added five:

test property
test_policy_precheck_failure_blocks_every_rust_step a failing check_rust_toolchain_pins.py / enforce_platform_boundary.py stops the run before any Rust tool
test_format_failure_skips_clippy_and_dylint fmt --check failure returns 1 and runs neither
test_clippy_failure_skips_dylint_and_is_propagated Clippy's rc is returned and Dylint is not run
test_dylint_failure_is_propagated Dylint's rc is returned
test_missing_file_fails_before_running_anything a nonexistent .rs argument returns 1 with zero subprocesses

Real output

uv run --no-project python -m unittest ci.test_lint_entrypoint
Ran 8 tests  ... OK                       (was 3)

whole drift registry (27 modules)
Ran 424 tests in 15.645s ... OK           (was 416)

ci.test_local_suites + ci.test_gate_script_coverage
Ran 23 tests ... OK

ruff check                      All checks passed!
ci/check_python_complexity.py   All checks passed!
ci/render_workflows.py --check  rc 0

RED proofs (each mutation kills exactly its own test, lint restored from a copy — never git checkout):

  • return rc if rc else run_dylint() -> return run_dylint(): test_clippy_failure_skips_dylint_and_is_propagated fails.
  • precheck return rc -> continue: test_policy_precheck_failure_blocks_every_rust_step fails.
  • drop the File not found return 1: test_missing_file_fails_before_running_anything fails.
  • workflow token removed: test_drift_workflow_step_matches_registry (sequence mismatch).
  • both tokens removed: test_every_ci_test_module_is_executed_somewhere ("a ci/test_*.py file that nothing runs is a decorative guard").
  • re-allowlisted in KNOWN_UNWIRED: both stale-entry and 3 not less than or equal to 2.

After this PR, KNOWN_UNWIRED is test_run_dylint and test_select_boards. No production code touched; ~/dev/fbuild untouched.

`ci/test_lint_entrypoint.py` guards the root `lint` script -- the
developer-facing `uv run --script lint` entry point that runs rustfmt,
Clippy and the pinned custom Dylints (the RUST-033 rule, #1793) -- while
nothing executed it, so the contract could drift silently: a `lint` that
stopped running Dylint, or that returned 0 after a red Clippy, would ship
green.

Wire it into `DRIFT_UNITTEST_MODULES` (which propagates to
`ci/local_gate.py`) and the drift step, drop it from `KNOWN_UNWIRED`, and
lower `MAX_UNWIRED` 3 -> 2.

Promoting it exposed the same seam as #1934/#1935/#1936: the three
existing tests only asserted the all-green path, so the exit code was
effectively unguarded. Add five: a failing policy precheck stops the run
before any Rust step, a formatting failure skips Clippy and Dylint, a
Clippy failure is propagated and skips Dylint, a Dylint failure is
propagated, and a missing file fails before running anything.
@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 2b3e15f Nov 6, 2026
31 checks passed
@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