Skip to content

fix: preserve refusal output and authentication in WebSocket helpers - #4214

Merged
markstuart-oai merged 1 commit into
mainfrom
codex/websocket-helper-fixes
Oct 30, 2026
Merged

markstuart-oai merged 1 commit into
mainfrom
codex/websocket-helper-fixes

Conversation

@markstuart-oai

Copy link
Copy Markdown
Contributor

Fix three edge cases in Responses WebSocket helpers:

  • Accumulate refusal deltas through the normal output-item and content-part lifecycle.
  • Preserve Azure API-key authentication when a WebSocket connection is replaced, including explicit caller header overrides.
  • Exclude local parsed metadata when replaying typed output items, while preserving caller-provided dictionaries.

Validation: 24 focused regression tests passed against a fresh wheel built from this branch. The broader Responses test directory passed 998 tests with 2 skips across the initial run and a 21-test retry after installing a missing test-environment proxy dependency. Ruff, type checks for the new tests, and diff checks passed.

@markstuart-oai
markstuart-oai marked this pull request as ready for review October 30, 2026 02:53
@markstuart-oai
markstuart-oai requested a review from a team as a code owner October 30, 2026 02:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

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-10-30T05:39:38.179748Z 156bbc2 Manual request
🔒 Security Review ✅ Completed 2026-10-30T05:40:06.097122Z 156bbc2 Manual request
ℹ️ 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.

@markstuart-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 156bbc2811

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 156bbc2811

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@markstuart-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 156bbc2811

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 156bbc2811

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed 156bbc2 with coordinator and independent static passes.

Refusal accumulation respects content replacement and remains separate from output_text. Azure API-key precedence follows the existing HTTP policy. Parsed typed output excludes SDK metadata during replay while ordinary dictionaries remain caller-controlled.

Hosted CI: {'SUCCESS': 17, 'SKIPPED': 9}. No candidate code or tests were executed locally.

@markstuart-oai
markstuart-oai added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 0599203 Oct 30, 2026
26 checks passed
@markstuart-oai
markstuart-oai deleted the codex/websocket-helper-fixes branch October 30, 2026 06:38
@openai-sdks openai-sdks Bot mentioned this pull request Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants