Repository navigation
fix(openai): handle WebSocket size rejections during uploads - #767
Merged
Merged
Conversation
Co-authored-by: Codex <noreply@openai.com>
Codex Review Summary: ✅ CompletedThis 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
问题与改动
v3.54.3 的反馈中,约 41 MiB 的长会话请求在上传时断开。CPR 已按握手声明的大小上限选择 WebSocket 或 HTTP/SSE,但分片写入阻塞时,可能先记录断管或 TCP 重置,漏掉上游已发回的关闭帧。原日志本身无法确定关闭码。已有的握手上限处理 #691
本次对齐官方 Codex
rust-v0.173.0-alpha.4的上传处理。CPR 在写入阻塞期间继续读取上游并回复 Ping,写入失败时也处理已经到达的回复。官方上传读写实现 · 官方首条文本前的大小拒绝处理1009时,复用握手超限的传输规则。允许回退的请求通过同一账号走 HTTP/SSE,下一次请求仍可使用 WebSocket。previous_response_not_found,由客户端带完整历史重发。显式 WebSocket 预热保留关闭错误。1009,保留原错误,避免重复执行。单独的断管或 TCP 重置仍按传输失败处理。公开行为已同步到docs/api.md。自审与验证
1009、续接和预热。--all-targets -- -D warnings)、工作区格式检查和git diff --check均通过。1009后经 HTTP/SSE 返回response.completed,全程约 21 秒。AI 使用
Codex(
gpt-6.2-astra)参与排查、实现、测试、文档与提交前自审。