Skip to content

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

Merged
quickbeard merged 1 commit into
mainfrom
sandbox-mounts-image
Aug 14, 2026
Merged

quickbeard merged 1 commit into
mainfrom
sandbox-mounts-image

Conversation

@quickbeard

Copy link
Copy Markdown
Owner

Supersedes #234, which GitHub auto-closed when its base branch was deleted after #233's squash-merge; the branch is rebased onto main and the content is identical.

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; a new image without a manifest skips on the [ -f ] guard. Existing macOS sandboxes pick the new init up via Reset.

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>
@quickbeard
quickbeard merged commit 162e122 into main Aug 14, 2026
0 of 5 checks passed
@quickbeard
quickbeard deleted the sandbox-mounts-image branch August 14, 2026 06:34
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