Browser-flavored sandbox image with in-image session tooling - #241
Open
czpython wants to merge 1 commit into
Open
Browser-flavored sandbox image with in-image session tooling#241czpython wants to merge 1 commit into
czpython wants to merge 1 commit into
Conversation
The sandbox image grows a browser stage on top of slim: chromium via playwright (pinned), pinchtab (pinned, checksum-verified), fonts, Xvfb and loopback-only x11vnc with a boot-generated password file. The entrypoint starts the display stack only in the browser flavor; slim boots unchanged, and untargeted local builds keep producing slim. Two image-owned scripts keep druks core format-blind: session-launch materializes either session format (profile tarball unpacked, or storage_state applied to a persistent context) and exposes loopback CDP; session-export closes the browser first, then archives the profile without caches and validates the result into /work/session/out. Both are self-contained under SSH invocation, which carries none of the image ENV. The sandbox client gains browser=True on its entry points, resolving the configured image to its browser tag (explicit override still wins) so browser hosts name their image explicitly and bypass the default-image warm pool. The publish workflow pushes both flavors.
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 freeto 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.
What
First phase of browser sessions as a druks primitive: the sandbox image gains a
browserflavor and the session tooling that keeps druks core blind to browser-state formats.slim/browserstages. The browser stage adds chromium (via pinned playwright, browsers under/ms-playwright), a pinned checksum-verified pinchtab binary, fonts, Xvfb, and x11vnc. Everything slim has stays present — harnesses run in browser sandboxes too. Untargeted local builds keep producing slim via a finaldefaultalias stage.storage_stateJSON to a persistent context (raw Chromium can't consume storage_state) and exposes loopback CDP for playwright and pinchtab alike; export closes the browser first (never tars a live Chrome), archives the profile without caches, validates the archive, and writes tar + meta to/work/session/out/. Both scripts are self-contained under SSH invocation, which carries none of the image ENV.browser=Trueonephemeral/acquire/provisionresolves the configured image to itsbrowsertag (an explicitimage_overridestill wins). Browser hosts always name their image explicitly, so they bypass the default-image warm pool.browser/browser-sha-*/browser-<tag>for the browser target.Testing
browser=Trueflowing intocreate_host(image=...); they run in CI (local runs are blocked by the shared-DB fixture).bash -n,node --checkall clean.