Conversation
starr-openai
approved these changes
Apr 17, 2026
starr-openai
left a comment
Contributor
There was a problem hiding this comment.
clean. await should never block because unbounded and yields there seem fine
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is the first mechanical cleanup in a stack whose higher-level goal is to enable Clippy coverage for async guards held across
.awaitpoints.The follow-up commits enable Clippy's
await_holding_locklint and the configurableawait_holding_invalid_typelint for Tokio guard types. This PR handles the cases where the underlying issue is not protected shared mutable state, but atokio::sync::mpsc::UnboundedReceiverwrapped inArc<Mutex<_>>so cloned owners can callrecv().await.Using a mutex for that shape forces the receiver lock guard to live across
.await. Switching these paths toasync-channelgives us cloneableReceivers, so each owner can hold a receiver handle directly and await messages without an async mutex guard.What changed
codex-rs/code-mode, replace the turn-messagempsc::UnboundedSender/UnboundedReceiverplusArc<Mutex<Receiver>>withasync_channel::Sender/Receiver.codex-rs/codex-api, replace the realtime websocket event receiver with anasync_channel::Receiver, allowingRealtimeWebsocketEventsclones to receive without locking.async-channelas a dependency forcodex-code-modeandcodex-api, and updateCargo.lock.Verification
just clippy.