fix(visaged): unbreak CI — clippy 1.98 lint, without raising MSRV - #87
Merged
Merged
Conversation
…nks without raising MSRV main is red, and no commit caused it. Run history for the identical SHA 63c9fbc: 2026-08-18 17:12 success 2026-08-24 06:51 failure The code did not change; the toolchain did. CI resolves `dtolnay/rust-toolchain@stable`, which floated onto a Rust whose clippy adds `chunks_exact_to_as_chunks`. Combined with `-D warnings`, a new lint is an immediate failure on untouched code, and it blocks every merge. Neither obvious fix is available here: - clippy suggests `as_chunks::<4>()`. That API is far newer than this crate's declared `rust-version = "1.75"`, so taking the suggestion would silently raise MSRV — a breaking change for consumers. - `#[allow(clippy::chunks_exact_to_as_chunks)]` names a lint that does not exist before clippy 1.98, so it would trip `unknown_lints` on any older toolchain, trading one failure for another. So the loop indexes explicitly instead. It is correct on every toolchain from 1.75 upward and couples to no lint name. The slice bounds cannot panic: `bytes.len() == EMBEDDING_BYTE_LEN` is checked immediately above, and `EMBEDDING_BYTE_LEN == EMBEDDING_DIM * 4`. Verified: fmt clean; clippy clean; 81 tests pass across 9 suites. The local toolchain is 1.95 and does NOT carry this lint, so the fix could not be reproduced-then-confirmed against the real lint locally — CI on this PR is the check that matters. Coverage of the rewritten line was proven by injecting a one-character defect (`i * 4 + 1`), which fails 5 tests including test_embedding_byte_fidelity and test_strict_rejects_nan. Not addressed here: CI is nondeterministic by construction. A floating stable toolchain plus `-D warnings` means the build can go red with no commit, which is what happened. Pinning the toolchain is a maintainer policy call and is left for a separate decision. Signed-off-by: ccross <cescross2@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 24, 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.
main is red, and no commit caused it
Run history for the identical SHA
63c9fbc:The code did not change; the toolchain did. CI resolves
dtolnay/rust-toolchain@stable, which floated onto a Rust whose clippy addschunks_exact_to_as_chunks. With-D warnings, a new lint is an immediate failure on untouched code — and it blocks every merge in the repo, not just this one.Why neither obvious fix works
as_chunks::<4>()— stabilized in Rust 1.88.0 (rust-lang/rust#139656), against this crate's declaredrust-version = "1.75". Taking the suggestion would raise MSRV by thirteen minor versions, whichversioning-disciplineclasses as a breaking change for consumers.#[allow(clippy::chunks_exact_to_as_chunks)]— names a lint that does not exist before clippy 1.98, so it tripsunknown_lintson any older toolchain. That trades one failure for another.So the loop indexes explicitly. It is correct on every toolchain from 1.75 upward and couples to no lint name. The slice bounds cannot panic:
bytes.len() == EMBEDDING_BYTE_LENis checked immediately above, andEMBEDDING_BYTE_LEN == EMBEDDING_DIM * 4.Verification
let start = i * 4 + 1), which fails 5 tests —test_embedding_byte_fidelity,test_strict_rejects_nan,test_strict_rejects_infinity,test_roundtrip,test_encryption_roundtrip— then restoring from a snapshot and re-confirming green.Stated limitation: the local toolchain is 1.95 and does not carry this lint, so I could not reproduce-then-confirm against the real lint locally. CI on this PR is the check that matters.
Not addressed here
CI is nondeterministic by construction: a floating stable toolchain plus
-D warningsmeans the build can go red with no commit, which is exactly what happened. Pinning the toolchain is a maintainer policy call and deserves its own decision rather than riding along in a fix.🤖 Generated with Claude Code