feat(config): configurable host bind mounts - #42
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #42 +/- ##
==========================================
+ Coverage 88.45% 88.80% +0.34%
==========================================
Files 86 87 +1
Lines 5172 5314 +142
==========================================
+ Hits 4575 4719 +144
+ Misses 414 413 -1
+ Partials 183 182 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
magro
force-pushed
the
add-host-bind-mounts
branch
from
August 30, 2026 21:52
f57c92e to
b102461
Compare
neurolabs
requested changes
Aug 31, 2026
neurolabs
left a comment
Member
There was a problem hiding this comment.
Nice work. See single comment.
Adds a `mounts` list to the launcher config, exposing host directories inside
the sandbox, e.g. to share the host Maven repository and settings:
mounts:
- target: /home/dev/.m2
source: ~/.m2
Sources may be absolute or start with `~/`. Mounts are writable unless
`readonly: true` is set. `/home/dev`, `/workspace` and `/tmp` cannot be
replaced; nesting inside `/workspace` or `/tmp` is rejected since it would hide
managed content, while nesting inside the home volume is the common case.
Resolved mounts are handed to the microsandbox bind mount factory
(`Mount.Bind` via `WithMounts`) at VM creation, see
[msb bind mounts docs](https://docs.microsandbox.dev/sandboxes/volumes#bind-mounts).
Mounts are creation-only in microsandbox, so a change recreates the VM.
Detection compares a fingerprint persisted in the project state file instead of
the live VM config: the SDK does not populate SandboxConfig.Volumes when
reading an existing VM back, so comparing against it would report a change on
every run and rebuild the VM each time. This mirrors the existing
network-policy handling, including carrying the fingerprint over on home-volume
operations.
PlanReconfig would have grown to five positional bools, so they are now a named
ChangeFlags struct.
magro
force-pushed
the
add-host-bind-mounts
branch
from
August 31, 2026 11:40
b102461 to
a4a9182
Compare
neurolabs
self-requested a review
August 31, 2026 12:09
neurolabs
approved these changes
Aug 31, 2026
3 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.
Description
Adds a
mountslist to the launcher config, exposing host directories inside the sandbox, e.g. to share the host Maven repository and settings:Sources may be absolute or start with
~/. Mounts are writable unlessreadonly: trueis set./home/dev,/workspaceand/tmpcannot be replaced; nesting inside/workspaceor/tmpis rejected since it would hide managed content, while nesting inside the home volume is the common case.Resolved mounts are handed to the microsandbox bind mount factory (
Mount.BindviaWithMounts) at VM creation, see msb bind mounts docs.Mounts are creation-only in microsandbox, so a change recreates the VM. Detection compares a fingerprint persisted in the project state file instead of the live VM config: the SDK does not populate SandboxConfig.Volumes when reading an existing VM back, so comparing against it would report a change on every run and rebuild the VM each time. This mirrors the existing network-policy handling, including carrying the fingerprint over on home-volume operations.
PlanReconfig would have grown to five positional bools, so they are now a named ChangeFlags struct.
Checklist
make checkpasses (fmt, lint, test)README.mdanddocs/kept in sync with any behavior change