Fix CI failures from random crate trait resolution#183
Open
Jeshua Ben Joseph (Theaxiom) wants to merge 4 commits intomainfrom
Open
Fix CI failures from random crate trait resolution#183Jeshua Ben Joseph (Theaxiom) wants to merge 4 commits intomainfrom
Jeshua Ben Joseph (Theaxiom) wants to merge 4 commits intomainfrom
Conversation
- Downgrade `rand` crate to 0.8 in root Cargo.toml to match rand_core compatibility expectations
- Remove the explicit `rand_core = { workspace = true }` override from `shared/Cargo.toml`
- Adjust `shared/src/crypto.rs` implementations of X25519-dalek to explicitly use `chacha20poly1305::aead::OsRng` rather than the `rand` crate functions, bypassing mismatched `CryptoRng` trait versions entirely.
- Resolve missing `tokio::time` functions under `cargo test` by enabling the `test-util` feature in the root Cargo.toml.
Co-authored-by: Theaxiom <57013+Theaxiom@users.noreply.github.com>
Copilot started reviewing on behalf of
Jeshua Ben Joseph (Theaxiom)
April 30, 2026 00:46
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets CI failures caused by Rust dependency/trait-version mismatches (notably around RNG traits) and missing Tokio test time controls, with a couple of accompanying coordinator Python packaging/test formatting updates.
Changes:
- Switch
sharedcrypto RNG usage tochacha20poly1305::aead::OsRngand alignrand_coreusage to avoidCryptoRngtrait version conflicts. - Enable Tokio
test-utilfeature and pinhkdfto an older compatible version to stabilize builds/tests. - Add coordinator Poetry lockfile and adjust a unit test assertion formatting.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
shared/src/crypto.rs |
Replaces rand RNG usage with OsRng and adjusts RngCore import source. |
shared/src/circuit_breaker.rs |
Removes unused tokio::time::sleep import from tests. |
shared/Cargo.toml |
Pins rand_core to 0.6. |
Cargo.toml |
Enables Tokio test-util and pins hkdf version. |
Cargo.lock |
Updates lockfile to reflect dependency resolution changes. |
coordinator/tests/unit/test_main_module.py |
Reformats an assertion for style/clarity. |
coordinator/pyproject.toml |
Adds a dependency-groups entry for flake8. |
coordinator/poetry.lock |
Adds Poetry lockfile capturing Python dependency resolution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| x25519-dalek = { version = "2.0", features = ["static_secrets"] } | ||
| chacha20poly1305 = "0.10" | ||
| hkdf = "0.13" | ||
| hkdf = "=0.12.4" |
Comment on lines
55
to
58
| hkdf = "=0.12.4" | ||
| sha2 = "0.10" | ||
| base64 = "0.22" | ||
| rand = "0.9" |
| pub fn generate_base_nonce() -> [u8; 12] { | ||
| let mut nonce = [0u8; 12]; | ||
| rand::rng().fill_bytes(&mut nonce); | ||
| OsRng.fill_bytes(&mut nonce); |
Comment on lines
+20
to
+22
| base64 = { workspace = true } | ||
| rand = { workspace = true } | ||
| rand_core = { workspace = true } | ||
| rand_core = "0.6" |
| [workspace.dependencies] | ||
| # Async runtime | ||
| tokio = { version = "1.52", features = ["full"] } | ||
| tokio = { version = "1.52", features = ["full", "test-util"] } |
Member
Author
|
Copilot apply changes based on the comments in this thread and also resolve merge conflicts. |
…ope test-util to dev, unpin hkdf Co-authored-by: Theaxiom <57013+Theaxiom@users.noreply.github.com>
…roach, unpin hkdf, scope test-util to dev Co-authored-by: Theaxiom <57013+Theaxiom@users.noreply.github.com>
…tion, clarify benchmark comment Agent-Logs-Url: https://github.com/100monkeys-ai/monkey-troop/sessions/9e14ec07-3321-4969-9414-4bbe3062ab11 Co-authored-by: Theaxiom <57013+Theaxiom@users.noreply.github.com>
Contributor
Applied all review feedback and resolved merge conflicts (commit
|
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.
randcrate to 0.8 in root Cargo.toml to match rand_core compatibility expectationsrand_core = { workspace = true }override fromshared/Cargo.tomlshared/src/crypto.rsimplementations of X25519-dalek to explicitly usechacha20poly1305::aead::OsRngrather than therandcrate functions, bypassing mismatchedCryptoRngtrait versions entirely.tokio::timefunctions undercargo testby enabling thetest-utilfeature in the root Cargo.toml.