feat(sandbox): guest-native /opt/agentos granular tar mounts#276
Merged
Conversation
|
🚅 Environment secure-exec-pr-276 in rivet-frontend has no services deployed. 🚅 Deployed to the secure-exec-pr-276 environment in secure-exec
|
Serve packages directly from package.tar via a tar-backed read-only VFS (mmap + digest index, no extraction), compose /opt/agentos from granular leaf mounts (tar per pkg-version + single-symlink per bin/<cmd> and current), resolve symlinks across mounts, and move exec bits to pack time. Carries in-progress sandbox-multiline-prompt work (registry/software + doc cleanup).
43097a2 to
f553281
Compare
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.
/opt/agentospackages directly from theirpackage.tarvia a new tar-backed read-only VFS (mmap + digest-keyed index, no extraction, no on-disk staging)./opt/agentosfrom granular leaf mounts: one tar mount perpkgs/<pkg>/<version>, one in-memory single-symlink mount perbin/<cmd>and perpkgs/<pkg>/current; parent dirs stay writable overlay dirs so user installs coexist with managed ones.MountTable::realpathto resolve symlinks across mounts (delegating to a mount's own realpath for single-mount paths, walking components only for genuine cross-mount chains).execfollow cross-mount symlinks before reading the shebang, classify extensionless agentOSbin/<cmd>launchers as JavaScript, and skip host→guest shadow sync for read-only guest-native package mounts.0755onbin/<cmd>targets at pack time in the toolchain (npm ships 0644).Known follow-ups (not addressed here)
MountTable::realpathcross-mount walk resolves mount-internal symlinks with VM-root semantics (absolute targets /..) — a confinement divergence; not guest-reachable today (walked mounts are read-only) but should be confined to the mount root.realpathof a path under a single-symlink mount returns ENOENT (delegation only falls back to the walk on ELOOP); latent, not hit by current callers.TarFileSystemdrops hardlink members and can shadow a synthesized parent dir on a malformed tar; SIGBUS-safety of the mmap is an operational immutability contract, not enforced.MemoryFileSystem::write_file_with_modesilently ignores its mode argument.This branch also carries in-progress
sandbox-multiline-promptwork beyond the tar-mount change (registry/software updates, doc cleanup).