Repository navigation
refactor(exa): test response readers through tool execution - #140572
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 9:25 PM ET / September 7, 2026, 01:25 UTC. ClawSweeper reviewWhat this changesThe Exa web-search plugin tests response handling through tool execution and shared streaming fixtures, removing a private testing export and test-only size override. Merge readiness✅ Ready for maintainer review This remains a useful, focused cleanup absent from current main. No introduced correctness defect was found, and the maintainer-authored, protected PR should remain in the normal review flow. Priority: P3 Review scores
Verification
How this fits togetherThe Exa plugin turns web-search tool requests into Exa API calls and returns normalized search results. Its response readers enforce body-size limits and report malformed content or bounded upstream errors. flowchart TD
A[Search tool request] --> B[Exa plugin]
B --> C[Guarded API request]
C --> D{Response status}
D -->|Success| E[Bounded JSON reader]
D -->|Error| F[Bounded error reader]
E --> G[Normalized search results]
F --> H[Provider error]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -9, Tests +6. Total -3 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep response-reader coverage at the existing tool boundary while preserving production limits, decoding, cancellation, and error behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: this refactors existing regression coverage rather than reporting a runtime defect; the private testing seam is directly visible on main. Is this the best way to solve the issue? Yes: exercising the existing tool entrypoint removes test-only production surface while retaining the reader invariants and checking the actual production cap. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b38d791b45de. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
…137098 * commit '8a540c252002878f3c3e9d8dfb837b83c8602a78': (2210 commits) perf(plugins): keep bundled catalog lookups lightweight (#140597) refactor: streamline skills JSON serialization (#140581) fix(feishu): expand quoted merged-forward messages (#136231) fix(talk): keep opaque realtime routes out of public config (#129144) fix(ci): avoid Linux packaging on pull requests (#140589) fix(usage): release completed request payloads (#140588) fix(tooling): omit Trae machine squash credit (#140562) fix(ui): stop catalog paging in hidden tabs (#140583) fix(portals): reach IPv6 loopback with IPv4-only localhost records (#140580) fix(transcripts): preserve fixed and legacy capture history (#140563) fix(ui): prevent Talk E2E audio capture stalls (#138803) fix(media): release completed document source buffers (#140561) fix(anthropic): preserve resumed CLI caches across Git changes (#140566) chore(ui): refresh control ui locales (#140586) fix(ui): keep usage exports bound to their session instance (#140573) refactor(exa): test response readers through tool execution (#140572) fix(macos): omit incompatible worker binaries from app bundles (#140557) fix: avoid retaining discarded tool output (#140570) refactor(gateway): share placement move matching (#140569) fix(gateway): preserve child turns during systemd drain (#140568) ... # Conflicts: # .agents/skills/release-openclaw-maintainer/SKILL.md # docs/reference/RELEASING.md
What Problem This Solves
Exa's response-reader tests reach private helpers through a production testing export and use a test-only response-size override. That setup misses changes to the actual production size limit and duplicates response fixtures already shared by other tests.
Why This Change Was Made
Move the same five reader-test subjects through the provider tool and mocked fetch boundary. Reuse the shared streaming and cancellation fixtures, remove the private testing export, and remove the size override that production never passes. The default 16 MiB cap and reader implementations remain in place.
User Impact
No intended runtime or public API behavior change. Tests now protect actual request execution, including fatal UTF-8 decoding, exact successful content, the production response cap, early cancellation, and bounded error details. Existing routing, authentication, cache, and cancellation tests remain.
Evidence
response.text()checks.