Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
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.
8a3f9c9 to
929e83e
Compare
There was a problem hiding this comment.
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.0and align.rust-versionto1.96.0_1. - Upgrade multiple crate dependencies (e.g.,
paho-mqtt,uuid,openssl-probe,rusqlite,sha2,cipher/aesfamily) and refreshCargo.lock. - Introduce
crypto::md5helper module and update call sites; adapt MQTT stream handling to newpaho-mqttstream 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_templatepanics 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 validateresponse.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.

No description provided.