Repository navigation
fix(tokio): retain token grants through connection drains - #6859
Conversation
Quest-Claim: 7e079b7e9d8d3c64
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 9203951
No actionable bugs found. Retaining both Shared and the token Holder through the current and predecessor drains addresses the ownership problem without changing the public API or wire format. The weak task reference avoids extending ordinary teardown, and retaining only the auth handle would not preserve configured token registrations. The expanded token-only, multi-window transfer test exercises the relevant failure rather than merely a successful close.
Verification: static inspection of the diff, surrounding close/abort lifecycle, token-holder ownership, session drain semantics, and regression test. I did not run tests or builds; cancellation and concurrent-close paths were inspected, not executed.
|
Landing summary: took over the stale
(Written by Claude Opus 5.5) |
Resolve rs/moq-tokio/src/connection.rs against #6859: the loop-owned token Holder now lives in Running, built from the connection's Tokens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Connection::close()stops the reconnect task before draining its sessions. That drops configured tokens and aborts their auth handle, so a token-only publication with data still in flight endsUnauthorized.Approach
Retain the loop's shared state and token holder through both session drains. A weak reference keeps ordinary task teardown unchanged; cancelling close also releases the retained owner. Extend the existing QUIC drain test with a token-only grant and a transfer spanning multiple congestion windows. Remove the completed quest.
Impact
Alternatives
Retaining only the auth handle would still drop the configured tokens. A one-packet test passed unchanged, so the test keeps enough data in flight to expose the premature withdrawal.
Validation
recv_groupfailed withStream(Unauthorized).quest check --base origin/mainpass.just cipasses, including all 5,280 selected Rust tests (75 skipped by the CI profile).Follow-ups
None in this change. Validation loads the Nix environment once and disables its repeated child-shell startup hook; that hook otherwise grows the environment until mbx cannot launch Cargo.
(Written by GPT-6)