fix(agentos-apps): read the pack artifact over the VM API instead of a host_dir mount#1873
Open
tobowers wants to merge 1 commit into
Open
fix(agentos-apps): read the pack artifact over the VM API instead of a host_dir mount#1873tobowers wants to merge 1 commit into
tobowers wants to merge 1 commit into
Conversation
…a host_dir mount Guest-side access to host_dir mounts fails with "Permission denied (os error 2)" (rivet-dev#1872), which made every deployApp() pack step fail with agentos_apps_pack_failed. The build VM no longer mounts a host output directory: tar writes the artifact to the guest filesystem and the host reads it back with vm.readFile, which works. This also removes the host temp directory and its cleanup from the build path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fixes the
deployApp()side of #1872.Problem
Guest-side access to
host_dirmounts fails withPermission denied (os error 2)in 0.2.14 — reads and writes, macOS and Linux (minimal repro:https://github.com/tobowers/agentos-hostdir-repro). The apps pack step runs
guest
tar -cfinto a writable host_dir mount, so every deploy fails withagentos_apps_pack_failed:Change
createBuildVmno longer mounts a host output directory.tarwrites theartifact to the guest filesystem (
/agentos-app.tar, outside/releasesoit never packs itself) and the host reads it back with
vm.readFile, whichworks correctly. The artifact is read once and cached so
artifactSizeandreadArtifactdon't fetch it twice. This also removes the host tempdirectory, its error-path cleanup, and the dispose-time
rmfrom the buildpath — one less moving part even after the underlying host_dir bug is fixed.
Verified end to end against 0.2.14 (as a dist patch of this same change) on
macOS arm64 and Linux arm64: hono-only deploys, rivetkit-dependency deploys,
release caching, and failed-build release preservation all behave as before;
only the pack step's transport changed.
Consideration for review
vm.readFiletransports the whole artifact over the sidecar bridge in onecall. If bridge read limits cap this below
maxBuildArtifactBytesfor largereleases, the read may need chunking — happy to adjust if you have a
preferred primitive for large guest reads.
🤖 Generated with Claude Code