Repository navigation
test: use assert_eq! for empty checks (clippy::assert_is_empty, Rust 1.99) - #173
Conversation
…1.99) Rust 1.99.0 (stable since 2026-10-01) adds clippy::assert_is_empty, and the CI build job runs clippy with -D warnings on the floating stable channel, so every PR since 2026-10-05 fails on four test assertions: - crates/quantumssh/src/main.rs: three assert!(r.overrides.is_empty()) - crates/quantumssh-core/tests/accept.rs: assert!(stdout.is_empty()) They become assert_eq! against an empty value, which is what the lint asks for (the value is shown on failure). Test-only; no behaviour change. Verified with clippy 1.99.0 and 1.97.1 (-D warnings) and the affected tests (quantumssh bin tests, quantumssh-core accept). Claude-Session: https://claude.ai/code/session_01HxXXh6HEpJBs7tbuz3NmtW Signed-off-by: Gonzalo Fleming <[email protected]>
|
Reviewer: Codex (openai/codex-action, model gpt-5.6-terra) PR Review: test: use assert_eq! for empty checks (clippy::assert_is_empty, Rust 1.99) (#173)Decision: 🟢 Approved Executive summaryThis PR updates four test-only empty assertions to satisfy the new Clippy lint while preserving the assertions’ semantics. It introduces no production-path, dependency, cryptographic, transport, or licensing changes. No findings meet the reporting threshold. Decision: 🟢 Approved |
PR Review: test: use assert_eq! for empty checks (clippy::assert_is_empty, Rust 1.99) (#173)Decision: 🟢 Approved Executive summaryA four-line test-only change replacing Verification performed
New findingsNone. The change adds no Decision: 🟢 Approved |
PR Review: test: use assert_eq! for empty checks (clippy::assert_is_empty, Rust 1.99) (#173)Decision: 🟢 Approved Executive summaryThis is a targeted CI repair: Rust 1.99.0 (stable since 2026-10-01) introduced All five MANIFIESTO commitments are unaffected (no Limitation: Commit GPG/SSH signature verification is enforced by branch protection CI, not accessible from this review environment — confirmed as a known limitation per the review instructions. New findingsNone. No findings reached the reporting threshold (≥ 80 confidence). |
…posed) (#180) Rust 1.99.0 (2026-10-01) added clippy::assert_is_empty, and CI ran the floating stable channel with -D warnings, so the required build checks failed on every PR from 2026-10-05 until #173. ADR-0039 supersedes the channel = "stable" part of ADR-0010: rust-toolchain.toml pins 1.99.0, every CI job reads the version from that file, and a bump is one reviewed PR, opened by Dependabot's rust-toolchain ecosystem. Refs #109 Claude-Session: https://claude.ai/code/session_01HxXXh6HEpJBs7tbuz3NmtW Signed-off-by: Gonzalo Fleming <[email protected]>
…DR-0039) (#181) * docs(adr): ADR-0039 — pin the Rust toolchain to an exact release (Proposed) Rust 1.99.0 (2026-10-01) added clippy::assert_is_empty, and CI ran the floating stable channel with -D warnings, so the required build checks failed on every PR from 2026-10-05 until #173. ADR-0039 supersedes the channel = "stable" part of ADR-0010: rust-toolchain.toml pins 1.99.0, every CI job reads the version from that file, and a bump is one reviewed PR, opened by Dependabot's rust-toolchain ecosystem. Refs #109 Claude-Session: https://claude.ai/code/session_01HxXXh6HEpJBs7tbuz3NmtW Signed-off-by: Gonzalo Fleming <[email protected]> * ci(toolchain): pin Rust 1.99.0 in rust-toolchain.toml; CI reads it (ADR-0039) rust-toolchain.toml moves from channel = "stable" to "1.99.0", the release CI already runs. The build, openssh-interop and audit jobs read `channel` from that file and pass it to dtolnay/rust-toolchain instead of asking for `stable`; the step fails unless the value is an exact MAJOR.MINOR.PATCH, which also keeps the action input to digits and dots. cargo deny needs no change: cargo-deny-action already installs the toolchain the file names. Dependabot gains a rust-toolchain entry so each release arrives as one bump PR, where new lints are fixed before merge. docs/infrastructure.md no longer says the file tracks current stable. Refs #109 Claude-Session: https://claude.ai/code/session_01HxXXh6HEpJBs7tbuz3NmtW Signed-off-by: Gonzalo Fleming <[email protected]> * docs(adr): accept ADR-0039 with #181; record the partial supersession of ADR-0010 ADR-0039 flips to Accepted and names #181 as its implementation. ADR-0010's Status records that its channel = "stable" part is superseded by ADR-0039; the components list and every other bullet stand. Status-only edit per ADR-0015, worded like ADR-0020's record of ADR-0034. Refs #109 Claude-Session: https://claude.ai/code/session_01HxXXh6HEpJBs7tbuz3NmtW Signed-off-by: Gonzalo Fleming <[email protected]> * docs(adr): ADR-0039 — cite what dtolnay's README says about the @master revision The Context paraphrased README lines 43–45 as pairing an explicit `toolchain` input with "a SHA or @master ref"; those lines name only the @master revision. The SHA rule comes from lines 102–108. Wording fix before acceptance; no change to the decision. Refs #109 Claude-Session: https://claude.ai/code/session_01HxXXh6HEpJBs7tbuz3NmtW Signed-off-by: Gonzalo Fleming <[email protected]> --------- Signed-off-by: Gonzalo Fleming <[email protected]>
Summary
Rust 1.99.0 (stable since 2026-10-01) adds
clippy::assert_is_empty. The CIbuildjob runscargo clippy --workspace --all-targets -- -D warningson the stable channel, so the job has failed on every PR since 2026-10-05. That includes #172 and the dependabot PRs; the last green run was 2026-09-28.The lint flags four test assertions:
crates/quantumssh/src/main.rs:576,593,626assert!(r.overrides.is_empty())assert_eq!(r.overrides, Vec::<&str>::new())crates/quantumssh-core/tests/accept.rs:862assert!(stdout.is_empty())assert_eq!(stdout, b"")(matches thestderrassertion on the next line)These follow what the lint asks for: on failure the assertion prints the value. The change is test-only, with no behaviour change. Clippy's own suggestion,
[] as [&str; 0], was swapped for the equivalentVec::<&str>::new()for readability.Verification
rustup run 1.99.0 cargo clippy --workspace --all-targets -- -D warnings: reproduced the 4 errors onmain, and exits 0 after the change.cargo clippywith 1.97.1 (local stable) and-D warnings: exits 0.cargo fmt --all --check: clean.cargo test -p quantumssh --bins: 34 passed.cargo test -p quantumssh-core --test accept: 35 passed (both with 1.99.0).Not in scope
The root cause of the breakage is that
rust-toolchain.tomltrackschannel = "stable"per ADR-0010, so each Rust release can add lints that-D warningsturns into CI failures. Pinning an exact toolchain version would change that ADR's decision, so it belongs in a superseding ADR, not in this fix.No linked issue: this is a CI repair that is not tracked anywhere.
https://claude.ai/code/session_01HxXXh6HEpJBs7tbuz3NmtW