Repository navigation
feat(browser): support lightweight Docker browser installs - #154608
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. What this changesThis PR adds selective Docker Chromium installs, supports them in Diffs rendering, skips Xvfb for headless sandboxes, and improves Lightpanda readiness and shutdown. Example: An operator builds with OPENCLAW_INSTALL_BROWSER=chromium and requests a Diffs PDF.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review The previous resource-limit blocker is fixed, and no introduced production defect was found. This maintainer-approved packaging improvement remains useful; exact-head CI is still pending. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherDocker build arguments select installed browser binaries; the Diffs renderer discovers and launches Chromium, while the sandbox entrypoint and optional Lightpanda Compose service manage their respective browser processes. flowchart TD
A[Docker build selector] --> B[Playwright installer]
B --> C[Installed Chromium binaries]
C --> D[Diffs browser discovery]
D --> E[PNG and PDF artifacts]
F[Sandbox entrypoint] --> C
G[Lightpanda Compose service] --> H[Browser plugin CDP adapter]
Technical reviewBest possible solution: Retain the existing installer, renderer discovery, and process owners with selectable distributions and operator-controlled sidecar capacity. Do we have a high-confidence way to reproduce the issue? Source confirms that main installs both distributions for a nonempty build argument and that Diffs lacks the managed full-browser candidate; no target code was executed during this review. Is this the best way to solve the issue? The change uses Playwright's supported selectors and extends existing discovery and lifecycle owners without adding a competing manager or persisted state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bfdc5f96a7c9. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +9, Tests +37, Docs +64, Other +31. Total +141 across 11 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (19 earlier review cycles; latest 8 shown)
Reviewed October 24, 2026, 3:13 AM ET / 07:13 UTC (Revision 20). |
c18bc0a to
89730fc
Compare
07cce57 to
b9085a3
Compare
89730fc to
4428666
Compare
b9085a3 to
c6198e5
Compare
4428666 to
c0baa35
Compare
Baseline-Refresh: 4b0d1b4a4eb9240b7be7f13bcd7f1e64571edb65
Baseline-Refresh: 6e1a17a347f7a57b21f36f75a85fb46ca702f5d7
Preserve the current shared browser discovery helper and renderer fixtures after baseline integration. Leave Lightpanda resource ceilings with operators and keep selected-image proof wording version neutral.
|
@clawsweeper re-review Please review exact head |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
Related: #154341
Builds on #154607.
What Problem This Solves
Docker operators cannot select a single Chromium distribution without losing Diffs PNG/PDF rendering, and the optional Lightpanda sidecar needs connection readiness and predictable shutdown.
User Impact
Operators can install full Chromium or headless shell explicitly;
OPENCLAW_INSTALL_BROWSER=1keeps both. Headless sandbox startup skips Xvfb. Lightpanda uses a WebSocket healthcheck and graceful SIGTERM, with CPU, memory, and PID limits left to operator configuration.Why This Change Was Made
Browser selection stays with Playwright and the shared renderer discovery owner. The change preserves current Node, Playwright, and Lightpanda 1.0.2 image pins; documents the selected image's license boundary; and removes unconditional sidecar resource ceilings and their extra sample knobs. Existing unrestricted sidecar capacity is preserved; no stored-data shape changes.
Evidence
HEADLESS=1and noVNC disabled reached CDP without Xvfb and exited through its native TERM cleanup.1contains both Chromium distributions and FFmpeg; an ordinary Playwright launch used headless shell, performed a real page action, and closed cleanly.Known follow-up: sandbox headed Xvfb readiness barrier. The unchanged headed path starts Xvfb asynchronously and immediately launches Chromium. The direct Chrome-for-Testing fixture reached Chromium before display readiness and failed; this is not a headed-runtime pass. No sleeps, timeout changes, or startup fallback were added.
The controller ran on macOS arm64; container results are Linux arm64, not x86 coverage. Historical performance numbers are not current-image proof, and this PR makes no new RSS or speed claim.
Review note: the Dockerfile string assertions are structural coverage, not proof of selector behavior; the three built images and real rendering/launch checks provide that proof. A separate base-red/head-green replay was not recorded. The existing focused assertions are retained in this scoped change.