fix(ci): restore green CI under current stable clippy and cddl 0.10.7 - #795
Conversation
Recent stable clippy releases widened two lints that the workspace now trips under `-D warnings`: - `for_kv_map` on the four `check_minting` loops that bind `(policy, _)` over `minted_value.iter()`; the same files already use `.keys()` elsewhere. - `useless_borrows_in_formatting` on `&`-prefixed arguments to `format!`, `assert_eq!` and `panic!` in pallas-math tests and pallas-hardano's `ValidityInterval` display. All mechanical; no behaviour change.
cddl 0.10.7 regressed map entries whose key is a type-rule reference rather
than an inline type. The leios-fetch blueprint schema uses exactly that shape
bitmaps = { * base.word16 => base.word64 }
and 0.10.7 rejects every key in such a map as unexpected, failing
`block_txs_conforms` and `block_txs_request_conforms`. Reduced repro:
{ * uint => uint } with {0: 1} -> validates
{ * k => uint } k = uint with {0: 1} -> "unexpected key Integer(0)"
Confirmed still broken on cddl master as of 2026-08-25. `cddl` is optional and
only pulled in by the test-only `blueprint` feature, so the pin does not reach
default builds. Relax once a release carries the fix.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe changes pin the optional ChangesCleanup and compatibility updates
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The PR applies localized CI compatibility fixes and pins an optional test-only dependency; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
clippy 1.98 adds `chunks_exact_to_as_chunks`, which fires on the constant-size `chunks_exact(4)` in `AsIPv6`. `slice::as_chunks` is stable since 1.88.0, which is the workspace MSRV, and `.0` drops the same (always empty here) remainder `chunks_exact` did.
CI on
mainis red, and has been since the last green run on 2026-07-01 (cdee91d). The workspace does not commitCargo.lockand CI resolvesdtolnay/rust-toolchain@stable, so both failures are external drift rather than anything in a PR. Reproduced on a clean checkout oforigin/mainwith no local changes.Surfaced while triaging #793, which only touches
pallas-utxorpc/src/shared.rsand is unaffected by either failure.1. Clippy — new lints on current stable (1.98.0)
cargo clippy --workspace --all-targets -- -D warningsfails on fourfor_kv_maphits inpallas-validate:…plus the same in
babbage.rs,conway.rsandshelley_ma.rs. The CI log stops there because the build bails, but more failures hide behind it — each one only becomes visible once the crate ahead of it compiles:useless_borrows_in_formattingon&-prefixedformat!/assert_eq!/panic!arguments inpallas-mathtests andpallas-hardano'sValidityIntervaldisplay.chunks_exact_to_as_chunks(new in clippy 1.98) on the constant-sizechunks_exact(4)inpallas-hardano'sAsIPv6.slice::as_chunksis stable since 1.88.0, which is exactly the workspace MSRV, and.0drops the same (always empty here) remainder.All mechanical;
.keys()is already the idiom elsewhere in the same files. No behaviour change.2.
cddl0.10.7 regressed map keys that reference a type rulecargo test -p pallas-network -p pallas-network2 --features blueprintfails on all three OSes:cddl0.10.7 was published 2026-08-10, after the last green run; 0.10.6 (2026-06-29) is what that run resolved. The leios-fetch blueprint schema declaresand 0.10.7 rejects every key of a map whose key is a named type rule rather than an inline type. Reduced repro:
{ * uint => uint }{0: 1}{ * k => uint },k = uint{0: 1}unexpected key Integer(0){ * k => uint },k = tstr{"a": 10}unexpected key Text("a"){ * uint => v },v = uint{0: 1}Only the key position is affected; a named value rule still resolves. Definite- and indefinite-length maps behave identically, so this is not about our encoder. Still reproduces against
cddlmaster as of 2026-08-25, so this is pinned to=0.10.6rather than waiting on a patch release.cddlis optional and reached only through the test-onlyblueprintfeature, so the pin does not affect default builds or downstream consumers who leave the feature off. The comment inCargo.tomlrecords when to relax it.Verification
Every CI job run locally on rustc/clippy 1.98.0 — the same stable CI resolves — against a freshly resolved lockfile (
rm Cargo.lock):cargo clippy --workspace --all-targets -- -D warnings— cleancargo fmt --all --check— cleancargo test --workspace— no failurescargo test -p pallas-network -p pallas-network2 --features blueprint— all suites greenRUSTDOCFLAGS=-D warnings cargo doc --workspace --no-deps— cleancargo check --workspace --all-targetswith--all-featuresand--no-default-features— cleancargo check -p pallas-primitives --no-default-features— cleanFollow-ups (not in this PR)
cddlmap-key regression is unreported upstream; worth an issue onanweiss/cddl.mainbecause nothing runs CI between merges andCargo.lockis uncommitted. A scheduled run would catch drift closer to when it lands, instead of surprising the next contributor to open a PR.connection_sustained_over_time(pallas-network2) is flaky on the macOS runner: it timed out atwait_for_intersectionwithEvents collected: [], then passed on re-run of the same commit, having also passed on macOS one commit earlier. The 10sDEFAULT_TIMEOUTover a real loopback connection looks tight for a contended runner. Same family as0353bf4.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Refactor