Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (18)
✨ Finishing Touches📝 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 |
|
Superseded by #5022, which landed first on |
리뷰 · 우선순위 42 / 80이 PR은 그런데 지금 현재 이 PR이 제안한 라인 수준으로 보면 아래가 핵심입니다.
메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Summary
oauthDispatch()selectedroute.provider.fetchoutside the fresh-connection executorOCX_FRESH_CONNECTION_HOSTSpolicy at the actual sendConnection: close,keepalive: false, andredirect: manualsrc/server/Closes #4992.
@lidge-jun This fixes a confirmed gap in the already-merged #4977 path. I am not self-approving or merging it; please review the exact head after hosted CI settles.
Why
providerFetch()correctly wrapped its captured base fetch, but credential revalidation can replace the route and its provider-scoped fetch. The production override then chose that newer fetch directly rather than the supplied executor. For xAI and any future provider-scoped transport, a matching host could therefore keep reusing Bun's pool despite the operator opt-out.ProviderDispatchExecutor.withFetch()keeps the replacement transport but runs it through the same final-send policy. This avoids falling back to the stale captured transport and avoids duplicating policy inside OAuth routing.Verification
bun test tests/responses/fresh-connection-optout.test.ts --timeout 30000: 11 pass, 0 failbun run typecheck: passbun run structure:check: passbun run build: pass, 457 pagesgit diff --check: passbun run test: 26,382 pass, 21 skip, 15 fail; all 15 failures reproduce in the seven unrelated failing files when run separately and are outside this diff (existing local admission-key expectation, launchd fixture, remote-workspace sandbox, Cursor status, and Windows spill timing failures)Transition note
This is a TypeScript Responses transport correction with no Go counterpart in the current tree. The documented
dev2-goremote branch does not currently exist, so there is no forward-port target available at submission time.Summary by CodeRabbit
New Features
OCX_FRESH_CONNECTION_HOSTSto bypass broken keep-alive connections for selected hosts and subdomains.Connection: closeand keep-alive disabled.Documentation
Tests