GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(codex-proxy): cap app-server WebSocket frames (#1839) by dezren39 · Pull Request #4056 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Summary

 drainFrames(frame)
- trust unbounded 64-bit lengths and accumulate fragments
+ reject unsafe lengths and frames/messages above 1 MiB
+ clear partial state and close with a size/cap diagnostic

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

  • Before: the targeted oversized-frame test timed out before the fake app-server saw a request; the test stub blocked in codex debug models.
  • After: node --test bin/codex-proxy.test.mjs — 27/27 passed. node --check for both files and git diff --check pass.

Merge Danger

Door: Two-way; the cap can be reverted.

Blast Radius: Narrow; limited to app-server WebSocket frame/message parsing and its tests.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dezren39
fix(codex-proxy): cap app-server WebSocket frames
2618879
@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 23:02
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 81819722-7fb0-47d3-bb44-e625b0479fb6
Commits

Reviewing files that changed from the base of the PR and between df3f836 and 2618879.

Files selected for processing: 2
  • bin/codex-proxy.mjs
  • bin/codex-proxy.test.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T23:05:56.838755Z 2618879 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 1, 2026
codex-proxy: app-server WebSocket frame parser has no size cap — a header claiming a huge payload wedges the connection forever and swallows every later frame #1839
Closed
5 tasks
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 1, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread bin/codex-proxy.mjs
Comment on lines +640 to +642
if (this.fragmentBytes + len > MAX_APP_SERVER_FRAME_BYTES) {
this.rejectFrameLength(this.fragmentBytes + len, 'message');
return;

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 1, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread bin/codex-proxy.mjs
Comment on lines +606 to +607
this.handleClose(err);
try { this.sock && this.sock.destroy(); } catch {}

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 1, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot assigned dezren39 Nov 2, 2026
@developing-today

developing-today Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Agent note · closed as superseded (salvage check included)

  • Agent: queue worker (repo-worker-code), lane code-f, triage task 11976 on issue codex-proxy: app-server WebSocket frame parser has no size cap — a header claiming a huge payload wedges the connection forever and swallows every later frame #1839
  • PR fix(codex-proxy): cap app-server WebSocket frames (#1839) #4056's fix (1 MiB frame/message cap, unsafe-length rejection, regression tests) was the correct fix for issue codex-proxy: app-server WebSocket frame parser has no size cap — a header claiming a huge payload wedges the connection forever and swallows every later frame #1839 while codex-proxy lived — but the component has since been decommissioned: PR chore(proxy): decommission codex-proxy (:18744) — native openai provider replaced the CLI bridge #6596 (merged 2026-11-06, commit 33af178) deleted bin/codex-proxy.mjs and bin/codex-proxy.test.mjs from main, replaced by the native OpenAI provider.
  • Salvage check, per protocol: this PR's diff touches only those two deleted files. There is nothing unique to carry forward — the parser it caps no longer exists anywhere on main, and merging this PR would resurrect a decommissioned component. "Nothing unique" is the salvage verdict.
  • Issue codex-proxy: app-server WebSocket frame parser has no size cap — a header claiming a huge payload wedges the connection forever and swallows every later frame #1839 is being closed as superseded with the decommission evidence in the same pass.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 closed this Nov 8, 2026
This was referenced Nov 9, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
fix(codex-proxy): cap app-server WebSocket frames #7171
Closed
Unowned PR batch from branch disposition (2026-11-07) #7297
Open
@dezren39
dezren39 deleted the queue/5047-1839-ws-frame-cap branch November 14, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.