Repository navigation
test(cua): trim generic browser transport replays - #124011
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper re-review The initial review lease expired without publishing. Please review exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 1:20 AM ET / 05:20 UTC. ClawSweeper reviewWhat this changesThe PR deletes browser-specific direct-SDK and MCP transport test replays, retaining generic session-injection coverage in existing CUA tests. Merge readinessKeep open. No blocking findings: the patch removes implementation-coupled browser-name replays while retaining generic transport/session coverage and browser-action mapping coverage. The item is maintainer-owned and should follow normal maintainer review. Priority: P3 Review scores
Verification
How this fits togetherThe CUA computer plugin sends computer-use actions through either a direct native SDK session or an MCP proxy session. Both transports forward generic tool names and arguments, while browser actions map OpenClaw action inputs into those generic calls. flowchart LR
A[Computer-use action] --> B[CUA command provider]
B --> C{Platform transport}
C --> D[Direct SDK session]
C --> E[MCP proxy session]
D --> F[Generic tool call]
E --> F
G[Browser action mapping] --> F
F --> H[Normalized result]
Before merge
Agent review detailsSecurityNone. PR surfaceTests -53. Total -53 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep one generic forwarding/session test for each transport and keep browser-specific names and arguments asserted at the browser-action owner boundary. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR removes redundant test coverage and does not report a user-facing defect. Is this the best way to solve the issue? Yes. The retained generic transport tests protect session injection, while browser-actions.test.ts remains the canonical place to verify browser-specific mapping. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5a5bf4d5241a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Land-ready proof for
Production delta: 0. Tests: +3/-56, net -53. No behavior, docs, config, schema, protocol, or changelog change. |
|
Merged via squash.
|
What Problem This Solves
Browser-action work added
browser_navigatespot checks to direct and MCP transport tests even though both transports route arbitrary tool names through the same genericcallToolpath. Those checks duplicated browser-specific mapping coverage and would require maintenance for transport-neutral browser action changes.Why This Change Was Made
The direct browser-name replay is deleted. The MCP transport test drops its browser-only response, invocation, and request assertion; the only distinct invariant—OpenClaw session injection—moves to the existing generic
list_windowspending-call test. Browser action names and arguments remain fully covered bybrowser-actions.test.ts.User Impact
No behavior change. Direct SDK and MCP proxy transports still start the correct session scope, inject the session identifier, normalize structured results, enforce pending-call bounds, and tear down on cancellation.
AI-assisted: yes.
Evidence
driver-client.test.ts,mcp-driver-client.test.ts, andbrowser-actions.test.ts— 3 files, 14 tests passed.node scripts/check-changed.mjs -- extensions/cua-computer/src/driver-client.test.ts extensions/cua-computer/src/mcp-driver-client.test.ts— extensionTests gate passed through the documented trusted-source local fallback after no Crabbox/Testbox provider was ready; extension test typecheck and lint passed.git diff --checkpassed.