Skip to content

fix: preflight browser proxy readiness - #1157

Closed
clawsweeper wants to merge 2 commits into
mainfrom
fix/1154-browser-proxy-preflight
Closed

clawsweeper wants to merge 2 commits into
mainfrom
fix/1154-browser-proxy-preflight

Conversation

@clawsweeper

@clawsweeper clawsweeper commented Aug 13, 2026 •

Copy link
Copy Markdown

Fixes #1154

Summary

  • Add one pure BrowserProxyReadiness contract for endpoint, SSH-forward, host reachability, and authentication states.
  • Preserve whether the endpoint came from an explicit override, managed SSH companion forward, or gateway-port fallback.
  • Run one authenticated, read-only GET / preflight before the first requested browser action and cache only a ready result.
  • Block the requested action with concrete repair guidance and keep browser-host failures separate from Gateway connection health.
  • Reuse readiness guidance in Command Center warnings and MCP/CLI/testing documentation.

Validation

  • git diff --check - passed before commit.
  • .agents/skills/autoreview/scripts/autoreview --mode local --stream-engine-output - final run clean with no actionable findings.
  • ./build.ps1 - not run: this Linux host has neither PowerShell nor the .NET SDK.
  • Shared, Tray, and WinNode CLI test projects - not run: .NET SDK unavailable.
  • First Windows CI test run on 5d0c0f76 reached the focused browser tests and exposed two guidance-copy regressions: missing literal authentication wording and missing gateway port + 2 provenance. Both are corrected on current head fe81645c; rerun is pending.

Focused coverage was added for endpoint provenance, readiness classifications, HTTP 401/403 handling, authenticated preflight ordering/fallback, cached readiness, authorization timeout, action timeout, and the real loopback HTTP route.

Real behavior proof

Not verified / blocked on this publication host:

  • local MCP tools/list and tools/call
  • gateway-mediated browser.proxy
  • current-head Command Center UI
  • native Windows build/test execution

The available OpenClaw remote-node route had no registered handler, so no connected Windows host was available. CI and a Windows current-head proof pass are required before merge.

Review

Rubber-duck/autoreview drove fixes for action-timeout classification, preflight/authorization timeout classification, HTTP 403 denial, and invalid explicit endpoints under SSH. The final exact-diff review was clean.

@clawsweeper

clawsweeper Bot commented Aug 13, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Aug 13, 2026
@clawsweeper

Copy link
Copy Markdown
Author

$clawsweeper-checkin

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 13, 2026
@clawsweeper

clawsweeper Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed August 24, 2026, 9:50 PM ET / August 25, 2026, 01:50 UTC.

ClawSweeper review

What this changes

Adds authenticated browser-control readiness preflight, guided blocked states, diagnostics, documentation, and focused tests before forwarding browser proxy actions.

Merge readiness

⛔ Blocked until real behavior proof is added - 4 items remain

Keep open. The PR is a focused implementation candidate for the linked browser-proxy readiness problem, but external current-head Windows/MCP or gateway proof is still required before merge.

Priority: P2
Reviewed head: fe81645cc6f1c3f86960e379d32c37d5e6e05793

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) Static review and focused coverage are solid, but missing real Windows behavior proof remains a merge gate.
Proof confidence 🧂 unranked krab (1/6) Needs real behavior proof before merge: Current-head real behavior proof is missing: the PR body explicitly reports Windows MCP, gateway-mediated, and Command Center proof as blocked. Attach redacted live output or diagnostics before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: Current-head real behavior proof is missing: the PR body explicitly reports Windows MCP, gateway-mediated, and Command Center proof as blocked. Attach redacted live output or diagnostics before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 4 items Preflight implementation: The proxy authorizes the resolved endpoint, runs an authenticated GET preflight, and forwards the requested action only after a ready result.
Focused behavior coverage: Tests cover authenticated preflight ordering, fallback authentication, cached readiness, timeout distinctions, and a real loopback HTTP round trip.
Current-main check: Current main does not contain the readiness contract or preflight code, so this work is not implemented there or in the latest release.
Findings None None.
Security None None.

Live Verification

Command: dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --filter FullyQualifiedName~BrowserProxy_ControlPortOverride_RealHttpRoundTripHitsOverridePort

Result: FAIL (failed) — execution before step 1 run: sh -lc pnpm install --ignore-scripts --frozen-lockfile failed: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-11.23.0.tgz

sh -lc pnpm install --ignore-scripts --frozen-lockfile failed: ! Corepack is about to download https://registry.npmjs.org/pnpm/-/pnpm-11.23.0.tgz

Assertions:

  • FAIL expect_output: Passed

How this fits together

Browser proxy forwards MCP or Gateway requests from the Windows node to a local browser-control host. The new preflight checks the resolved local endpoint and authentication before the requested browser operation, then returns repair guidance when that prerequisite is unavailable.

flowchart LR
A[MCP or Gateway browser request] --> B[Windows browser proxy]
B --> C[Resolve local control endpoint]
C --> D[Authenticated readiness preflight]
D -->|Ready| E[Forward requested browser action]
D -->|Blocked| F[Guided repair result]
F --> G[Command Center and documentation]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Current-head real behavior proof is missing: the PR body explicitly reports Windows MCP, gateway-mediated, and Command Center proof as blocked. Attach redacted live output or diagnostics before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - Existing browser-control hosts now receive a preliminary authenticated GET before the requested action, so compatibility with the supported host contract needs current-head proof.
  • Resolve merge risk (P1) - A false blocked classification can make browser actions unavailable despite a healthy Gateway connection.
  • Complete next step (P2) - No repair worker is needed because static review found no discrete patch defect; the remaining blocker is contributor-supplied real behavior proof.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Change footprint runtime +288, tests +268, docs +12 The implementation has substantial focused regression coverage relative to the runtime change.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #1154
Summary: This PR explicitly implements the browser-proxy readiness outcome tracked by the canonical issue; the stacked capability-readiness PR is adjacent work.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Prove the supported browser-host path (recommended)
    Before merge, attach redacted current-head Windows MCP or gateway evidence showing the preflight followed by a successful browser action and a guided blocked result.

Technical review

Best possible solution:

Retain the bounded readiness contract, then attach redacted current-head Windows MCP proof for one ready request and one guided blocked state before merge.

Do we have a high-confidence way to reproduce the issue?

No. The branch has a loopback HTTP test, but no current-head Windows MCP or gateway-mediated reproduction has been attached.

Is this the best way to solve the issue?

Yes, conditionally. A narrow local endpoint preflight is an appropriate boundary for this failure mode, provided the supported Windows runtime paths confirm it.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against ccd64bbb7d68.

Labels

Label justifications:

  • P2: This is a bounded browser-control reliability improvement without evidence of an emergency regression.
  • merge-risk: 🚨 compatibility: The added authenticated preflight changes the request sequence seen by existing browser-control hosts.
  • merge-risk: 🚨 availability: Incorrect readiness classification could block browser actions before their requested operation is sent.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Current-head real behavior proof is missing: the PR body explicitly reports Windows MCP, gateway-mediated, and Command Center proof as blocked. Attach redacted live output or diagnostics before merge. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

Likely related people:

  • Scott Hanselman: History attributes the local bridge and the password-auth, SSH-guidance, and auth-guidance changes to this area. (role: introduced browser proxy and later auth and SSH behavior; confidence: high; commits: ff923514afa1, df700140927f, 233034fcbf66; files: src/OpenClaw.Shared/Capabilities/BrowserProxyCapability.cs)
  • anagnorisis2peripeteia: The endpoint override used by the new provenance and loopback coverage dates to their browser.proxy commit. (role: introduced explicit browser-control endpoint override; confidence: high; commits: a2e2773bb935; files: src/OpenClaw.Shared/BrowserControlEndpoint.cs)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach redacted current-head MCP or gateway output for a ready preflight followed by an action.
  • Attach a blocked-state result that shows the repair guidance without private endpoints or tokens.

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-13T20:27:36.691Z sha fe81645 :: needs real behavior proof before merge. :: none

@clawsweeper

Copy link
Copy Markdown
Author

ClawSweeper feedback follow-up (current head fe81645cc6f1c3f86960e379d32c37d5e6e05793):

  • Exact-head Windows CI is green, including test, both architecture builds, and all three E2E shards.
  • I retried native proof on 2026-08-15 using Crabbox AWS Windows desktop lease cbx_129687b80dc6 (violet-crab). The exact head synced successfully, but the stock image lacks .NET 10, Node LTS, Windows SDK 26100, and WebView2. Repository recovery via scripts/setup-dev.ps1 then stopped because App Installer / winget is absent.
  • Azure provisioning also failed before lease creation because the available low-priority core quota is 3 and the Windows class requires 16.
  • No operator-connected Windows node was available through this session.

So the requested live MCP, gateway-mediated browser.proxy, and Command Center proof is still not verified. This PR remains draft; I am not substituting CI for the real-behavior proof ClawSweeper requested.

@shanselman

Copy link
Copy Markdown
Collaborator

Closing this stale draft rather than landing 76-commit-behind browser-readiness code without current MCP, gateway, and UI proof. The underlying need remains preserved in #1154 and should be implemented as a fresh, narrowly validated change if still applicable.

@shanselman shanselman closed this Sep 4, 2026
@shanselman shanselman removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 4, 2026
@shanselman
shanselman deleted the fix/1154-browser-proxy-preflight branch September 7, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Browser proxy should be ready-to-use or visibly blocked with a guided repair path

2 participants