Wave2 polish: clippy/fmt clean, CI, finish dead diagnostic#1
Merged
Conversation
- Resolve all clippy warnings; lib + binaries now pass `cargo clippy
--all-targets -- -D warnings`:
- `div_ceil` / `is_multiple_of` for manual ceil-div and modulo checks
(lib.rs, realdata-bench.rs)
- regroup two unreadable RNG-seed literals in tests
- module-level `#![allow(clippy::needless_range_loop)]` on the four
numeric kernels (attention/outlier/grouped/twobit) where the loop
counter indexes packed sign-word slices and magnitude/score arrays in
lockstep; documented why explicit indexing is kept
- Replace the dead `_ensure_v2_view_compiles` helper (was sitting after the
test module under `#[allow(dead_code)]`) with a real unit test for
`GroupedKv::flatten_to_v2`, and drop the now-unused `CompressedKv` import
- Normalize formatting repo-wide with `cargo fmt` (repo was not fmt-clean)
- Add GitHub Actions CI (.github/workflows/ci.yml): fmt check, clippy
-D warnings, release build, and tests on stable
No behavior changes to the compression/attention logic.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
Independent verification — VERDICT: solid, ready to mergeRe-cloned
Diff review (452+ / 140-, 9 files)
No overclaimsPR body is honest, including the appropriate caveats: GitHub Actions CI not yet executed (correctly flagged UNVERIFIED), No required fixes. Approve / merge. |
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.
Summary
Polish-to-completion pass on the kv-compressor crate. No changes to the
compression or attention logic — this is lint, test, and CI hygiene plus
finishing one dead diagnostic helper.
Changes
-D warnings) across lib + both binaries:usize::div_ceil/usize::is_multiple_ofreplacing manual ceil-div and% == 0checks (src/lib.rs,src/bin/realdata-bench.rs)#![allow(clippy::needless_range_loop)]on the four numerickernels (
attention,outlier,grouped,twobit), with a commentexplaining the rationale: the loop counter indexes packed sign-word slices
together with magnitude/score/weight arrays in lockstep, and the
i-outer/d-inner bit-walk; iterator rewrites would obscure the bit-packing
layout. This is the honest call rather than mangling hot math paths.
_ensure_v2_view_compiles(a dead#[allow(dead_code)]helper sitting after the test module that onlyexisted to force
GroupedKv::flatten_to_v2to compile) and replaced it witha real unit test,
flatten_to_v2_averages_group_mags_and_preserves_outliers.Dropped the now-unused
CompressedKvimport ingrouped.rs.cargo fmtrepo-wide (the repo was not fmt-clean, whichis why the diff is large — most of it is pure reflow).
.github/workflows/ci.yml(stable toolchain) running fmtcheck,
clippy --all-targets -D warnings, release build, and tests.Verification (run locally on this machine — Rust 1.95.0 stable, x86_64-linux)
cargo build --release --all-targets— passescargo test --all-targets— passes, 20 tests (was 19; +1 new test)cargo clippy --all-targets -- -D warnings— cleancargo fmt --check— cleancargo run --release --bin kv-bench— runs, reports 6.50x ratio on syntheticdata as expected
The CI workflow itself has not been run on GitHub Actions yet
(UNVERIFIED until it executes on the PR); it mirrors the exact commands
verified locally above.
Not done / left alone
negative-result research crate and stays that way.
realdata-benchstill requires externally dumped Qwen3 KV.npztensors(per the Python scripts) to exercise its full path — not run here, no such
dump on this machine. The synthetic
kv-benchpath was exercised.criterionremains a dev-dependency with no[[bench]]target wired up(pre-existing); left as-is to avoid scope creep.
🤖 Generated with Claude Code