Repository navigation
feat(browser): verify Chromium headless shell across platforms - #154396
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 23, 2026, 12:09 PM ET / 16:09 UTC (Revision 8). ClawSweeper reviewWhat this changesAdds a Chromium headless-shell benchmark option, separate distribution reporting and scratch directories, and installation guidance. Merge readiness✅ Ready for maintainer review Keep open: the benchmark improvement remains useful and absent from current main. No actionable defects remain, and the previous prerequisite-and-retarget blocker is resolved. Priority: P3 Review scores
Verification
How this fits togetherThe browser plugin’s optional benchmark sends synthetic navigation and form tasks through OpenClaw’s real browser routes. It reports task success, timing, and sampled memory for an explicitly selected browser executable or external endpoint. flowchart TD
A[Selected binary or endpoint] --> B[Benchmark options]
B --> C[Isolated browser workspace]
C --> D[OpenClaw browser routes]
E[Synthetic form tasks] --> D
D --> F[Chromium or Lightpanda]
F --> G[Success and measurement report]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +7, Tests +4, Docs +203, Other +2. Total +216 across 5 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 browser comparisons in the existing opt-in benchmark, with explicit distribution labels and accurately bounded platform measurements. Do we have a high-confidence way to reproduce the issue? Not applicable: this adds an optional benchmark capability rather than fixing a reported product defect; recorded real-route runs demonstrate its intended behavior. Is this the best way to solve the issue? Yes: extending the existing benchmark preserves one Chromium execution owner while adding meaningful distribution reporting and isolated comparison directories. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 05996479d818. 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 (7 earlier review cycles)
|
3fc7d33 to
d94612e
Compare
d8f53eb to
a683367
Compare
a683367 to
456c7ba
Compare
989ca28 to
cdc60c8
Compare
456c7ba to
8ba9b89
Compare
cdc60c8 to
8ec741e
Compare
8ba9b89 to
aee1cdc
Compare
|
@clawsweeper re-review Please review the current exact head |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
aee1cdc to
4a9f390
Compare
8ec741e to
72690a2
Compare
|
@clawsweeper re-review Please review the current exact head |
|
🦞👀 Re-review progress:
|
72690a2 to
422826d
Compare
4a9f390 to
7c67530
Compare
Preserve the reviewed browser-stack change while incorporating the landed prerequisites. Original revision: 8f41f08a1e92c079ad19ab9f3b849be26cf1559b
Preserve the reviewed browser-stack change while incorporating the landed prerequisites. Original revision: b11dd7173db731e026b7abae9d3b4064ac30d300
8f41f08 to
455a42f
Compare
b11dd71 to
4b927d5
Compare
Supply the required empty policyConfig in the placement lifecycle read fixture. This repairs the inherited check-test-types-core-4 failure while keeping the production browser-stack changes unchanged.
…tweight-browser-05-shell-verification
|
Merged via squash.
|
…law#154396) * docs(browser): audit engine licenses and non-AGPL alternatives Preserve the reviewed browser-stack change while incorporating the landed prerequisites. Original revision: 8f41f08a1e92c079ad19ab9f3b849be26cf1559b * feat(browser): verify Chromium headless shell across platforms Preserve the reviewed browser-stack change while incorporating the landed prerequisites. Original revision: b11dd7173db731e026b7abae9d3b4064ac30d300 * test(gateway): complete prepared placement read fixture Supply the required empty policyConfig in the placement lifecycle read fixture. This repairs the inherited check-test-types-core-4 failure while keeping the production browser-stack changes unchanged.
Current signed head:
58aea9a752ffdd2f8c18f38918ccb01f53349c0f. The inherited placement lifecycle test fixture now supplies requiredpolicyConfig; the previously failingcheck-test-types-core-4passes on corrected PR04ea418a67d7fa72213bacc1a8543336ff5907d6fa(run35883329532, job107258058958). Production browser behavior is unchanged by that correction. Exact combined packaged proof at3582077699e1a97d705438a0d2d49c7f2c216d26passed all controls with clean cleanup. Remaining required hosted/native landing gates and independent final QA are tracked separately; this is not a claim that every PR has landed.Related: #154341
Current landing verification — 2026-09-23
Current PR head:
422826da6c560fc583747f75462ac7aca8c1d3a6. Vincent authorized prerequisite-first landing of the experimental opt-in Lightpanda stack and its additive engine/config/status contract. No merge or deployment is claimed here; exact-head hosted checks and native landing gates remain required.This prerequisite-driven restack is patch-identical to the reviewed boundary; it incorporates the resolved main/config baseline from #154359. Earlier native AutoReview remains tied to the unchanged source patch, not relabeled as a new run. Current-head hosted CI and a fresh completed ClawSweeper review remain required.
Proof scope: dated evidence below retains its original source identity. The new combined image/profile-preservation run at
dd25d85031ab090b4b4ad9cba0ad4beeff9debb8is pending in #154607 and #154608; no earlier image is relabeled as that repair proof.This boundary’s patch is unchanged; only prerequisite ancestry changed to include the reviewed admission and benchmark repairs.
Fresh isolated native AutoReview found no remaining actionable P0–P2 defects after the accepted PR02/03/06 repairs and adjudication of the metadata/external-profile false positives. Exact reviewed file hashes and unchanged boundary patch IDs bind those reviews through the prerequisite-driven restack; patch-identical head changes are not relabeled as new review runs.
Final combined proof at
71e4fb2b164423175c6b0324365cc18e5c7808ef: all 47,508 tracked files/symlinks and modes match the tested source. Route/schema tests 53/53, five-file formatting and scoped type-aware lint pass; a real pinned Lightpanda 0.4.1 workflow passes ref actions, exactly-once submission, capability/single-page checks and the repaired stale-target validator.A fresh complete application image built in 238.447s, image
sha256:ac252a09fd89aa2f041a37078d13fc7c8f6107835923cab2644fa9ed76084fbd. Its build-info matches the exact combined commit. The unchanged default Playwright script passes (16.754s). Packaged Gateway/browser smoke passes (22.336s): Chromium start/open/snapshot/stop, same-route Chromium selector-wait success, and four Lightpanda selector rejections with exactBROWSER_CAPABILITY_UNSUPPORTED/engine: lightpandastructured errors before adapter contact. This isolated Linux amd64 proof uses synthetic pages and no provider/account actions. Source inventory is unchanged after build/runtime; owned containers are removed and the task daemon is stopped.Historical evidence below retains its original source and scope. In particular, the old broad
staleTargetRejectedassertion is superseded by the new positive-control/exact-error proof, and historical memory sampled across full validation is not a measurement of the repaired validator. No new three-run performance matrix, native macOS/Windows runtime proof, whole-Gateway memory saving, or broad website compatibility is claimed. The full image’s Lightpanda negative probes cover pre-adapter admission; actual Lightpanda ref actions are covered separately by the current source-controller workflow.ClawSweeper’s synthetic-fixture qualification landed in openclaw/clawsweeper#1646. Qualification is not review approval or proof of deployment: the fresh full-input browser review must still demonstrate admission on its actual trusted policy and exact head/body. No gate is bypassed.
Stack continuation: #154342 → #154359 → #154360 → #154382 → this PR.
Base:
feat/lightweight-browser-04-portability.What Problem This Solves
Provides a reproducible, explicitly labelled Chromium headless-shell comparison after the Lightpanda licence audit. Reuses the existing Chromium/CDP owner instead of adding another automation daemon or introducing a new engine dependency.
User Impact
Adds
--headless-shell <binary>to the opt-in route benchmark, separate requested-distribution reporting, and distribution-specific scratch directories. Documents the repository-pinned installer, platform prerequisites and companion-asset notices. No production configuration, default browser, package manifest, lockfile, or live deployment changes.Non-AGPL alternative, not an MIT-only distribution: Chromium headless shell retains Chromium's LGPL/MPL and other third-party obligations. The Playwright installer also downloads separately licensed FFmpeg/platform helpers. No binaries are bundled or mirrored here.
Verification at
3fc7d33295d8a76291b65bbbaa442d38407d42f4Fresh independent review passed, including CLI rejection cases and scratch/lifecycle ownership. Reviewed diff SHA-256:
b0a64136fa4543291026c6ca344bac4ee5d5b405f3a3d4f89ebeb2d209c0d153.Local scoped lint, extension type checking, formatting, focused MDX, and
git diff --checkpassed. A local Linux headless-shell smoke also passed. Full hosted CI is not claimed; hosted checks are tracked separately.All Crabbox runs used the exact commit above and Playwright 1.63.0's Chrome-for-Testing 153.0.8010.12 / build 1243. Each successful run completed one first task plus ten measured warm tasks through OpenClaw's actual browser routes: navigation, snapshot, ref typing, exactly one submission, wait and text extraction.
macOS environment limitation
Normal multiprocess Chromium cannot start inside Anthropic Sandbox Runtime 0.0.77:
bootstrap_check_in ... MachPortRendezvousServer ... Permission denied. This matches upstream SRT issue 210. No supportedmach-registerallowance exists in that version; addingallowMachLookupis not a fix.The successful macOS route test kept the controller's filesystem/network confinement and attached to a separately launched, task-owned engine with an isolated profile/home, loopback CDP and cleanup. No
--single-processsubstitution, user browser reuse or sandbox-disable patch was used. The existing benchmark's browser--no-sandboxflag remained unchanged on all platforms. SRT itself was not weakened. External mode correctly leaves distribution/version/startup/memory fields null; separate launch metadata and binary hashing establish which engine was tested. This is application-route compatibility evidence, not full browser-process isolation or managed-launch proof.Linux comparison
Same AWS Linux VM, separate controller invocations, shell then full Chromium, same version and launch flags. No production sites or LLM.
The shell used less sampled engine memory here, but its first launch was slower. These are one-run synthetic results, not true memory peaks, incremental controller overhead, total-host savings or a production performance guarantee. Do not compare these numbers directly to the earlier Lightpanda measurement on a different host.
Observed executable SHA-256 values:
ded93a9c9a53a1ae040f08124badcca95c938e9d5015ff340c3b5538c41bf39eaddfa79abb060e1e514e155ed745d4bf96140bca402735958bb4e223aea0b98ca0bfe7b4da4787b66058477d696cd1d09065d25f06a548947722b9af77ee8282These are observed digests, not independent signature verification. The Linux
LICENSE.headless_shellhash wasb92247f7a44c14627ef5cbbe0aa6dcca4e4422b7c05e6f2c660054061a5e3da7.Why not promote Obscura yet?
The audit in the preceding PR identifies Obscura 0.2.3 as an Apache-2.0 lightweight candidate, with five MPL-only dependencies and incomplete release notices/provenance. Exploratory Linux route probes of both rendering and no-render binaries failed form typing/actionability through the semantic compatibility profile; the Chromium profile also exposed discovery incompatibility. The failure resembles upstream issue 807, but a root cause is not claimed. No DOM-evaluation bypass or unsupported production adapter is added. This is a compatibility gap in the tested integration path, not a claim that every Obscura client fails.
Reproduce
Install the checkout's frozen dependencies. Use the pinned installer and preserve its full distributions/notices:
Windows uses
chrome-headless-shell.exe. Mac split mode uses--endpoint http://127.0.0.1:<port> --engine chromiumagainst the explicitly managed task-local engine; it does not establish engine identity by itself. Linux requires browser system libraries and fonts.Remaining Gaps
Sanitized machine-readable route evidence
{ "commit": "3fc7d33295d8a76291b65bbbaa442d38407d42f4", "engineVersion": "153.0.8010.12", "playwright": "1.63.0", "playwrightBrowserBuild": 1243, "linux": [ { "platform": "linux", "arch": "x64", "node": "v24.18.1", "memoryMethod": "Maximum sampled Linux /proc descendant-tree PSS/RSS, not a true peak; sampling attempts every 50 ms plus task boundaries. Excludes controller. Null for external engines and unsupported hosts. Controller RSS is a separate end-of-workload sample, not incremental overhead or a peak.", "workload": "Local synthetic form through OpenClaw routes, no LLM. One first task includes initial page open/attachment; each measured warm task includes navigation, default efficient AI snapshot (Lightpanda selects aria refs), typing, exactly one submission, wait and text extraction. Capability/session checks run after measurement.", "engineOrder": [ "chromium" ], "distributionOrder": [ "chromium-headless-shell" ], "results": [ { "engine": "chromium", "distribution": "chromium-headless-shell", "engineVersion": "HeadlessChrome/153.0.8010.12", "connectionMode": "spawned", "warmIterations": 10, "checks": { "workflow": true, "exactlyOnceSubmission": true }, "startupMs": 1603.9316999999992, "firstTaskMs": 1237.6393720000015, "coldStartToFirstCompletionMs": 2844.9482590000007, "warmP50Ms": 646.8605339999995, "warmP95Ms": 737.9371979999996, "warmTaskMs": [ 705.5573970000005, 646.8605339999995, 634.9467490000006, 686.4699439999986, 668.9588029999977, 645.9451079999999, 646.0920079999996, 709.3686269999998, 737.9371979999996, 633.7525389999973 ], "meanWarmSnapshotBytes": 217.6, "engineMaxSampledPssMiB": 199.4775390625, "engineMaxSampledRssMiB": 434.10546875, "memorySamples": 168, "controllerRssAfterWorkloadMiB": 1140.6015625 } ] }, { "platform": "linux", "arch": "x64", "node": "v24.18.1", "memoryMethod": "Maximum sampled Linux /proc descendant-tree PSS/RSS, not a true peak; sampling attempts every 50 ms plus task boundaries. Excludes controller. Null for external engines and unsupported hosts. Controller RSS is a separate end-of-workload sample, not incremental overhead or a peak.", "workload": "Local synthetic form through OpenClaw routes, no LLM. One first task includes initial page open/attachment; each measured warm task includes navigation, default efficient AI snapshot (Lightpanda selects aria refs), typing, exactly one submission, wait and text extraction. Capability/session checks run after measurement.", "engineOrder": [ "chromium" ], "distributionOrder": [ "chromium" ], "results": [ { "engine": "chromium", "distribution": "chromium", "engineVersion": "Chrome/153.0.8010.12", "connectionMode": "spawned", "warmIterations": 10, "checks": { "workflow": true, "exactlyOnceSubmission": true }, "startupMs": 319.68319900000097, "firstTaskMs": 1371.8090219999995, "coldStartToFirstCompletionMs": 1695.4416130000009, "warmP50Ms": 667.8942170000009, "warmP95Ms": 742.9374879999996, "warmTaskMs": [ 666.0743330000005, 661.1417430000001, 742.9374879999996, 654.9244420000014, 740.213366, 700.0591749999985, 667.8942170000009, 658.1033790000001, 686.1660929999998, 712.5496339999991 ], "meanWarmSnapshotBytes": 217.6, "engineMaxSampledPssMiB": 514.62109375, "engineMaxSampledRssMiB": 1532.71484375, "memorySamples": 143, "controllerRssAfterWorkloadMiB": 1137.09765625 } ] } ], "windows": [ { "platform": "win32", "arch": "x64", "node": "v24.18.1", "memoryMethod": "Maximum sampled Linux /proc descendant-tree PSS/RSS, not a true peak; sampling attempts every 50 ms plus task boundaries. Excludes controller. Null for external engines and unsupported hosts. Controller RSS is a separate end-of-workload sample, not incremental overhead or a peak.", "workload": "Local synthetic form through OpenClaw routes, no LLM. One first task includes initial page open/attachment; each measured warm task includes navigation, default efficient AI snapshot (Lightpanda selects aria refs), typing, exactly one submission, wait and text extraction. Capability/session checks run after measurement.", "engineOrder": [ "chromium" ], "distributionOrder": [ "chromium-headless-shell" ], "results": [ { "engine": "chromium", "distribution": "chromium-headless-shell", "engineVersion": "HeadlessChrome/153.0.8010.12", "connectionMode": "spawned", "warmIterations": 10, "checks": { "workflow": true, "exactlyOnceSubmission": true }, "startupMs": 162.58819999999832, "firstTaskMs": 1881.6359999999986, "coldStartToFirstCompletionMs": 2047.6459000000032, "warmP50Ms": 667.499800000005, "warmP95Ms": 683.1417999999976, "warmTaskMs": [ 677.6635999999999, 683.1417999999976, 649.6457999999984, 669.18299999999, 662.4469000000099, 667.499800000005, 669.493100000007, 661.5100000000093, 666.9167000000016, 669.5439000000042 ], "meanWarmSnapshotBytes": 217.6, "engineMaxSampledPssMiB": null, "engineMaxSampledRssMiB": null, "memorySamples": 0, "controllerRssAfterWorkloadMiB": 966.40625 } ] } ], "macOS": { "report": { "platform": "darwin", "arch": "arm64", "node": "v26.7.0", "memoryMethod": "Maximum sampled Linux /proc descendant-tree PSS/RSS, not a true peak; sampling attempts every 50 ms plus task boundaries. Excludes controller. Null for external engines and unsupported hosts. Controller RSS is a separate end-of-workload sample, not incremental overhead or a peak.", "workload": "Local synthetic form through OpenClaw routes, no LLM. One first task includes initial page open/attachment; each measured warm task includes navigation, default efficient AI snapshot (Lightpanda selects aria refs), typing, exactly one submission, wait and text extraction. Capability/session checks run after measurement.", "engineOrder": [ "chromium" ], "distributionOrder": [ null ], "results": [ { "engine": "chromium", "distribution": null, "engineVersion": null, "connectionMode": "external", "warmIterations": 10, "checks": { "workflow": true, "exactlyOnceSubmission": true }, "startupMs": null, "firstTaskMs": 1548.4287499999991, "coldStartToFirstCompletionMs": null, "warmP50Ms": 941.9874579999996, "warmP95Ms": 989.5028329999986, "warmTaskMs": [ 952.4652500000011, 974.4614999999994, 955.1712499999994, 912.918916999999, 924.6464999999989, 941.9874579999996, 958.2610000000022, 989.5028329999986, 919.7231670000001, 933.2630419999987 ], "meanWarmSnapshotBytes": 217.6, "engineMaxSampledPssMiB": null, "engineMaxSampledRssMiB": null, "memorySamples": 0, "controllerRssAfterWorkloadMiB": 771.015625 } ] }, "engineMetadata": { "sourceCommit": "3fc7d33295d8a76291b65bbbaa442d38407d42f4", "distribution": "chromium-headless-shell", "version": "HeadlessChrome/153.0.8010.12", "platform": "darwin", "arch": "arm64", "engineInsideSrt": false, "controllerInsideSrt": true, "args": [ "--headless=new", "--disable-gpu", "--no-sandbox", "--no-first-run", "--no-default-browser-check", "--disable-sync", "--disable-background-networking", "--disable-component-update", "--disable-features=Translate,MediaRouter", "--disable-session-crashed-bubble", "--hide-crash-restore-bubble", "--password-store=basic", "--no-proxy-server", "--use-mock-keychain", "--remote-debugging-address=127.0.0.1" ] } } }Premerge preparation — 2026-09-21
Source head recorded on 2026-09-21:
cdc60c8caf7ff072bc7d8aa813e92959dc814862. Ready for review/CI, not merged or deployed.Headless-shell benchmark layer; native-spawn smoke covers inherited benchmark corrections.
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.