fix(vydra,xai,runway,pixverse,deepinfra,together,elevenlabs,microsoft): bound JSON response reads to prevent OOM#96354
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 27, 2026, 2:12 AM ET / 06:12 UTC. Summary PR surface: Source +2. Total +2 across 2 files. Reproducibility: yes. at source level: current main still calls direct response.json() on the targeted Vydra speech and xAI OAuth/device-code paths. I did not establish a full runtime OOM reproduction for those exact paths 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 bounded-reader approach for xAI OAuth after representative proof and cap acceptance, and either rely on #96875 for Vydra or rebase with equivalent Vydra proof/tests if that PR does not land. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main still calls direct response.json() on the targeted Vydra speech and xAI OAuth/device-code paths. I did not establish a full runtime OOM reproduction for those exact paths in this read-only review. Is this the best way to solve the issue? Yes for the code shape: readProviderJsonResponse is the existing Plugin SDK seam and is the narrowest owner-boundary fix for these reads. It is not merge-ready until path-level proof, xAI auth cap acceptance, and Vydra overlap handling are resolved. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fbfadbd806e1. Label changesLabel justifications:
Evidence reviewedPR surface: Source +2. Total +2 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
|
…ponseWithLimit The readResponseWithLimit function expects a full Response type, but these providers accept Pick<Response, "json"> as their parameter. Add an explicit cast at the call site. Refs openclaw#96354 Co-Authored-By: Claude <[email protected]>
|
Closing: check-test-types CI failure. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
… provider helpers - xai-oauth: use readProviderJsonResponse for OAuth token responses - vydra-speech: use readProviderJsonResponse for speech synthesis responses Co-Authored-By: Claude <[email protected]> Signed-off-by: lsr911 <[email protected]>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review |
2 similar comments
|
@clawsweeper re-review |
|
@clawsweeper re-review |
|
Closed: merge conflicts with upstream. Superseded by cleaner single-module PRs covering the same modules. |
What Problem This Solves
Bound xAI OAuth and Vydra speech HTTP response reads using the shared
provider JSON reader to prevent unbounded buffering from untrusted upstream.
Changes
extensions/xai/xai-oauth.ts: Replaceresponse.json()withreadProviderJsonResponse(response, "xai.oauth")(shared 16 MiB default cap)extensions/vydra/speech-provider.ts: Replaceresponse.json()withreadProviderJsonResponse(response, "vydra.speech")(shared default cap)Video/image-generation providers intentionally unchanged — already use proper
bounded readers or deferred to focused follow-up PRs.
Evidence
AI-assisted.