fix(responses): strip Codex-private item metadata at the noncanonical boundary - #3107
Conversation
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. |
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesResponses metadata filtering
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change removes private item metadata only for noncanonical Responses destinations while preserving canonical forwarding and caller-owned requests. No actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
리뷰 · 우선순위 64 / 80설명 이 PR은 기여자 @yanzhibo-bytedance 의 #3066을 지금 지금 체크아웃의 같은 결함을 먼저 잡은 #3038은 round-2 prio≥70 남은 축은 #3029 / #3008 / #3019 입니다. 이 PR은 그 열차 밖이지만, 공개 게이트웨이로 라우트하는 사용자에게는 요청이 통째로 거절되는 체감이 큽니다. 변경은 파일 2개·함수 하나·테스트 두 개입니다. 다만 같은 시각에 열린 #3109도 라인 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
|
Administrator bypass record\n\nOwner authorization was explicit in Codex session 01a05a34-1e3a-73f2-8607-15e517cbec11 on 2026-09-01 KST. Exact head: 39712e4. Current exact-head check rollup: 0 failing, 0 pending. Independent A-gate review found no unresolved code blocker. Using the maintain/admin pull_request bypass documented in MAINTAINERS.md because the author cannot approve their own PR. This bypass does not waive CI or security review. |
Summary
Carries #3066 (author @yanzhibo-bytedance) rebased onto current
dev. Both commits are the author's and needed no changes.Codex ≥0.151 attaches
internal_chat_message_metadata_passthroughto Responsesinput[]items. OpenCodex occupies the built-inopenaislot, so that private field reaches whatever destination the request is routed to, and a strict upstream rejects it as an unknowninput[*]parameter. The adapter now removes it at the noncanonical boundary, copy-on-write so_rawBodystays caller-owned.Supersedes #3038, which found the same defect. See below.
Why this one and not #3038
They differ in layer, and the layer is the whole decision.
#3038 strips inside
core.tsandcompact.tsafterreadJsonRequestBody, unconditionally — including on the canonical ChatGPT forward path, where the field is not foreign at all.isCanonicalOpenAiForwardProviderexists precisely to mark that destination (src/providers/openai-tiers.ts:34-37).Its tests are also vacuous:
tests/openai-internal-request-metadata.test.tsimportsstripOpenAiInternalRequestMetadataand calls it directly. It never driveshandleResponses, compact, or an adapterbuildRequest, so deleting both production call sites leaves that file green.#3066 strips inside
createResponsesPassthroughAdapter().buildRequest, inside the existingif (!isCanonicalOpenAiForwardProvider(provider))block, and its tests call that productionbuildRequest.Verification
Two mutations, each restored:
noncanonical Responses destinations strip Codex-private item metadatacanonical ChatGPT forward preserves Codex-private item metadataTwo mutations, two different failures: stripping and ChatGPT preservation are guarded independently, which is exactly the property #3038's test layer cannot assert.
Known residual
Official
openai-apikeynative compact bypasses this adapter, so a strict-validator failure on that specific destination is not covered here. That destination is OpenAI-operated and outside the reported joy-openai /gpt-5.6-solfailure; it belongs in its own change if it ever reproduces.Checklist
bun x tsc --noEmitcleanTriaged in the 2026-08-31 non-priority-70 bug round.
Summary by CodeRabbit
Bug Fixes
Tests