fix(responses): recover encrypted output rejections without masking failures - #3753
Conversation
Carry #3535 onto current dev, preserve default combo replay boundaries and handle missing Content-Type only on the existing native streaming path. Co-authored-by: yxr1995-maker <257504378+yxr1995-maker@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (13)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughNative Responses passthrough now recovers from specific encrypted function-output failures. Streaming preflight supports explicit retry predicates and missing content types. Tee and eager relays preserve upstream errors in bounded, redacted ChangesOpaque recovery and relay terminal handling
Estimated code review effort: 4 (Complex) | ~60 minutes Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk is established for the recovery and failed-tail changes. Sequence Diagram(s)sequenceDiagram
participant Client
participant ResponsesPassthrough
participant UpstreamResponses
participant OpaqueBlobRecovery
participant ResponsesRelay
Client->>ResponsesPassthrough: send Responses request
ResponsesPassthrough->>UpstreamResponses: forward request
UpstreamResponses->>ResponsesPassthrough: return encrypted-output rejection
ResponsesPassthrough->>OpaqueBlobRecovery: sanitize encrypted parts
OpaqueBlobRecovery->>UpstreamResponses: retry request once
UpstreamResponses->>ResponsesRelay: return streamed output or error
ResponsesRelay->>Client: emit response.failed or existing terminal
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 9 files. (4 skipped: 4 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
|
✅ Deterministic PR hygiene checks passed. |
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: b73809f7e9
ℹ️ 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".
리뷰 · 우선순위 75 / 80이 PR은 release-244 플랜의 다음 칸 지금 HEAD의 릴레이 쪽은 우선순위 75인 이유다. kiro-results( 경로/심볼 - 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
There was a problem hiding this comment.
💡 Codex Review
opencodex/src/server/responses/core.ts
Line 801 in cd6d4d3
When a Responses request carries only an encrypted reasoning or compaction item—not an encrypted function/custom-tool output—and the upstream returns an unrelated 502 with a slow or stalled body, this widened status gate still clones and drains the response for up to the 5-second bounded-body timeout. shouldAttemptOpaqueBlobRecovery() subsequently rejects that same response because its 502 branch requires outboundResponsesBodyCarriesEncryptedFunctionOutput(), after which the normal error path reads the original body and can wait another timeout. Apply the function-output predicate at this pre-read gate as well so requests that can never use the new 502 recovery do not incur the extra delay.
ℹ️ 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".
Summary
Co-authored-by: yxr1995-maker 257504378+yxr1995-maker@users.noreply.github.com
Verification
Checklist
The repository owner authorized admin integration without a second approval; CI, security review and current review findings were verified separately.