Repository navigation
fix(id): cap inbound /ws/tags messages - #3371
Conversation
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. |
|
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 12 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f772a44794
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let closed = tokio::time::timeout(Duration::from_secs(5), client.next()) | ||
| .await | ||
| .expect("oversized message did not close the WebSocket"); |
There was a problem hiding this comment.
Terminate the socket handler when the inbound reader exits
After the oversized message triggers a capacity error, handle_tags_socket exits only its inbound drain task. The forwarding loop remains blocked on rx.recv() while retaining the socket's write half, so neither a close frame nor transport closure reaches the client. With no subsequent tag events, this newly added test times out here. Observe drain-task completion in the forwarding loop and drop or close the remaining socket half when the reader terminates.
Useful? React with 👍 / 👎.
Summary
ws_tags_handlernow applies the shared 1 MiBMAX_FRAME_BYTESlimit before upgrading/ws/tags:A wire-level regression test checks ping/pong, outbound tag-event delivery, and connection termination after a message exceeds the cap.
Evidence
git diff --checkpasses. The focused Rust test is being retried after the first build stopped before compiling this crate because the filesystem ran out of space; CI will provide an isolated check.Merge Danger
Door: Two-way — the cap can be adjusted or reverted.
Blast Radius: Narrow — only inbound message size for
/ws/tagschanges; normal outbound events are covered by the test.Need help on this PR? Tag
@codesmith-botwith what you need.