fix(google-meet): bound Drive document export reads to prevent OOM#97620
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 28, 2026, 10:51 PM ET / 02:51 UTC. Summary PR surface: Source +1, Tests +77. Total +78 across 2 files. Reproducibility: yes. from source inspection: current main reaches Review metrics: 1 noteworthy metric.
Stored data model 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: Merge the shared bounded-reader fix only after contributor-supplied redacted real runtime proof and maintainer acceptance that oversized Drive document bodies should surface as warnings. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main reaches Is this the best way to solve the issue? Yes, using the existing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a202dd0faf56. Label changesLabel justifications:
Evidence reviewedPR surface: Source +1, Tests +77. Total +78 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
|
…penclaw#97620) * fix(google-meet): bound Drive document export reads to prevent OOM * test(google-meet): return full guarded fetch result --------- Co-authored-by: Vincent Koc <[email protected]>
…penclaw#97620) * fix(google-meet): bound Drive document export reads to prevent OOM * test(google-meet): return full guarded fetch result --------- Co-authored-by: Vincent Koc <[email protected]>
…penclaw#97620) * fix(google-meet): bound Drive document export reads to prevent OOM * test(google-meet): return full guarded fetch result --------- Co-authored-by: Vincent Koc <[email protected]>
…penclaw#97620) * fix(google-meet): bound Drive document export reads to prevent OOM * test(google-meet): return full guarded fetch result --------- Co-authored-by: Vincent Koc <[email protected]>
…penclaw#97620) * fix(google-meet): bound Drive document export reads to prevent OOM * test(google-meet): return full guarded fetch result --------- Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 2001b15)
…penclaw#97620) * fix(google-meet): bound Drive document export reads to prevent OOM * test(google-meet): return full guarded fetch result --------- Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 2001b15)
…penclaw#97620) * fix(google-meet): bound Drive document export reads to prevent OOM * test(google-meet): return full guarded fetch result --------- Co-authored-by: Vincent Koc <[email protected]> (cherry picked from commit 2001b15)
What Problem This Solves
Bounds the `exportGoogleDriveDocumentText` response in `extensions/google-meet/src/drive.ts` using `readProviderTextResponse`, capping at 16 MiB (fail-closed). Google Drive's files.export endpoint streams document text with no `Content-Length` header; without a cap, an attacker-controlled or unusually large document can exhaust heap.
Changed files: `extensions/google-meet/src/drive.ts` (1 line), `extensions/google-meet/src/drive.test.ts` (new)
Compatibility tradeoff: Export responses >16 MiB now throw instead of silently buffering. In practice, Drive API enforces export size limits server-side; legitimate documents will not exceed 16 MiB of plain text. Please confirm this cap is appropriate for your deployment.
Validation Evidence
Local terminal output (`node scripts/run-vitest.mjs run extensions/google-meet/src/drive.test.ts --reporter=verbose`):
```
RUN v4.1.8 /media/vdc/0668001470/workSpace/claw-campaign/openclaw
✓ |extensions| extensions/google-meet/src/drive.test.ts > exportGoogleDriveDocumentText bound > returns document text when response is within the 16 MiB cap 245ms
✓ |extensions| extensions/google-meet/src/drive.test.ts > exportGoogleDriveDocumentText bound > rejects with a size error when response exceeds 16 MiB cap (fail-closed) 48ms
✓ |extensions| extensions/google-meet/src/drive.test.ts > exportGoogleDriveDocumentText bound > negative-control: bare response.text() buffers the full oversized body (no protection) 73ms
✓ |extensions| extensions/google-meet/src/drive.test.ts > exportGoogleDriveDocumentText bound > mutation: reverted fix (bare response.text) does NOT reject over-cap body — fix is load-bearing 55ms
Test Files 1 passed (1)
Tests 4 passed (4)
Start at 12:12:28
Duration 3.08s (transform 1.77s, setup 461ms, import 1.87s, tests 428ms, environment 0ms)
```
Security & Privacy
No user data leaves the process. The cap is fail-closed: oversized responses are rejected rather than silently accepted. No new network calls added.
Compatibility
Single-file change to `extensions/google-meet/src/drive.ts`. `readProviderTextResponse` (from `openclaw/plugin-sdk/provider-http`) defaults to 16 MiB; the function signature of `exportGoogleDriveDocumentText` is unchanged, so no existing callers are affected.