You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
replace the resolver resolved-package stream with a bounded Tokio channel
size the install streaming buffer from the same network concurrency used by fetch workers
await stream sends so resolver/fetch overlap applies backpressure instead of growing an unbounded queue
move an existing install test module below helper items so current all-targets clippy stays green
Validation
cargo check -p aube-resolver -p aube
cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test -p aube-resolver
This PR was generated by Codex.
Note
Medium Risk
Changes async streaming semantics (send().await) between resolver and installer, which can affect throughput and introduce stalls if the receiver isn’t drained as expected. Scope is contained to the streaming resolution/fetch overlap path.
Overview
The resolver’s resolved-package stream is now bounded: Resolver::with_stream uses a fixed default capacity and a new with_stream_capacity constructor, and resolved_tx switches from mpsc::UnboundedSender to mpsc::Sender.
All resolver streaming send call sites now await to apply backpressure instead of accumulating an unbounded queue, and install sizes the stream buffer from the same network concurrency used by tarball fetch workers. A small test-module move keeps --all-targets clippy passing.
Reviewed by Cursor Bugbot for commit 7b20f7b. Bugbot is set up for automated code reviews on this repo. Configure here.
This PR replaces the unbounded mpsc channel used to stream resolved packages from the resolver to the fetch coordinator with a bounded channel sized to fetch_network_concurrency, and converts all three tx.send(...) call sites to tx.send(...).await so a full buffer applies backpressure to the resolver instead of allowing unbounded queue growth. The test module relocation is a cosmetic change to satisfy clippy's --all-targets ordering requirement.
Confidence Score: 5/5
Safe to merge — changes are mechanically correct, the async context is valid, and no logic regressions were identified.
All three send sites are inside async fn resolve / async fn resolve_workspace, so .await is valid. The resolver and fetch coordinator run as separate Tokio tasks, so a full channel correctly suspends the resolver without deadlock. capacity.max(1) guards against a zero-capacity channel. The let _ = tx.send(...).await error-discard pattern is consistent with the previous unbounded implementation and behaves correctly when the receiver is dropped. No functional regressions or new bugs found.
No files require special attention.
Important Files Changed
Filename
Overview
crates/aube-resolver/src/builder.rs
Replaces unbounded channel with a bounded mpsc channel; adds with_stream_capacity and a DEFAULT_STREAM_CAPACITY = 64 fallback for the plain with_stream entry-point.
crates/aube-resolver/src/lib.rs
Narrows field type from mpsc::UnboundedSender to mpsc::Sender to match the new bounded channel.
crates/aube-resolver/src/resolve.rs
Converts all three tx.send(...) call sites to tx.send(...).await inside already-async resolve/resolve_workspace functions; errors are still silently discarded with let _ = ... as before.
crates/aube/src/commands/install/mod.rs
Moves fetch_network_concurrency computation above channel creation so the same value sizes the bounded buffer and the download semaphore; switches to with_stream_capacity; relocates the test module to after all helper functions.
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
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.
Summary
Validation
This PR was generated by Codex.
Note
Medium Risk
Changes async streaming semantics (
send().await) between resolver and installer, which can affect throughput and introduce stalls if the receiver isn’t drained as expected. Scope is contained to the streaming resolution/fetch overlap path.Overview
The resolver’s resolved-package stream is now bounded:
Resolver::with_streamuses a fixed default capacity and a newwith_stream_capacityconstructor, andresolved_txswitches frommpsc::UnboundedSendertompsc::Sender.All resolver streaming
sendcall sites nowawaitto apply backpressure instead of accumulating an unbounded queue, andinstallsizes the stream buffer from the same network concurrency used by tarball fetch workers. A small test-module move keeps--all-targetsclippy passing.Reviewed by Cursor Bugbot for commit 7b20f7b. Bugbot is set up for automated code reviews on this repo. Configure here.