Repository navigation
ci: lint the crates the test deny-list was quietly excluding from compilation - #2243
Merged
Merged
Conversation
…pilation #2058 established that a *runtime* reason has no force over clippy, which only ever checks -- it never links and never runs a test binary -- and restored lint coverage to 21 tested crates that had lost it for a reason that did not apply. That argument was never extended to the denied crates themselves. `lint` stayed `packages - DENYLIST`, and every DENYLIST reason is a runtime reason, so four workspace members ended up linted by nothing at all: onnx-genai-bench onnx-genai-ort-sys onnx-genai-python onnx-runtime-python The gap is not theoretical. #2132 left `onnx-runtime-python` uncompilable on every platform for 22 commits (66ca26a..881c316, ~7.5h) until #2173 fixed it. The only job that builds that crate is `CUDA compile`, which is not a required check: it went red on the breaking merge and did not block it. The signal existed and was discarded. Derive `lint` from a new LINT_EXEMPT set instead, whose entries must name a reason clippy itself cannot get past, and widen the lint-coverage guard's domain from `tested - linted` to `(packages - LINT_EXEMPT) - linted`. The old domain could not name a denied crate by construction, so the guard whose job is to notice unlinted crates was structurally unable to see these four. Lane goes 55 -> 58 packages. onnx-genai-ort-sys costs nothing new: six of its dependents are already in the lane, so its build script already runs there. onnx-runtime-ep-cuda stays exempt because its build script needs a CUDA toolchain the quality runner does not install -- it passed locally only because this box has nvcc, which is not evidence about the runner. onnx-genai-bench stays exempt on explicitly temporary grounds (#2242). Fixes the one clippy error this exposed in onnx-runtime-python: a cfg-conditional vec_init_then_push, rewritten as two mutually exclusive bindings with identical semantics. Two self-test arms, one of which is the discriminator: --simulate-unlinted on a DENYLIST crate returned 0 and named nobody under the old domain, so it fails against the previous code and passes against this one. The second pins the exempt direction so the widened domain cannot grow to include crates the runner cannot build. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
justinchuby
enabled auto-merge (squash)
August 26, 2026 23:29
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2243 +/- ##
==========================================
- Coverage 80.64% 80.64% -0.01%
==========================================
Files 432 432
Lines 220114 220114
Branches 220114 220114
==========================================
- Hits 177512 177503 -9
- Misses 36717 36725 +8
- Partials 5885 5886 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This was referenced Aug 27, 2026
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.
Four workspace members are linted by nothing, because a runtime exclusion was silently doing duty as a compile exclusion. One of them was uncompilable on
mainfor 22 commits earlier today and no required check said so.The mechanism
#2058 already established the principle:
cargo clippyonly ever checks — it never links and never runs a test binary — so "needs a GPU", "needs wheel staging", "isn't a unit-test target" have no force over it. That PR restored lint coverage to 21 tested crates that had lost it for a reason that did not apply.The argument was never extended to the denied crates themselves. The
lintlane stayed:and every one of the five
DENYLISTreasons is a runtime reason:onnx-genai-ort-sysonnx-genai-benchonnx-runtime-ep-cudaonnx-genai-pythononnx-runtime-pythonMeasured on
mainbefore this PR — 4 of 60 members reached by no clippy invocation anywhere:Why it matters, concretely
onnx-runtime-pythondid not compile onmainfrom66ca26a5d(#2132) to881c3165c(#2173) — 22 commits, ~7.5 hours.The only job that builds that crate is
CUDA compile, via a hand-written-p onnx-runtime-pythonoutside the resolver. It is not a required check. On the breaking merge commit it reported exactly what it should have:Required checks on
mainare onlyFast (Linux x86_64)andRust quality. The signal existed, was correct, and was discarded. This PR puts that same breakage in front of a required check.The two-arm proof
I reverted #2173 to reintroduce the real break, and ran both lane definitions against that identical tree:
E0277packages - DENYLIST)packages - LINT_EXEMPT)The old lane is green not because it compiled the crate and found it sound, but because the broken crate was never in its input set. Both are "green"; only one of them is evidence.
The change
LINT_EXEMPTset, separate fromDENYLIST, whose entries must name a reason clippy itself cannot get past. The docstring says plainly that "needs a GPU at runtime" / "isn't a unit-test target" / "needs wheel staging" do not qualify — that is the 20 crates are tested by CI and linted by nothing; two clippy denials are live on main because of it #2058 mistake with new nouns.lintlane is nowpackages - LINT_EXEMPT(55 → 58).tested - lintedto(packages - LINT_EXEMPT) - linted. The old domain could not name a denied crate by construction — the guard whose entire job is to notice unlinted crates was structurally unable to see these four.LINT_EXEMPT, matching the existingDENYLISTcheck.vec_init_then_pushinonnx-runtime-python, rewritten as two mutually exclusive bindings with identical semantics.What stays exempt, and why that is honest
onnx-runtime-ep-cuda— its build script needs a CUDA toolchain the quality runner does not install. It passed clippy locally, but this box hasnvcc, so a local pass here is not evidence about the runner. Recorded as such. It is already linted by the CUDA job.onnx-genai-bench— 28 dead-code findings insrc/bin/compare.rs; an entireDirect*reporting path that nothing constructs. Filed as onnx-genai-bench: linted by nothing, and its Direct* report path is entirely dead code #2242, including the possibility that matters more than the lint: if that path was meant to be wired up, benchmark output someone believes is produced is not being produced. Exempted on explicitly temporary grounds rather than left inDENYLISTwhere the exclusion looks principled.onnx-genai-ort-syscosts nothing new: six of its dependents are already in the lane, so its build script already runs there. Confirmed no download occurs.Tests
Two self-test arms; the first is a real discriminator, not a restatement:
verify --simulate-unlinted onnx-runtime-python (a denied crate)— under the old domain this returned 0 and named nobody, because a denied crate could not entertested - linted. Verified by reverting the one-line domain change and re-running:It fails against the previous code and passes against this one.
verify --simulate-unlinted onnx-genai-bench (lint-exempt)pins the other direction, so the widened domain cannot quietly grow to include crates the runner cannot build. It correctly does not flip between the two versions.Suite is self-counting (
82/82 arms behaved as stated), so a miscount fails loudly rather than under-reporting.Validation
The clippy run was checked for having done real work rather than trusting
rc=0: 49 compile/check units, withonnx-runtime-python,onnx-genai-pythonandonnx-genai-ort-syseach confirmed present by name in the log.Limitations
CUDA compilerequired — that is a policy call for the repo owner, and it remains the only job compilingonnx-runtime-ep-cuda's CUDA paths.onnx-genai-benchremains unlinted until onnx-genai-bench: linted by nothing, and its Direct* report path is entirely dead code #2242 is resolved.Local validation is necessary and not sufficient — merging on required CI via normal auto-merge, no admin, no bypass.