Repository navigation
fix(browser): connect managed CDP through the correct proxy endpoint - #114546
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 27, 2026, 7:49 AM ET / 11:49 UTC. ClawSweeper reviewWhat this changesThe branch wraps Playwright’s managed-browser CDP connection in the existing exact managed-proxy bypass and adds regression tests for discovered and direct CDP endpoints. Merge readiness⛔ Blocked until real behavior proof from a real setup is added - 4 items remain Keep this PR open for maintainer handling: the patch is a focused, plausible repair that reuses the existing exact-URL managed-proxy bypass during Playwright’s CDP handshake, but the external-PR gate still needs redacted after-fix evidence from a real managed browser session with the proxy enabled. Likely related people: widingmarcus-cyber (high confidence for the earlier CDP proxy-bypass work) and vincentkoc (medium confidence for adjacent browser/CDP maintenance). Priority: P1 Review scores
Verification
How this fits togetherOpenClaw’s browser plugin discovers a managed Chrome DevTools Protocol endpoint and connects Playwright to it for snapshot and page operations. The connection must bypass the operator-configured forward proxy only for the local CDP target, while ordinary browser traffic retains its existing routing policy. flowchart LR
A[Browser snapshot request] --> B[Managed Chrome endpoint]
B --> C[CDP endpoint validation]
C --> D[Scoped proxy bypasses]
D --> E[Playwright CDP handshake]
E --> F[Browser session and snapshot]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +2, Tests +93. Total +95 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the shared scoped-bypass design, then attach redacted proof that Do we have a high-confidence way to reproduce the issue? No live current-main reproduction was independently run in this read-only review, but the source path is high-confidence: the discovered loopback WebSocket reaches Playwright without the exact managed-proxy registration that sibling CDP operations use. Is this the best way to solve the issue? Yes. Reusing the existing exact-target managed-proxy scope around the existing loopback NO_PROXY scope is the narrowest maintainable repair; it avoids adding a setting, fallback, or parallel proxy policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 91f04499f53f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Managed browser sessions can route the local Chrome DevTools Protocol handshake through an HTTP forward proxy, causing real page snapshot requests to fail.
Why This Change Was Made
Keep the existing exact managed-CDP proxy bypass active throughout Playwright's asynchronous handshake. Ordinary HTTP remains proxied and unrelated loopback requests remain blocked.
User Impact
A managed browser behind an enabled proxy can open a real page and return an interactive snapshot without relaxing global network or proxy policy.
Evidence
Real end-to-end proof
Exact commit
ec3e8ca7292fbb85296667b2a58c4803aa626c12; trusted 16-vCPU Blacksmith runner, productionpnpm build, actual Chrome 149, actual OpenClaw gateway, and an instrumented real HTTP forward proxy.The actual forward proxy observed ordinary outbound traffic, never observed a CDP request, and continued blocking a separate loopback canary. The isolated browser and Testbox were stopped. The Actions runner may finish its cleanup asynchronously; the authoritative scenario result is the successful delegated-run timing JSON.
AI-assisted. Source, dependency contract, regression proof, exact CI, and actual managed-browser behavior were independently reviewed.
Fixes #105306