fix(plugins): bound OpenAI-compatible embeddings JSON response reads#96253
fix(plugins): bound OpenAI-compatible embeddings JSON response reads#96253cxbAsDev wants to merge 0 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 24, 2026, 1:51 AM ET / 05:51 UTC. Summary PR surface: Source -2. Total -2 across 1 file. Reproducibility: no. high-confidence runtime reproduction was run in this read-only review. Source inspection on current main shows the success path still calls 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: Land the narrow shared-reader change after contributor real behavior proof and explicit maintainer acceptance of the shared 16 MiB provider JSON cap. Do we have a high-confidence way to reproduce the issue? No high-confidence runtime reproduction was run in this read-only review. Source inspection on current main shows the success path still calls Is this the best way to solve the issue? Yes for code shape: reusing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fd66b44f5e2c. Label changesLabel justifications:
Evidence reviewedPR surface: Source -2. Total -2 across 1 file. 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
|
b126d8b to
d8d178b
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
d8d178b to
87db23e
Compare
Summary
Replace the custom
readJsonResponsehelper with the sharedreadProviderJsonResponsefromprovider-http-errors.ts. The shared reader already includes the standard 16 MB bounded read viareadResponseWithLimit, eliminating a duplicate bounded-read pattern and keeping the embeddings provider aligned with provider HTTP guardrails.Real behavior proof (required for external PRs)
Behavior addressed: Custom unbounded
response.json()replaced with shared boundedreadProviderJsonResponsefromprovider-http-errors.ts.Real environment tested: Linux, Node 24, OpenClaw main @ 0671c08
Exact steps or command run after fix:
Evidence after fix:
The shared
readProviderJsonResponseusesreadResponseWithLimitwith the standard 16 MBPROVIDER_JSON_RESPONSE_MAX_BYTEScap and wraps malformed JSON with the caller's label. This avoids duplicating the bounded-read pattern.Observed result after fix: Embeddings API responses use the same bounded JSON read path as all other provider HTTP clients. No custom bounded-read implementation remains.
What was not tested: A live embedding API call against a real OpenAI-compatible embeddings server was not tested.
Risk
Low. The shared reader is the same utility used by all other provider JSON reads. The 16 MB cap is the standard provider convention. Error wrapping is preserved through the
EMBEDDINGS_LABELconstant.