Repository navigation
Conversation
0b9a122 to
5bf7d01
Compare
|
Codex review: needs real behavior proof before merge. Reviewed July 10, 2026, 2:29 PM ET / 18:29 UTC. Summary PR surface: Source -2, Tests +28, Other +130. Total +156 across 3 files. Reproducibility: yes. at source level: current main unconditionally reads the complete failed upload response, and the PR regression reaches that branch through Review metrics: none identified. Stored data model 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. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Keep the shared-helper runtime change and focused regression, provide redacted loopback output that reaches the failed upload through Do we have a high-confidence way to reproduce the issue? Yes at source level: current main unconditionally reads the complete failed upload response, and the PR regression reaches that branch through Is this the best way to solve the issue? Yes for the runtime fix: the shared provider HTTP helper is the narrow canonical owner for bounded reads, cancellation, redaction, and structured errors. The remaining blocker is exact-workflow real behavior proof, not the implementation shape. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b56bad33f2fb. Label changesLabel justifications:
Evidence reviewedPR surface: Source -2, Tests +28, Other +130. Total +156 across 3 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 (3 earlier review cycles)
|
|
@clawsweeper re-review Added loopback HTTP proof: real server returns 400 with sensitive body → assertOkOrThrowProviderError produces sanitized ProviderHttpError with redacted values and structured metadata. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Same proof gap as #103472: the existing test used status 200 (success path) which never reached the changed |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…rror Replace manual response.text() + throw Error with the canonical assertOkOrThrowProviderError which provides bounded reads, redaction, and structured ProviderHttpError metadata. Ref: openclaw#102953
…law#103306) The existing file-upload test used status 200 (success path) which never exercised the assertOkOrThrowProviderError branch. Add a non-OK (503) oversized response test that validates bounded read and cancellation through the exact error path this PR changes.
Local HTTP server returns oversized 503 on the upload endpoint. assertOkOrThrowProviderError reads at most 16 KiB and returns a bounded ProviderHttpError — same pattern as the accepted proof in openclaw#103472 for the batch-create sibling path.
|
@clawsweeper re-review Added loopback proof (local HTTP server -> assertOkOrThrowProviderError against real 4 MiB streaming 503 response). Same pattern accepted for the sibling batch-create path in #103472. Rebated onto main. |
9abbd5a to
5061b1a
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Superseded by #103472, now landed as The landed rewrite includes this bounded Google batch-upload error path, plus shared bounded JSONL handling, structured/redacted diagnostics, full Google upload/create/poll/download lifecycle coverage, and exact-head CI proof. Thank you @ZOOWH for identifying and proving the original gap. If a distinct remaining case reproduces on current main, please open a focused report with the endpoint behavior and exact response shape. |
What Problem This Solves
submitGeminiBatch()reads the full file-upload error response body viafileRes.text()on non-OK upload failures with no size limit.Why This Change Was Made
Replace the unbounded
fileRes.text()withassertOkOrThrowProviderError()—the canonical bounded provider error helper — so error body consumption is
capped at 16 KiB and structured error metadata is preserved.
User Impact
Before: unbounded error body read, potential memory exhaustion on large
error responses
After: bounded at 16 KiB via
assertOkOrThrowProviderErrorEvidence
Branch:
fix/google-embedding-error-body-file| Base:upstream/mainReal behavior proof
Loopback proof: a local HTTP server streams a 4 MiB 503 JSON error response
on the upload endpoint.
assertOkOrThrowProviderError(the exact helper usedin the fix) reads at most 16 KiB, cancels the stream, and throws a structured
ProviderHttpError:Regression tests
Diff summary
What was not tested: live Google API integration (blocked by network proxy).