fix(serve,guest): volumes support, debugfs quoting, devtmpfs mount#360
Open
yan5xu wants to merge 2 commits intoboxlite-ai:mainfrom
Open
fix(serve,guest): volumes support, debugfs quoting, devtmpfs mount#360yan5xu wants to merge 2 commits intoboxlite-ai:mainfrom
yan5xu wants to merge 2 commits intoboxlite-ai:mainfrom
Conversation
Holds a single BoxliteRuntime and exposes box lifecycle + exec operations
over HTTP. Solves runtime lock contention when multiple callers need
concurrent access (e.g. Pinix Server executing nested clip-to-clip calls).
Endpoints (9, MVP):
- GET /v1/config
- POST /v1/local/boxes (create)
- GET /v1/local/boxes (list)
- GET /v1/local/boxes/{id} (info)
- POST /v1/local/boxes/{id}/start
- POST /v1/local/boxes/{id}/stop
- POST /v1/local/boxes/{id}/exec (returns execution_id, supports stdin)
- GET /v1/local/boxes/{id}/executions/{eid}/output (SSE stream)
- DELETE /v1/local/boxes/{id}
SSE exec protocol:
event: stdout, data: {"data":"<base64>"}
event: stderr, data: {"data":"<base64>"}
event: exit, data: {"exit_code":0,"duration_ms":1234}
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three fixes for BoxLite serve mode:
1. serve: add volumes field to CreateBoxRequest and pass to BoxOptions
- Without this, virtiofs mounts were silently dropped and /clip
was not visible inside containers
2. disk/ext4: quote host path in debugfs write command
- Paths containing spaces (macOS "Application Support") caused
debugfs to silently fail, leaving guest binary missing from rootfs
3. guest: mount devtmpfs at /dev for block device node auto-creation
- Kernel sees block devices in /proc/partitions but /dev/vd* nodes
were missing, preventing Container.Init from mounting disks
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
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.
Summary
Three fixes for BoxLite serve mode:
serve: add volumes to CreateBoxRequest — Without this, virtiofs mounts passed in the create request were silently dropped. Containers couldn't see host-mounted directories (e.g.
/clip).disk/ext4: quote host path in debugfs write — On macOS, the embedded runtime extracts to
~/Library/Application Support/boxlite/.... The space in "Application Support" causeddebugfs writeto silently fail, leaving the guest binary missing from the rootfs ext4 image.guest: mount devtmpfs at /dev — The kernel sees block devices in
/proc/partitionsbut/dev/vd*device nodes were never created. This prevented Container.Init from mounting the container disk.Test plan
boxlite serve→ create box with volumes → exec/bin/echo hello→ stdout receivedapt-get install curl git python3works inside container (10GB disk)curl https://www.google.com)🤖 Generated with Claude Code