Repository navigation
feat(browser): support Lightpanda connection-scoped CDP replies - #154342
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 21, 2026, 11:43 PM ET / September 22, 2026, 03:43 UTC (Revision 4). ClawSweeper reviewWhat this changesAdds an opt-in browser transport adapter that restores missing Lightpanda reply routing and page identity, hides its synthetic startup tab, and tests connection-local cleanup. Merge readiness✅ Ready for maintainer review Keep open as useful, accepted work. The recorded maintainer acceptance resolves the previous scope blocker, and this review found no actionable correctness or security defects. Neither current main nor the latest release contains the adapter. Priority: P2 Review scores
Verification
How this fits togetherThe browser plugin connects OpenClaw’s browser operations to an engine through Playwright and the Chrome DevTools Protocol. This adapter translates Lightpanda-specific messages before Playwright uses them to identify and control pages. flowchart LR
A[Browser operations] --> B[Playwright transport]
B --> C{Explicit Lightpanda selection}
C -->|Yes| D[Connection-local adapter]
C -->|No| E[Unmodified protocol messages]
D --> F[Browser engine]
E --> F
F --> D
D --> G[Correlated replies and real page targets]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +95, Tests +142. Total +237 across 3 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep protocol normalization in the existing browser transport, with activation and capability restrictions owned by the companion profile layer. Do we have a high-confidence way to reproduce the issue? Not applicable as an existing supported-feature bug: this adds experimental engine compatibility. The underlying mismatch is independently supported by the pinned Lightpanda and Playwright sources; no runtime reproduction was executed here. Is this the best way to solve the issue? Yes. A narrowly selected adapter at the existing transport boundary addresses the verified protocol mismatch without duplicating browser tools, changing Chromium defaults, or patching dependencies. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 25c6dd5e3f7e. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (3 earlier review cycles) |
d56601f to
2e79415
Compare
|
@clawsweeper re-review Maintainer decision: I accept this opt-in experimental Lightpanda transport prerequisite as part of the explicitly requested eight-PR browser stack. The companion profile layer owns activation and its deliberately limited semantic-only capabilities; this does not authorize Chromium-default changes or unsupported secondary-session Runtime behavior. The current exact head is Please refresh the completed review for this unchanged head. No autofix, rebase, or automerge is requested. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Merged via squash.
|
* commit '80b9608a25e191a17e1466d750c2f76a38a38507': fix(tooling): declare tsx CLI shim exports test(gateway): reuse session PR access state fixtures (#155626) test(heartbeat): await wake registration before advancing coalescing time refactor(status): share plugin health section assembly (#155390) fix: CLI and MCP tool completions skip plugin hooks (#155206) fix(update): preserve failures and retain running worker code (#153764) fix(sqlite): drain idle coordinators at lifecycle teardown fix(test): prepare SQLite compile-cache probes before launch fix(test): preserve owned compiler caches in Vitest workers fix(ios): assistant files are not downloadable in chat (#155195) fix(heartbeat): avoid timeouts for busy scheduled polls (#148333) test(gateway): hold SSH approval until pending assertions finish test(update): cover launcher permission rollback on Linux (#155615) fix(edit): avoid duplicate replacements from legacy arguments (#155513) feat(browser): support Lightpanda connection-scoped CDP replies (#154342) improve(ci): speed up compatible Control UI tests with Bun (#154585) test(gateway): prepare remaining approval fixtures before requests (#155589) fix(doctor): exclude retained agents from automatic session import
…claw#154342) Co-authored-by: Vincent Koc <[email protected]>
Related: #154341
What Problem This Solves
Lightpanda 0.4.1's partial CDP session routing is incompatible with OpenClaw's tab identity reads, preventing it from serving as a lightweight semantic browser.
User Impact
Stack 1/8 adds an opt-in transport adapter; Chromium defaults and existing profiles are unchanged. The following PR provides the selectable browser profile, and the deployment PR provides portable deployment and comparative benchmarks.
Why This Change Was Made
The browser plugin already owns CDP transport. For explicit Lightpanda connections only, normalize three observed Target reply omissions and suppress its synthetic startup page. Connection-local correlation is bounded and cleared on disconnect. No action replay, dependency patch, new tool, or engine auto-detection is introduced.
This intentionally does not fix Lightpanda's secondary-session Runtime defect. The profile PR exposes only the verified AI snapshot/ARIA-ref path and rejects native/scoped snapshots.
Evidence
git diff --checkpass.Experimental opt-in capability, not production parity. No merge or live default-browser change is requested.
Premerge preparation — 2026-09-21
Current source head:
2e79415c49dabb77c8ccb2854ade24a600afe58b. Ready for review/CI, not merged or deployed.Transport implementation unchanged; inherited canonical tooling fixes by rebasing onto current main.
The stack is rebased onto
72c2cf7c2faaa8994cb207e0ef4797d0a8bd834bto incorporate canonical fixes for the two observed tooling timeouts (not an unrelated retry): #154627, #154509, #154335, #154345 and #154567. The actual affected tooling tests now pass 32/32 in 129.99s. Runtime-proved combined sourceb9085a3475f2af46a9990e5986e87978719bb9fepasses extension types, Madge and config-doc checks; 47,508 tracked entries match the remote proof snapshot with zero mismatches.Before rebasing, the scoped CI repairs passed 156 Docker tests, 56 Chrome/boundary tests, and the 30 affected navigation tests, plus Knip, line-cap, import boundaries, temporary-path/raw-fetch guards, Madge, config docs and formatting. Independent final scoped review is clean. Rebased checks continue on the exact heads; older results remain bound to their measured sources.
A real final-source native-spawn benchmark smoke passes startup, temporary-root handling, the public import path, navigation, snapshot, typing/click, wait/text and exactly-once submission (cold task plus one warm task, Chromium headless shell 153.0.8010.12, Linux amd64/Node24.19.0). This is a behavior smoke, not a replacement performance benchmark.
The earlier complete application image at
07cce573cdf01b1146e677e6ea865ef3eb954955passed its build, unchanged default Playwright upgrade script, full-Chromium channel sibling, and packaged Gateway/browser start → navigate → snapshot → stop with Gateway exit0. That image is explicitly bound to its earlier source. The rebased complete application image atb9085a3475f2af46a9990e5986e87978719bb9fealso passed: full unmodified image build244.381s; unchanged default Playwright script11.483s; full-Chromium channel sibling1.953s; packaged Gateway/browser lifecycle18.971s. Image IDsha256:a50fa9eb0e34302e54b2ee2f51ae34b083d608c8160278430df6dde424ba97ad. All47,508 tracked entries matched before and after. The task-only daemon stopped cleanly with zero containers.The final combined head
c6198e521533e350d0222c884922e5935e803b1cdiffers from this measured image source only by two truthfulSAFETYcomments documenting existing non-null-object guards (PR02 route boundary and PR03 benchmark). Diff inspection and TypeScript transpilation with comments removed prove identical emitted JavaScript. The image is not relabeled as built from the later comment-only SHA. Full assertion/max-lines ratchets and plugin inventory pass without baseline changes.Normal hosted CI is active on the corrected heads. Scanner input qualification is separate from approval: the inherited synthetic status-redaction fixture still needs trusted ClawSweeper policy-owner qualification; the literal is preserved and no gate is bypassed. No skipped, blocked, pending, failed, or canceled run is counted as passing. Experimental opt-in Lightpanda/config-contract maintainer acceptance and prerequisite-first landing remain review decisions.
Review order
Land prerequisites first; each upper PR targets the preceding branch. No merge or deployment has been performed.