Repository navigation
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs maintainer review before merge. Reviewed July 11, 2026, 2:00 AM ET / 06:00 UTC. Summary PR surface: Source +33. Total +33 across 5 files. Reproducibility: yes. from source with high confidence: every reachable remote path currently sets only a body-idle guard, leaving response-header arrival unbounded. The contributor also supplied a real stalled-server run through the production web-media path. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Keep this PR open until a linked canonical PR proves it covers this PR's unique work, or a maintainer confirms closure. Do we have a high-confidence way to reproduce the issue? Yes, from source with high confidence: every reachable remote path currently sets only a body-idle guard, leaving response-header arrival unbounded. The contributor also supplied a real stalled-server run through the production web-media path. Is this the best way to solve the issue? Yes. Reusing the canonical header-only primitive at the web-media owner covers all affected callers, avoids a competing timeout implementation, and does not cap healthy response bodies. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b8502e1c0afa. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +33. Total +33 across 5 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (8 earlier review cycles)
|
e7ae631 to
a5e4cd3
Compare
|
@clawsweeper re-review Rebased this branch to agent-tools-only-plus-seam: aligned REMOTE_MEDIA_TIMEOUT_MS to 15 min (canonical bounded-media ceiling, PR #103266), dropped the Tlon changes (owned by canonical #103206), and added timeoutMs forwarding assertions for all three agent tools (image / image-generate / pdf). The shared seam is included only so this fork PR typechecks standalone; it reduces to agent-tool-only once #103206 lands. Redacted proof transcript is in the PR body. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
8a0eace to
097d1ed
Compare
|
@clawsweeper re-review Refactored to adopt the canonical P1 — Real affected-tool runtime proof. Live proof ( P2 — Use the canonical seam, no parallel surface. Replaced Maintainer decision — which PR owns the shared seam? Resolved by landing order independence. With the canonical seam on Verification:
Canonical precedents:
New head: |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
7936a09 to
332a21c
Compare
332a21c to
afe9776
Compare
|
Rebased onto latest
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Apply the shared bounded-media ceiling (15 min, matching the canonical precedent in PR openclaw#103266) to the three agent-tool remote-media callers (image, image-generate, pdf) via the new REMOTE_MEDIA_TIMEOUT_MS constant, forwarded through loadWebMedia / loadWebMediaRaw's timeoutMs seam. Bounds endpoints that never respond while REMOTE_MEDIA_READ_IDLE_TIMEOUT_MS keeps protecting slow-but-progressing transfers. This branch includes the WebMediaOptions.timeoutMs seam so it typechecks and stays green as a standalone fork PR; it reduces to agent-tool-only once the canonical seam+Tlon PR openclaw#103206 lands. The Tlon caller changes live in openclaw#103206 (the earlier openclaw#103199 is closed as a subset). - src/agents/tools/media-tool-shared.ts: export REMOTE_MEDIA_TIMEOUT_MS = 15*60_000. - image-tool / image-generate-tool / pdf-tool: pass timeoutMs on remote (http) loads. - src/media/web-media.ts: forward timeoutMs (shared seam; see openclaw#103206). - tests: assert timeoutMs forwarding for all three agent tools. Co-Authored-By: Claude <[email protected]>
Lock the existing image, image-generation, and PDF remote-media call sites to the proposed header-only deadline and remove the PR-only proof script.\n\nCo-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: wangmiao0668000666 <[email protected]>
afe9776 to
2f98ed4
Compare
|
Merged via squash.
|
* fix(agent-tools): bound remote media fetches with a 15-min total timeout Apply the shared bounded-media ceiling (15 min, matching the canonical precedent in PR openclaw#103266) to the three agent-tool remote-media callers (image, image-generate, pdf) via the new REMOTE_MEDIA_TIMEOUT_MS constant, forwarded through loadWebMedia / loadWebMediaRaw's timeoutMs seam. Bounds endpoints that never respond while REMOTE_MEDIA_READ_IDLE_TIMEOUT_MS keeps protecting slow-but-progressing transfers. This branch includes the WebMediaOptions.timeoutMs seam so it typechecks and stays green as a standalone fork PR; it reduces to agent-tool-only once the canonical seam+Tlon PR openclaw#103206 lands. The Tlon caller changes live in openclaw#103206 (the earlier openclaw#103199 is closed as a subset). - src/agents/tools/media-tool-shared.ts: export REMOTE_MEDIA_TIMEOUT_MS = 15*60_000. - image-tool / image-generate-tool / pdf-tool: pass timeoutMs on remote (http) loads. - src/media/web-media.ts: forward timeoutMs (shared seam; see openclaw#103206). - tests: assert timeoutMs forwarding for all three agent tools. Co-Authored-By: Claude <[email protected]> * fix(agent-tools): adopt canonical responseHeaderTimeoutMs seam from main * test(agent-tools): cover media header deadlines Lock the existing image, image-generation, and PDF remote-media call sites to the proposed header-only deadline and remove the PR-only proof script.\n\nCo-authored-by: wangmiao0668000666 <[email protected]> * style: oxfmt * fix(media): default stalled header deadline Co-authored-by: wangmiao0668000666 <[email protected]> --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Remote media fetches had body-idle protection but no default deadline for the pre-header phase. An endpoint could accept a connection and never return response headers, leaving image, PDF, and other media consumers waiting indefinitely.
Why This Change Was Made
The original branch threaded a new timeout option through
loadWebMediaand several agent tools. Maintainer review rejected that extra surface. The reworked fix now lives at the canonical owner instead:src/media/fetch.tsgives the existing response-header deadline primitive a generous 15-minute default.WebMediaOptionsfield is added.The 15-minute default matches the existing large node-camera media download ceiling while applying only to header arrival here.
User Impact
Stalled remote media endpoints now fail with the existing
MediaFetchError/ timeout cause instead of hanging indefinitely. Healthy large downloads continue after headers arrive.Evidence
node scripts/run-vitest.mjs src/media/fetch.test.ts— 50 tests passed on the rebased head.node scripts/check-changed.mjs -- src/media/fetch.ts src/media/fetch.test.ts— full delegated changed gate passed on Blacksmith Testboxtbx_01ky1sn9tf18k13m7hyz27pe7n(typechecks, formatting, lint, guards).origin/main— no accepted/actionable findings.MediaFetchErrorwithTimeoutErrorcause.Compatibility
This intentionally bounds previously unbounded response-header waits at 15 minutes. Peter approved the fixed default and rejected a new configurable surface.
Credit
Reworked from @wangmiao0668000666's original stalled-media fix; contributor commits and co-author credit are preserved.