Repository navigation
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 9, 2026, 1:23 PM ET / 17:23 UTC. Summary PR surface: Source +2, Tests +115. Total +117 across 2 files. Reproducibility: yes. source inspection shows current main does not pass a timeout into writeUrlToFile's guarded fetch call, and the PR includes a clear hanging-server regression path. I did not execute the test in this read-only review. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the existing guarded-fetch timeout approach after contributor proof shows a stalled URL media write times out cleanly and maintainers accept 120s as the intended total deadline for node camera URL downloads. Do we have a high-confidence way to reproduce the issue? Yes, source inspection shows current main does not pass a timeout into writeUrlToFile's guarded fetch call, and the PR includes a clear hanging-server regression path. I did not execute the test in this read-only review. Is this the best way to solve the issue? Yes, this is the narrowest maintainable fix shape: the node camera writer uses the existing fetchWithSsrFGuard timeout contract at the media download boundary instead of adding a parallel network wrapper. The only open merge questions are proof quality and acceptance of the 120s total deadline. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8c78e1c035a6. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +2, Tests +115. Total +117 across 2 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
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Superseded by #103266, merged as The landed fix applies the fixed 15-minute deadline at the shared node-media URL writer, enforces HTTPS on every redirect hop before dispatch, retains the fetch guard through body consumption, and preserves partial-file cleanup. Its exact prepared head passed full hosted CI: https://github.com/openclaw/openclaw/actions/runs/29070305200 Closing this overlapping implementation so the transport invariant has one canonical owner. Thanks @Alix-007 for the report and patch. |
What Problem This Solves
Node camera URL-backed media downloads used the guarded fetch path but did not provide a request deadline. If the node host accepted the connection and never sent headers or completed the response,
writeUrlToFilecould wait indefinitely while saving camera artifacts.Why This Change Was Made
This PR adds a 120s deadline to
writeUrlToFile's guarded fetch call, while leaving the existing HTTPS requirement, node-host match, redirect host validation, body cleanup, and max-byte enforcement intact. Tests can pass a smaller timeout override so the regression proof remains fast.User Impact
A stalled node-hosted camera URL now fails through the existing error path instead of wedging the CLI media write.
Evidence
pnpm vitest run src/cli/nodes-camera.test.ts-> 29 passed.pnpm exec oxfmt --check --threads=1 src/cli/nodes-camera.ts src/cli/nodes-camera.test.ts && pnpm exec oxlint src/cli/nodes-camera.ts src/cli/nodes-camera.test.ts && git diff --check-> passed.git diff --check-> clean.src/cli/nodes-camera.tsreturned no open PRs.Proof
Regression contract: the branch test
aborts hanging url payload downloads through the guarded fetch timeoutstarts a localnode:httpserver that accepts the request and never sends response headers. It then callswriteUrlToFilewith a production-shaped HTTPS node URL, routes the guarded fetch mock to that real hanging server, assertstimeoutMs: 50, and verifies the expected output path is missing after the failure.Controlled stall transcript from the same guarded fetch runtime path, using a 500ms timeout so the proof does not wait two minutes:
Why this covers the bug: before this PR,
writeUrlToFiledid not pass a request timeout intofetchWithSsrFGuard, so a node-hosted URL that accepted the connection but withheld headers could remain pending. After this PR, the same guarded fetch path has a deadline; the committed regression also asserts no partial output file is left behind.Compatibility note: the production deadline is intentionally 120s total for URL-backed camera media downloads. A node-hosted transfer that is still progressing but takes longer than 120s can now fail instead of hanging indefinitely.
What was not tested: live node hardware. The proof uses a controlled local hanging server plus the committed
writeUrlToFileregression.