Skip to content

Rust 1.96#161

Merged
chipp merged 1 commit into
mainfrom
rust-1.96
Jun 22, 2026
Merged

Rust 1.96#161
chipp merged 1 commit into
mainfrom
rust-1.96

Conversation

@chipp

@chipp chipp commented Jun 22, 2026

Copy link
Copy Markdown
Owner

No description provided.

chipp commented Jun 22, 2026

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Rust toolchain to version 1.96.0 and upgrades various dependencies across the workspace, including aes, cbc, ecb, cipher, md-5, paho-mqtt, and tokio. It introduces a unified md5 module in the crypto library to replace direct md5 crate dependencies in elisheba, elizabeth, and inspinia. Feedback on the new crypto::md5 implementation suggests simplifying the digest function by using .into() for type conversion and optimizing the hex function to use a pre-allocated string buffer to avoid multiple allocations.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread lib/crypto/src/md5.rs
Comment thread lib/crypto/src/md5.rs
@chipp
chipp force-pushed the rust-1.96 branch 2 times, most recently from 8a3f9c9 to 929e83e Compare June 22, 2026 19:29
@chipp
chipp marked this pull request as ready for review June 22, 2026 19:30
@chipp
chipp requested a review from Copilot June 22, 2026 19:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the workspace to Rust 1.96 and refreshes a set of Rust dependencies across shared libraries and services, including adjustments needed for newer crate APIs (notably paho-mqtt stream pinning and consolidating MD5 helpers into the shared crypto crate).

Changes:

  • Bump Rust toolchain to 1.96.0 and align .rust-version to 1.96.0_1.
  • Upgrade multiple crate dependencies (e.g., paho-mqtt, uuid, openssl-probe, rusqlite, sha2, cipher/aes family) and refresh Cargo.lock.
  • Introduce crypto::md5 helper module and update call sites; adapt MQTT stream handling to new paho-mqtt stream behavior via pinning.

Reviewed changes

Copilot reviewed 21 out of 29 changed files in this pull request and generated no comments.

Show a summary per file
File Description
rust-toolchain.toml Bumps pinned Rust toolchain channel to 1.96.0.
.rust-version Updates builder tag version to 1.96.0_1 to match toolchain (sans suffix).
Cargo.lock Lockfile refresh reflecting toolchain + dependency upgrades.
lib/transport/Cargo.toml Updates MQTT + uuid + openssl-probe versions used by transport layer.
lib/sonoff/Cargo.toml Updates async/runtime dependencies and chipp_http/tokio versions.
lib/roborock/Cargo.toml Updates hashing/checksum dependencies (crc32fast/sha2).
lib/bluetooth/Cargo.toml Relaxes nix patch pinning to 0.31 series.
lib/inspinia/Cargo.toml Updates deps; replaces direct md5 crate usage with shared crypto.
lib/inspinia/src/template.rs Switches to crypto::md5 for template hash verification.
lib/crypto/Cargo.toml Upgrades crypto primitive crates (aes/cbc/ecb/cipher/md-5) and test deps.
lib/crypto/src/lib.rs Exposes new md5 module from crypto crate.
lib/crypto/src/md5.rs Adds shared MD5 digest + hex helpers with unit tests.
lib/crypto/src/ebc/dec.rs Updates ECB decrypt imports/API usage for newer cipher crate versions.
lib/crypto/src/cbc/enc.rs Updates CBC encrypt imports/API usage for newer cipher crate versions.
lib/crypto/src/cbc/dec.rs Updates CBC decrypt imports/API usage for newer cipher crate versions.
bin/alisa/Cargo.toml Updates service deps (chipp_http/paho-mqtt/uuid).
bin/alisa/src/main.rs Pins MQTT stream for compatibility with updated paho-mqtt stream type.
bin/alisa/src/web_service/user/action.rs Pins MQTT stream for updated paho-mqtt stream type.
bin/alisa/src/web_service/user/query.rs Pins MQTT stream for updated paho-mqtt stream type.
bin/elisa/Cargo.toml Updates paho-mqtt dependency to 0.14.
bin/elisa/src/main.rs Pins MQTT stream for updated paho-mqtt stream type.
bin/elisheba/Cargo.toml Updates paho-mqtt and removes direct md5 dependency.
bin/elisheba/src/main.rs Pins MQTT stream; switches key hashing to crypto::md5.
bin/isabel/Cargo.toml Updates paho-mqtt and rusqlite versions.
bin/elizabeth/Cargo.toml Adds crypto dependency; updates paho-mqtt; removes direct md5 dependency.
bin/elizabeth/src/main.rs Pins MQTT stream for updated paho-mqtt stream type.
bin/elizabeth/src/client/mod.rs Switches token hashing to crypto::md5::hex.
bin/elizabeth/Dockerfile Adds crypto crate to Docker build/test dependency copy/build steps.
bin/elizabeth/test.Dockerfile Adds crypto crate to Docker test build dependency copy/build steps.
Comments suppressed due to low confidence (1)

lib/inspinia/src/template.rs:42

  • download_template panics on hash mismatch and will also panic if the HTTP response body is shorter than 16 bytes. Since this is a fallible network operation, this should return an error instead of crashing the process, and it should validate response.len() before slicing.
    let mut expected_hash = [0u8; 16];
    expected_hash.copy_from_slice(&response[..16]);

    let result_hash = md5::digest(&response[16..]);

    if expected_hash[..] != result_hash[..] {
        panic!("invalid hash");
    }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chipp
chipp merged commit c8a7f2d into main Jun 22, 2026
14 checks passed
@chipp
chipp deleted the rust-1.96 branch June 28, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants