Repository navigation
fix(qa-lab): credential lease requests fail on oversized Convex broker responses - #98619
Conversation
738c52f to
9284678
Compare
9284678 to
674b0dd
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 1, 2026, 10:22 AM ET / 14:22 UTC. Summary PR surface: Source +11, Tests +123. Total +134 across 2 files. Reproducibility: yes. Current main reads 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:
Next step before merge
Security Review detailsBest possible solution: Land this narrow bounded-read fix through normal maintainer review, keeping official chunked credential payload hydration on its configured payload cap. Do we have a high-confidence way to reproduce the issue? Yes. Current main reads Is this the best way to solve the issue? Yes. This is the best fix shape: it applies the cap at the shared credential lease boundary, reuses the existing SDK bounded reader, and avoids duplicating per-transport or local stream-reading logic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ce4a259485f2. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +11, Tests +123. Total +134 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
|
674b0dd to
d3a59de
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
What Problem This Solves
Fixes an issue where QA-lab live transports could read an unbounded Convex credential broker response body before parsing broker errors. A malformed or hostile broker failure could force Slack, Telegram, WhatsApp, and Discord live credential acquisition, release, or heartbeat paths to buffer far more text than the broker contract needs.
Why This Change Was Made
The shared credential lease helper now reads Convex broker responses through OpenClaw's bounded provider HTTP reader. Ordinary acquire, release, and heartbeat responses use a 1 MiB ceiling, while chunk hydration keeps using the existing configured payload ceiling so large credential payloads continue to travel through the broker's chunk marker path.
User Impact
QA-lab live transports now fail cleanly when the shared Convex broker returns an oversized response body. Normal small broker responses and chunked credential payload hydration continue to work as before.
Evidence
postConvexBroker()used rawresponse.text()for every Convex broker response, so a non-JSON or error response could be fully materialized before status handling.__openclawQaCredentialPayloadChunksV1markers plus/payload-chunkrecords once the serialized payload spans multiple 256,000-character chunks, so ordinary acquire/release/heartbeat responses do not need the 64 MiB payload ceiling.node --import tsx --input-type=modulewith a loopbacknode:httpbroker that streamed a 4 MiB HTTP 500 response through the realfetchpath intoacquireQaCredentialLease():node scripts/run-vitest.mjs extensions/qa-lab/src/live-transports/shared/credential-lease.runtime.test.tspassed, 1 file / 19 tests.upstream/mainand verified the formerly failing temp-dir route now includessrc/transcripts/store.test.tswithnode --input-type=moduleimportingbuildVitestRunPlans()fromscripts/test-projects.test-support.mjs.git diff --check upstream/main...HEADpassed.pnpm buildpassed.AI-assisted: yes.