fix(images): add a connect deadline to provider artifact downloads - #5349
ahmedfrawelo wants to merge 2 commits into
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 (4)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughProvider artifact downloads now apply a 10-second default connection timeout. Callers can override it with ChangesImage download connection timeout
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Provider image and video downloads now apply a bounded connection setup deadline while preserving existing download limits and idle-timeout behavior. No merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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. |
6c46a9f to
c8f6b2c
Compare
리뷰 · 우선순위 70 / 80이 PR은 제공자가 준 그림 주소(HTTPS)를 받을 때, TCP나 TLS가 끝나지 않으면 너무 오래 기다리지 않게 하려는 고침입니다. 같은 제목·같은 요지의 열린 PR이 이미 있습니다. #5295(draft, 더 큰 문제는 #5295 리뷰와 같습니다. 실제로 그림을 받아 아티팩트로 저장하는 길은 또, 라인 - 메인테이너의 판단이 필요한 지점 #5295와 #5349 중 하나만 남길지 정해 주세요. 남긴 쪽에서는 연결 10초를 (1) 이미지·영상 공개 URL 다운로드 전부( 너의 추천 지금 이 PR만 머지하지 마세요. #5295와 합치거나, 테스트가 더 나은 이쪽을 남기고 #5295는 닫으세요. 남긴 쪽에서는 이 댓글은 grok-bot이 작성했습니다 |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. Current head: |
c8f6b2c to
975bbfd
Compare
connectPublicHttps is the real path for provider-returned image/video URLs; pinnedHttpsGet has no production callers. Forward DOWNLOAD_CONNECT_TIMEOUT_MS there too, with a regression test on fetchPublicHttpsImage.
975bbfd to
7078e0a
Compare
|
Review feedback addressed in the latest push (rebased onto current
Verified locally: new test + |
|
@lidge-jun This is ready for re-review when you have a moment:
One flag: |
…web_search, artifact connect deadline, Alibaba Responses pins, Windows kiro.exe (#5673) * docs(devlog): plan bundle lane F1 (provider registry) * fix(cursor): continue composer-2.5-fast tool turns as userMessageAction composer-2.5-fast stayed on resumeAction after the 2026-08-20 capture because it answered on that path then. A 2026-09-21 proxy log shows the fast build completing a tool-result turn with no text and no tool call, the same empty stop that moved composer-2.5 to the external continuation path. Route the fast id through cursorNeedsExternalToolContinuation too. Tests that pinned fast to resumeAction now use composer-1 as the native counterexample, the live-transport screenshot case expects the Composer continuation for both 2.5 builds, and the clipped-invocation restoration case covers fast. cursor-blob.test.ts stays at its line cap. Carries #5362. Co-authored-by: Play <99410048+001005HS@users.noreply.github.com> * fix(adapters): strip the refused web_search fields on direct Meta for every Muse id Direct Meta Muse / Meta Model Responses refuses search_content_types and indexed_web_access on a plain web_search tool as a gateway schema rule, before inference, for every Muse model it serves. Dev only stripped them for the Contributor ids, so the non-Contributor default muse-spark-1.3 (both direct-Meta presets) still sent them and 400ed every Codex turn that attached web_search. The direct Meta destination is now the whole predicate, including a missing model id; the two OpenCode Zen destinations keep the Contributor-id gate because they serve nothing else. Preview tools keep their accepted shape. The contract moves to structure/transports/responses-wire-shapes.md, replacing the stale "unrelated models" wording. Carries #5314. Co-authored-by: Ivan Fokeev <2017148+ifokeev@users.noreply.github.com> * fix(images): add a connect deadline to provider artifact downloads Provider-returned image and video URLs are downloaded through connectPublicHttps and the pinned-IP transport. That path bounded the idle phases and the first byte but did not arm a separate TCP/TLS connect deadline, so a peer that never completed the handshake held the download for the full first-byte window. connectPublicHttps now forwards a 10 s DOWNLOAD_CONNECT_TIMEOUT_MS and pinnedHttpsGet accepts a per-call connectTimeoutMs with the same default; a stalled connect fails with connect_timeout. The idle timer and the 50 MiB cap are unchanged. The production-path test lives in a new sibling file registered in both layout manifests; the transport inventory records the deadline. Carries #5349. Co-authored-by: ahmedfrawelo <247386484+ahmedfrawelo@users.noreply.github.com> * feat(registry): pin live-verified Alibaba Token Plan models to the Responses wire Alibaba Token Plan (Beijing) documents a native Responses API on the same compatible-mode base and an official Codex guide on wire_api = "responses" (#5097). qwen3.8-flash, qwen3.7-plus and glm-5.3 were live-verified end to end on that gateway, so the registry now defaults them to openai-responses for Responses inbound only. Chat and Anthropic inbound keep the provider-wide Chat wire and its measured prefix-cache behaviour, and modelAdapters still wins in both directions. The entry sets preserveResponsesReasoningContent beside the pins: the Responses serializer reads that flag rather than the Chat-side preserveReasoningContentModels list, and the gateway accepted replayed plaintext reasoning content live. qwen3.7-plus sends its effort as a reasoning.effort string on this wire instead of the Chat-side numeric thinking_budget. The intl sibling stays unpinned. Tests cover resolver defaults per inbound, the upstream URL through handleResponses for all three pinned models (glm-5.3 now asserts the Responses default, not only the Anthropic path), the qwen3.7-plus effort payload, overrides, and the reasoning replay flag. The provider reference row and structure/transports/responses-wire-shapes.md describe the pins. Carries #5188. Closes #5097. Co-authored-by: mdwsk88 <11055210+mdwsk88@users.noreply.github.com> * fix(oauth): fall back to kiro.exe inside the dedicated Windows Kiro-Cli folders Some Windows installs keep the CLI as kiro.exe in %LOCALAPPDATA%\Kiro-Cli or Program Files\Kiro-Cli, so forced and add-account Kiro login could not find it. After every canonical kiro-cli candidate misses, the resolver now accepts kiro.exe inside those two folders only, which are already trusted for kiro-cli.exe, and only when the base is a fully qualified drive path. A short name is never resolved from PATH or from the shared POSIX bin directories (~/.local/bin, /usr/local/bin, /opt/homebrew/bin): an unrelated kiro there, such as the Kiro IDE launcher, must not receive credential-flow arguments. Negative tests cover a short name on PATH, relative and drive-relative bases, and the POSIX directories. The provider guide and structure/providers/kiro.md state the order. Partial carry of #5000: its Unix short-name fallback is left out. Co-authored-by: 정우철 <86232509+oocheol@users.noreply.github.com> * fix(bundle-f1): fold the adversarial review nits - src/images/artifacts.ts: state the connect-deadline rationale correctly; a 60 s first-byte timer already runs before the connection exists, and the new deadline bounds TCP/TLS setup on its own. - fr, tr and zh-tw provider guides: add the Windows kiro.exe fallback and the never-a-short-name-from-PATH rule next to the existing Kiro-Cli paragraph. - devlog lane plan: drop trailing blank lines and add the delivery doc. --------- Co-authored-by: Play <99410048+001005HS@users.noreply.github.com> Co-authored-by: Ivan Fokeev <2017148+ifokeev@users.noreply.github.com> Co-authored-by: ahmedfrawelo <247386484+ahmedfrawelo@users.noreply.github.com> Co-authored-by: mdwsk88 <11055210+mdwsk88@users.noreply.github.com> Co-authored-by: 정우철 <86232509+oocheol@users.noreply.github.com>
Summary
connectPublicHttps(the production path for provider-returned image/video URLs) now forwards a connect deadline (DOWNLOAD_CONNECT_TIMEOUT_MS, 10s default) to the pinned transport.pinnedHttpsGetkeeps the same contract (connectTimeoutMsoption, 10s default, per-call override).connect_timeout.maxBytescap are unchanged.Related work: #5295 covered the same area and was closed unmerged.
Verification
bun test tests/images/download-connect-deadline-default.test.tsΓÇö 1 pass, asserting the production path (fetchPublicHttpsImagewithout an injected transport) forwards the 10s connect deadline.bun test tests/images/pinned-https-get.test.tsΓÇö 8 pass, including cases asserting the 10s connect deadline is scheduled by default and a connecting socket that never completes rejects withconnect timed out.bun test tests/images/download-cap-default.test.ts tests/images/artifacts-ssrf.test.tsΓÇö pass.bun test tests/test-layout.test.ts tests/test-layout-tooling.test.tsΓÇö pass (new test file registered).bun x tsc --noEmitΓÇö clean.Review readiness checklist
Summary by CodeRabbit
Bug Fixes
Tests
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.