Skip to content

feat(sandbox): mount extra virtiofs tags from mounts.json in the guest - #234

Closed
quickbeard wants to merge 1 commit into
sandbox-mounts-corefrom
sandbox-mounts-image
Closed

quickbeard wants to merge 1 commit into
sandbox-mounts-corefrom
sandbox-mounts-image

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Second of three stacked PRs (on #233). The one-time guest image change for extra sandbox mounts on macOS.

What

  • image/guest/codev-init reads /codev-config/mounts.json (written by the vz provider every start) and mounts each listed tag as root before the setpriv drop, non-fatally per entry — one bad share logs and skips rather than bricking the boot. After this single image change, every future mount-list change is a host-side manifest write.
  • script/e2e-vz.ts gains a mounts probe: an extra host folder rides config.mounts, the guest reads a marker from /mnt/extra and writes a file back into it, proving both directions through the new tag; the run fails if either side is missing.

Compatibility

Safe in both ship orders: an old image with a new desktop leaves the extra shares unmounted and inert (old init only mounts the three hardcoded tags); a new image without a manifest skips on the [ -f ] guard. Existing macOS sandboxes pick the new init up via Reset (re-provisions from the current image) — the UI PR carries the user-facing hint and CHANGELOG caveat.

Release step (mac host)

bun script/build-image.ts, verify with bun script/e2e-vz.ts --image … --bundle ../opencode/dist/node, then bun script/publish-image.ts --version <YYYY.MM.N>.

🤖 Generated with Claude Code

codev-init now reads /codev-config/mounts.json (written by the vz
provider every start) and mounts each listed tag, non-fatally per entry
so one bad share cannot brick the boot. This is the one-time image
change: all future mount-list changes are host-side manifest writes.

Compatibility is safe in both directions — an old image ignores the
extra shares (they sit unmounted and inert), and a new image without a
manifest skips the block. Existing macOS sandboxes pick the new init up
via Reset, which re-provisions from the current image.

e2e-vz.ts gains a mounts probe: the guest reads a marker from
/mnt/extra and writes back into it, exercising both directions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant