Skip to content

ci: enforce the lint bar the project already declares - #146

Merged
ApiliumDevTeam merged 3 commits into
chore/clippy-cleanfrom
ci/lint-gate-matches-the-declared-bar
Jul 30, 2026
Merged

ci: enforce the lint bar the project already declares#146
ApiliumDevTeam merged 3 commits into
chore/clippy-cleanfrom
ci/lint-gate-matches-the-declared-bar

Conversation

@ApiliumDevTeam

Copy link
Copy Markdown
Contributor

Second of the stack. Base is #145; retargets to dev automatically once that merges.

The gap

CLAUDE.md declares CI ran
scope --workspace -p aingle_minimal
targets --all-targets library only
severity -D warnings -W clippy::all

One member of seventeen, warn-only. It reported green the whole time 54 lints accumulated. Nobody was negligent — the gate everyone believed was shut was never fitted.

--all-targets is load-bearing, not thoroughness for its own sake: it is what covers benches and integration tests, and the only reason a benchmark that had not compiled in months surfaced at all.

Format Check was already red

Separately, and for some time — so the aggregate CI Success gate has been failing on main. cargo fmt --all here makes it pass, and the widened clippy keeps it honest.

A step I wrote and then removed

I added a "verify clippy really compiled every member" step and failed three times to make it work — once for a missing jq, twice for paths two processes did not share. Each time it reported success because it had read nothing, which is precisely the failure it existed to catch. It also duplicates what --workspace -D warnings already does: a member that will not build makes the step exit non-zero.

Removed, with the reasoning left in the file. Shipping a verifier that cannot verify is worse than not having one.

Three #[allow] remain

Two clamp substitutions that change NaN behaviour and one public from_str that shadows the trait method. Each carries its full reasoning at the site. #147 and #148 remove all three — after those, no #[allow] from this series is left anywhere.

Verification

cargo clippy --workspace --all-targets -- -D warnings exit 0 · cargo fmt --all --check exit 0 · 2242 tests green.

Not yet validated on the runner: CI only triggers on main, dev and PRs against them. This PR is the first time it runs.

CLAUDE.md defines `make lint` as `cargo clippy --workspace --all-targets
-- -D warnings`. CI ran `cargo clippy -p aingle_minimal --features rest
-- -W clippy::all`: one member of seventeen, the library target only, and
warnings that failed nothing. It reported green throughout.

Behind it: a benchmark that had not compiled in months, assertions that
compared unsigned counters against zero and so passed no matter what the
code did, and a `flatten()` over `io::Lines` that spins forever on a
repeated read error. `--all-targets` is what covers benches and
integration tests, and is the only reason the dead benchmark surfaced.

`Format Check` was separately red on main, so the aggregate `CI Success`
gate has been failing for some time; `cargo fmt --all` here makes it pass
and the widened clippy keeps it honest.

Note the lints were an onion: with `-D warnings` a failing crate stops
everything downstream from being linted at all, so the count grew from 24
to 54 as each layer was cleared. It took four passes to reach a clean
run — worth knowing before trusting a single measurement.

The three lints that are decisions rather than cleanup carry
`#[allow(...)]` with the full reasoning at the site: two `clamp`
substitutions that change NaN behaviour, and a public `from_str` that
shadows the trait method. Removing each attribute is the definition of
done for that decision.
…d dev

`pull_request: branches: [main, dev]` meant a PR onto any other branch ran
no checks at all. A stack of dependent PRs therefore had no CI until each
was retargeted — which is after the review, not before it.

Found by building such a stack: three of its five PRs showed no checks
whatsoever, and nothing about the interface said why.
`clippy::question_mark` is new in 1.97. Nobody touched this code; the
toolchain moved under it.

Which is the whole argument for pinning: this repository installs
`dtolnay/rust-toolchain@stable`, so the gate added in this PR can go red
from a compiler release with no commit behind it. Verified by installing
1.97.0 locally — clippy, rustfmt and the tests are all clean under the
exact toolchain the runner used, which 1.96 could not have told me.
@ApiliumDevTeam
ApiliumDevTeam merged commit 65ad2b4 into chore/clippy-clean Jul 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant