Repository navigation
Launch leaf-dev's browsers and leaf children on the pinned headless shell - #2786
Merged
Merged
Conversation
…hell leaf-dev reached the host's browser through `launch_browser`, which picks installed Google Chrome, so every stills, probe, eval, journey and verify-site run, and every `page check` a leaf-dev child ran, launched Chrome with a fresh profile. On macOS each fresh profile leaves a key in Chrome's keychain group that every later launch makes `secd` read back. `leaf_dev.browser.headless_shell()` (was `chrome()`) launches the shell, and `shell_executable()`, moved from the suite's fixture, is named as LEAF_BROWSER_EXECUTABLE for every child `arms.environment()` builds. eval-ui-review keeps installed Chrome explicitly, matching its provider's live tool. publish-site installs the shell it now needs. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 13, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The new child environment overrides a browser the host explicitly selected through CHROME_PATH or CHROME_BIN. launch_browser() reads LEAF_BROWSER_EXECUTABLE first, so setting it to the shell changes the browser used by leaf-dev children. Apply the shell default only when none of the three browser variables names an executable.
…E_BIN Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1488 named the pinned headless shell as the suite's browser, but
leaf-devstill reached the host's browser throughlaunch_browser, which picks installed Google Chrome. Everyleaf-dev stills,probe, eval, journey andverify-siterun, and everyleaf page checka leaf-dev child ran, launched Chrome with a fresh profile.On macOS that cost has grown since #1488 measured about a second of
secdCPU per launch. Each fresh profile leaves a key in Chrome'sunexportable-keyskeychain group, and every later Chrome launch makessecdread all of them back. On the maintainer's Mac the group holds 27,188 keys, and one read took 5.6 s ofsecdCPU; agent sessions running stills and page checks keptsecdat 50–70%.What changes
leaf_dev.browser.headless_shell()(waschrome()) launches Playwright's pinned headless shell, the build_browserdrives. Every caller is renamed, andrefresh-previewsuses it instead of launching the shell itself.leaf_dev.browser.shell_executable()now owns the shell lookup that was in the suite'sheadless_shellfixture. The fixture calls it, andarms.environment()names it asLEAF_BROWSER_EXECUTABLEfor everyleafand agent child, unlessLEAF_BROWSER_EXECUTABLEis already set. It outranksCHROME_PATHandCHROME_BIN, which hosts set for other tools (GitHub's runner setsCHROME_BINto its Chrome), as the suite's fixture already does. Page checks inside evals, journeys,bench-checkand the site build draw with the shell too.eval-ui-reviewkeeps installed Chrome, now launched explicitly: itsprovider.mjsgives the model's live tool installed Chrome, so the screenshots and the recorded version stay on the same build.publish-siteinstalls the shell. Itsdeploy-sitejob ranverify-siteand the journey on the runner's preinstalled Chrome, with no Playwright install.The product's own launch order (
launch_browser: named executable, then installed Chrome, thenPATH) is unchanged, since a user's host has no Playwright shell. One consequence for evals: an agent'spage checkthere no longer raises Chrome's autofill-layer DevTools issues, which the shell doesn't report (render_gate/readings.py).notes/browser-support.md's recheck for installed Chrome now uses achannel="chrome"one-liner, sinceleaf-dev probereads the shell.