Repository navigation
Conversation
|
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 5 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. |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2618879102
ℹ️ 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".
| if (this.fragmentBytes + len > MAX_APP_SERVER_FRAME_BYTES) { | ||
| this.rejectFrameLength(this.fragmentBytes + len, 'message'); | ||
| return; |
There was a problem hiding this comment.
Exclude control frames from the aggregate message-size check
When a ping arrives between fragments of a message near the cap, this check adds the ping payload to the accumulated message size before the ping handler can run. For example, a 1,048,575-byte first fragment, an interleaved 2-byte ping, and a 1-byte continuation form a valid message exactly at the limit, but the connection is destroyed on the ping with a claimed message length of 1,048,577. This unnecessarily fails active turns and triggers exec fallback, or a streaming error if output was already emitted. Apply the aggregate check only to data/continuation frames, excluding control frames.
Useful? React with 👍 / 👎.
| this.handleClose(err); | ||
| try { this.sock && this.sock.destroy(); } catch {} |
There was a problem hiding this comment.
Settle initialization safely before rejecting a buffered frame
If an initialize RPC response and an oversized frame header arrive in the same socket data event, parsing the response queues the initialization success callback, but this call marks the client dead before that callback runs. The callback in connect() then calls this.send({ method: 'initialized' }), which throws app-server not connected; its returned promise has no rejection handler, so Node's default unhandled-rejection behavior terminates the proxy instead of falling back to exec. Reproducing the same input against the parent commit initializes successfully, whereas this commit produces the unhandled rejection. Ensure frame rejection also safely settles initialization and prevents the queued success callback from sending on a dead client.
Useful? React with 👍 / 👎.
|
🤖 Agent note · closed as superseded (salvage check included)
|
Summary
The test Codex stub now returns a deterministic model catalog so app-server tests do not block on model discovery. Regression coverage includes the valid-frame control, oversized header followed by a valid frame, unsafe 64-bit length, and aggregate fragmented-message overflow.
Evidence
codex debug models.node --test bin/codex-proxy.test.mjs— 27/27 passed.node --checkfor both files andgit diff --checkpass.Merge Danger
Door: Two-way; the cap can be reverted.
Blast Radius: Narrow; limited to app-server WebSocket frame/message parsing and its tests.
Need help on this PR? Tag
@codesmith-botwith what you need.