Skip to content

test(cua): trim generic browser transport replays - #124011

Merged
steipete merged 1 commit into
mainfrom
test/trim-cua-transport-spot-checks
Aug 15, 2026
Merged

steipete merged 1 commit into
mainfrom
test/trim-cua-transport-spot-checks

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Browser-action work added browser_navigate spot checks to direct and MCP transport tests even though both transports route arbitrary tool names through the same generic callTool path. 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_windows pending-call test. Browser action names and arguments remain fully covered by browser-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, and browser-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 --check passed.
  • Fresh structured autoreview reported no accepted/actionable findings.
  • Production delta: 0. Tests: +3/-56, net -53 lines.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 15, 2026 04:38
@steipete

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The initial review lease expired without publishing. Please review exact head 8884e4956c7e73da4a6647477b15c16194eb649c; exact-head CI is green and the PR only removes browser-name replays from generic transports while retaining generic session injection and browser-action owner coverage.

@clawsweeper

clawsweeper Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 1:20 AM ET / 05:20 UTC.

ClawSweeper review

What this changes

The PR deletes browser-specific direct-SDK and MCP transport test replays, retaining generic session-injection coverage in existing CUA tests.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep 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
Reviewed head: 8884e4956c7e73da4a6647477b15c16194eb649c

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, net-negative test cleanup with retained owner-boundary coverage and no correctness findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-owned test-only cleanup does not alter runtime behavior; exact-head CI and owner-boundary source coverage are the applicable proof.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-owned test-only cleanup does not alter runtime behavior; exact-head CI and owner-boundary source coverage are the applicable proof.
Evidence reviewed 6 items Direct transport is generic: The direct session forwards the supplied tool name unchanged and adds only the OpenClaw session field; it has no browser-name branch.
MCP transport is generic: The MCP session likewise forwards an arbitrary tool name with session injection, so the retained generic pending-call case covers that transport invariant.
Retained generic coverage: The direct test still verifies window-scoped startup and session injection for a generic tool, and the MCP pending-call test now asserts injected session data on a generic call.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

  • Complete next step (P2) - No repair lane is needed: this is a protected maintainer-owned cleanup with no actionable defect.
Agent review details

Security

None.

PR surface

Tests -53. Total -53 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 3 56 -53
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 3 56 -53

Review metrics

Metric Value Why it matters
Production versus test delta production 0; tests +3/-56 The change reduces duplicate test maintenance without altering runtime, configuration, or dependency surfaces.

Stored data model

Persistent data-model change detected: serialized state: extensions/cua-computer/src/driver-client.test.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best 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.

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: This is a low-risk test-maintenance cleanup with no user-facing behavior change.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-owned test-only cleanup does not alter runtime behavior; exact-head CI and owner-boundary source coverage are the applicable proof.

Evidence

What I checked:

Likely related people:

  • steipete: Peter Steinberger authored the browser-action family, recent CUA driver work, and this focused test cleanup. (role: feature author and recent area contributor; confidence: high; commits: aa7a2fbe0dda, a32a7ae9af96, 8884e4956c7e; files: extensions/cua-computer/src/browser-actions.ts, extensions/cua-computer/src/browser-actions.test.ts, extensions/cua-computer/src/driver-client.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-15T05:14:47.906Z sha 8884e49 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 15, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 8884e4956c7e73da4a6647477b15c16194eb649c:

  • Direct driver, MCP driver, and browser action owners: 3 files, 14 tests passed.
  • extensionTests changed gate passed through the documented trusted-source local fallback because no Crabbox/Testbox provider was ready; extension test typecheck and lint passed.
  • git diff --check passed.
  • Fresh structured autoreview reported no accepted/actionable findings.
  • Exact-head CI passed: https://github.com/openclaw/openclaw/actions/runs/31864942759
  • Native OPENCLAW_TESTBOX=1 scripts/pr prepare-run 124011 passed, reusing hosted exact-head gates; no Testbox lease was required.
  • ClawSweeper has no findings and confirms browser semantics remain at the action owner while generic session/transport coverage remains.

Production delta: 0. Tests: +3/-56, net -53. No behavior, docs, config, schema, protocol, or changelog change.

@steipete
steipete merged commit 2e90d67 into main Aug 15, 2026
175 checks passed
@steipete
steipete deleted the test/trim-cua-transport-spot-checks branch August 15, 2026 05:24
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. plugin: cua-computer rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant