Seed the Playwright browser into the tend sandbox so a session can run the suite - #106
Merged
Merged
Conversation
This was referenced Aug 29, 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.
Tend sessions start with an empty Playwright cache, so the suite that is most of
tests/cannot run from one —setup:installs browsers under the runner's home, which the sandbox does not inherit. This adds asandbox_setup:block that seeds the same headless shellci.yamluses into the sandbox's own home, and asserts it by launching it. Verified in a real tend sandbox: cache empty at start, install 4.4s, launch 0.8s, anduv run pytest --run-nightly -n0 tests/test_render_reactions.py -k stacks_at_a_narrow_edgethen passes 2 tests in 4.26s where before it could not start.What was observed, and why this shape
The evidence
Last night's
tend-nightlysession (33238853704) reached this partway through the suite:It did not install the browser; it stopped verifying locally and said so in its summary — "The browser suites also did not run locally — this sandbox has no Playwright browsers installed — so CI was their first pass on both PRs". Both PRs it opened (#104, #105) are green, so nothing wrong went out. What went out unverified is the point: on a repo where nearly every test drives a real browser, the session shipped with the repo's own gate unrun.
Three
tend-ci-fixsessions the same night did install it themselves, and two of them lost a turn to the same wrong flag first:playwright install --with-deps chromium --only-shellsudo: a password is requiredplaywright install chromium --only-shellplaywright install --with-deps chromium --only-shellsudo: a password is requiredplaywright install chromium --only-shellplaywright install chromium --only-shell--with-depsswitches to root, and the sandbox user has no sudo — the traprunning-in-ci's Privileges bullet names, and its prescribed remedy is exactly this: propose the setup entry rather than work around its absence.Why
sandbox_setup:rather thansetup:setup:runs as the runner. Playwright downloads to$HOME/.cache/ms-playwright, and per tend's config reference the sandbox inherits shared system and toolcache paths but never the runner's home.sandbox_setup:runs as the sandbox user with the workspace as cwd, which puts the browser wheresync_playwright()will look for it. This is the neighbour of theuv-on-PATH gap that max-sixty/tend#1071 fixed upstream for 0.1.20 — same boundary, but a home-scoped download rather than a PATH entry, so the repo owns it rather than tend.Why no
--with-depsThe runner image already carries the system libraries: the three sessions above ran the browser suite successfully after a plain
--only-shellinstall, and so did the verification here. Adding a secondsetup:step to run--with-depsas the runner would be machinery for a need that has not appeared.Cost
~5.3s per session that boots an agent (4.4s install, 0.8s launch, measured in this sandbox).
sandbox_setupruns inside themax-sixty/tend/claudestep, so thetend-notificationsandtend-reviewruns that short-circuit before booting pay nothing — andtend-ci-fix's gate-skips never reach it either.The regenerated workflows
.config/tend.yamlis the source;sandbox_setupis an action input, so it has to reach each generated workflow. Regenerated withuvx tend@0.1.20 init— the version already pinned in every workflow header — so the diff is three added lines per file and no other drift, which also confirms the committed files match what 0.1.20 generates.Gate assessment