Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughNative injection now receives the request tool catalog, rejects undeclared native tool calls, and reports structured authorization errors through WebSocket frames. Tests cover rejected and declared calls, and continuation fixtures now provide tool declarations. ChangesNative tool authorization
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Native responses now enforce declared tool catalogs and preserve structured authorization errors; undeclared calls are rejected while declared calls remain supported. The supplied regression coverage passes, so this is mergeable with normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 6 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 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. |
✅ READY
Hygiene✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 73 / 80평소 SSE 길에서는, 요청에 적어 두지 않은 클라이언트 도구 이름을 모델이 부르면 막습니다. 그런데 네이티브 멀티응답(인젝션) 길은 그 검사를 안 타고 이벤트를 그대로 넘겼습니다. 그래서 카탈로그에 없는 함수 호출을 광고하거나, 클라이언트에게 중계할 수 있었습니다. 이 PR은 그 구멍을 막습니다. 패스스루가 이미 갖고 있던 “이번 요청이 선언한 도구 집합”을 라인 라인 메인테이너의 판단이 필요한 지점 네이티브 거절도 SSE와 같은 너의 추천 방향이 맞습니다. 가드를 재사용하고, 중계 전에 끊는 순서가 맞으며, 공개 API 회귀도 핵심을 잡습니다. 머지해도 됩니다. 가능하면 거절 코드를 SSE와 맞추고, 끝 스냅샷만 있는 미선언 호출 테스트 하나를 더 넣은 뒤 Ready로 올리세요. tip rebase는 막히는 충돌이 없으면 같이 하면 됩니다. 이 댓글은 grok-bot이 작성했습니다 |
…undeclared_tool_call The authorize path now throws the same undeclared_tool_call code/message as the SSE guard, and the ws upstream pump preserves a structured error code instead of flattening every pump failure to websocket_protocol_error. Adds regression coverage for undeclared calls arriving only in the terminal snapshot or output_item.done, plus a declared-call positive case on the guarded public-API path.
4fd6dea to
5b955f7
Compare
|
Review feedback applied on
Tests: |
…tion-tool-authorization-bypass
…Lite catalogs (#5508) * fix(responses): bound native steering routes and replay memory Native steering and injection accepted requests on routes that were never meant to carry them, and their replay buffers grew without an upper bound, so a long-lived WebSocket exchange could retain an unbounded amount of app-owned memory. Restrict steering to the routes that declare it, cap the replay and body sizes, and release the stores when an exchange settles. Preexisting negative route tests are retained, and the injection docs now cross-link the steering contract. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(responses): enforce native injection tool authorization Carry #5470 onto the bounded native-control path. Configure the resolved request-local catalog before attachment, reject undeclared added/done/terminal items before relay, and preserve structured rejection codes. Retain declared rich-result continuations and the existing size and rollback controls. Local checks: NOT RUN by instruction. Hosted CI remains required. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com> * fix(subagents): recognize Responses Lite plaintext V2 catalogs Carry #5492. Recognize the first developer additional_tools catalog only when top-level tools is absent. Preserve opt-in, canonical destination, explicit catalog precedence, conflict checks and response restoration. Include unit and server-boundary regressions and clarify the Chinese catalog wording. Local checks: NOT RUN by instruction. Hosted CI remains required. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com> * fix(responses): reject oversized injection before enqueueing Validate the serialized injection before reserving call identities or queue bytes. A result exceeding the configured body limit is refused synchronously even when another result awaits acknowledgement, leaving the retained socket usable for corrected input. Add a two-call regression on subscription and public API routes covering the typed refusal, unchanged replay retention, first acknowledgement, corrected second result and final cleanup. Preserve immediate refusal and authorization coverage, and align the public and structure contracts. Independent static review: PASS. Local checks: NOT RUN by instruction; revised-head hosted CI remains required before integration. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com> --------- Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
Thank you, @luvs01. This change landed on |
Summary
Changes
configureToolAuthorizationtoNativeResponseControland wire it into passthrough dispatch so native owners receive the resolved request-local declared tool sets.NativeInjectionChannelby validatingresponse.output_item.added, advertised completed calls, and terminal snapshots against the declared tool set before advertising or relaying them.Testing
bun test tests/responses/ws-native-injection.test.ts tests/responses/ws-native-result-continuations.test.ts— 94 pass, 0 fail.Summary by CodeRabbit
Bug Fixes
Documentation