build: pin CI to 1.98.0 and write down why the tree cannot lint below it #114
No reviewers
Labels
No labels
blocked
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
waiting-on-julian
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jlxq0/matrix-mcp!114
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "clippy-floor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Cross-engine review (Codex) and a re-measurement after Clark disputed two numbers. Both produced corrections; both are in
8984d5d.The numbers in the first version were the post-fix tree's, sitting next to a sentence about the pre-fix one. Re-measured, both trees, four toolchains, counted by clippy rather than by grep:
main(before)unknown lint1.96.0gives 2 onmain, not 1. Clark measured that independently, and the #109 worker's gate report had shown exactly those two before either of us went looking.duration_suboptimal_unitsis at 11 sites, not the 10 a grep finds:rate_limit.rshas one#[allow]line carrying two lints. Clippy counts suppressions, grep counts lines.Added 1.97.1, because Codex was right that "lints only on clippy >= 1.98" claimed a range from two measurements. 1.97.1 still fails, so 1.98.0 is the first clean toolchain — and
AGENTS.mdnow says first-clean rather than implying later ones stay clean, which no measurement can show and which is exactly whyci.ymlnames a version.Codex's other two findings, and what I did with them:
as_chunks::<2>()loop is semantically identical for every input, andsize & !1is now redundant. Confirmed —as_chunkssplits the remainder off itself. Left in place; the test comment already records that two mechanisms enforce the same property and that neither alone is observable.parse_wav_mono_16bitreturns from thedataarm before padding matters. Reworded the.expectrather than the fixture; the endianness and sample-count assertions are unaffected.Gates re-run: fmt, clippy
-D warnings(0 errors), 209 tests green on 1.98.0.cargo check --all-features --lockedgreen on 1.93.0.Closes #112
What the issue had, and what was actually there
The issue named two attributes. There are twelve.
clippy::duration_suboptimal_unitsappears at eleven sites acrosssession.rs,mas.rs,channel.rs,key_backup_gate.rs,rate_limit.rs(×2),session_store.rs,setup.rs(×3) andmcp.rs, and it is unknown to clippy 1.93 as well. Same tree, three toolchains:cargo clippy --all-targets --all-features --locked -- -D warningsunknown linterrors — 11duration_suboptimal_units, 1unused_async_trait_implunknown linterror —unused_async_trait_implSo the floor is 1.98 and
duration_suboptimal_unitswas never the binding constraint, but eleven of the twelve sites were undocumented.One attribute was removable, and its comment was wrong
chunks_exact_to_as_chunksat the WAV decoder carried "clippy 1.98 suggestsas_chunks::<2>(), which is newer than our declared MSRV". It is not newer.as_chunks::<2>()compiles on rustc 1.93.0 — probed with a standalone--edition 2024file before the attribute was deleted. Taking the suggestion is also the better code: the array type carries the width, sofrom_le_bytestakes*cwith no slice indexing.The other eleven stay, and so does the twelfth
Duration::from_minsandDuration::from_daysare still unstable on 1.98 (E0658: use of unstable library feature 'duration_constructors'), so clippy is suggesting something that does not compile.unused_async_trait_implfires on code#[tool_handler]generates. Both are now written down inAGENTS.mdas suppressions not to remove in order to lower the floor.Why
rust-versionstays 1.93The issue proposed raising it. I did not, because it would be false.
cargo check --all-features --lockedpasses on rustc 1.93.0 — the tree builds there, which is whatrust-versionmeans, and the digest-pinnedrust:1.93-bookwormbuilder in the Dockerfile does it on every release. Raising it to 1.98 would have forced a builder-image bump with a new digest for a reason that is about linting, not building.Two floors, and they are different numbers.
AGENTS.mdnow says both, with the measurements and the date.Why pin CI rather than leave it on
stablestableis not a safety margin here. WithRUSTFLAGS: -Dwarnings, a clippy release firing a new lint on untouched code reds whichever pull request happens to be open, and every#[allow]added to quiet one ratchets the floor up again — invisibly, because CI is always on the new side of it. That is how twelve of them accumulated.1.98.0is stated inci.ymlwith a comment saying to bump it deliberately.The rewrite had no test, which the negative control found
Swapping
from_le_bytesforfrom_be_bytes— corrupting every decoded sample — left all 206 tests green.transcoder_produces_ogg_streamasserts the Ogg container's shape and nothing about its contents.wav_samples_are_read_little_endian_and_a_trailing_odd_byte_is_not_a_samplereads the samples: seven data bytes chosen so little-endian and big-endian differ on all three. Controls run:size & !1changed tosize→ green, becauseas_chunksdiscards the remainder too. Either mechanism alone can be deleted invisibly. The test's own comment says so rather than claiming a coverage it does not have.Gates
fmt, clippy
-D warnings(0 errors) and 207 tests green on 1.98.0.cargo check --all-features --lockedgreen on 1.93.0, which is the claimrust-versionmakes.Merge order
Touches the end of
AGENTS.md, as does #113. Whichever lands second needs a one-hunk rebase.21ad8e5a23fe7e9443aaClark disputed two of them and was half right, which is what re-measuring is for. Both trees, four toolchains, counted by clippy rather than by grep: before this change after clippy 1.93.0 13 unknown lint 12 clippy 1.96.0 2 1 clippy 1.97.1 — 1 clippy 1.98.0 0 0 - The tree carried thirteen such attributes, not twelve. I measured after removing `chunks_exact_to_as_chunks` and wrote the result down next to a sentence describing the tree before it. - "1.96.0 gives 1" was the post-fix count. On `main` it gives 2, which is what Clark measured and what the #109 worker's gate report showed before either of us went looking. - `duration_suboptimal_units` is at 11 sites, not the 10 a grep finds: `rate_limit.rs` has one `#[allow]` line carrying two lints. Clippy counts suppressions; grep counts lines. Added 1.97.1, because "lints only on >= 1.98" claimed a range from two measurements. 1.97.1 still fails, so 1.98.0 is the first clean toolchain — and the file now says first-clean rather than implying every later one is, which no measurement can show and which is the reason ci.yml names a version. Also stopped the new WAV test calling its fixture well-formed. A RIFF chunk with an odd body needs a trailing pad byte and this one has none; it parses because `parse_wav_mono_16bit` returns from the `data` arm before padding matters. The endianness and sample-count assertions are unaffected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0176noPigX2cwByDtRcafzyi