Repository navigation
Multipass VMs on Apple silicon: linux-arm64 build, Local Network errors, relative programs - #79
Merged
Merged
Conversation
…rs, relative programs - Publish @gildforge/cli-linux-arm64 (bun-linux-arm64, pinned node-pty linux-arm64 prebuild) so the arm64 VM has its own gild; no server optionalDependency for it (none is published). - Retry multipass exec on "No route to host", then fail naming the macOS Local Network setting; the readiness check only treats a missing marker as not set up. Wait for the agent to start in the VM before reporting a detached session ready. - Run a program inside the working directory by its relative path in the VM.
This branch was successfully deployed
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 three bugs found running
gild spawn --vmon Apple silicon (bugsy, M1, macOS 27, Multipass 1.16.4).What changed
A. linux-arm64 build.
scripts/pack.mjsaddscli-linux-arm64(bun-linux-arm64, os linux, cpu arm64). It goes into gildforge's optionalDependencies, and the node-ptylinux-arm64/pty.nodeprebuild is pinned inscripts/node-pty.json(sha2565a3b89…f825, from the same upstream tarball). No@gildforge/server-linux-arm64optionalDependency, because that package does not exist (npm 404) andtest:installresolves every optional package.release.ymladdsgild-linux-arm64to the R2 manifest; the publish loop already coverspackages/cli-*.B. "No route to host".
multipass exec(and the tar copy) is retried for about 5 s on that error. If it persists, gild fails with: allow Multipass in System Settings → Privacy & Security → Local Network…. The readiness check now asks the VM forready/missing, so only a missing marker file means "not set up". Any other failure is reported instead of starting the install again.startMultipassChildwaits until the guest has written the session pid file before the detached session reports ready, so a terminal or SSH session that closes right aftergild spawn --detach --vmno longer kills the agent before it starts.C. Relative programs. New
guestProgram(): a program inside the cwd runs as./<relative path>in the copy; anything else still runs by its bare name.Evidence
src/isolation/multipass.test.ts: 10 pass. With the logic reverted (basename, no retry, readiness → false), 4 fail: relative path, both retry tests, unreachable-VM readiness.bun test --timeout 30000: 303 pass, 0 fail.runner-setup-node,anchored-fs+syncpass.typecheck0,format:check0.bun run packbuilds and verifiescli-linux-arm64(ELF aarch64 + node-pty).test:install,test:installed-ptyandtest:install:revertpass../check.shran in the VM asprog=./check.sh, and the VM's own gild 0.6.12 answered a credentialedgit ls-remote. The detached session survived ssh exiting immediately; released 0.6.11 under the same conditions loses the session.Needs Sami:
@gildforge/cli-linux-arm64must be published by hand once, then get the trusted publisher (gildforge/cli, release.yml, envrelease) before the Release workflow can publish it (noted in PUBLISHING.md).Side note: a darwin-arm64 binary cross-compiled by
bun run packon the Intel iMac has an invalid signature (killed, 137) until re-signed withcodesign -s -. CI packs on Linux and the published 0.6.11 is fine, so this is local only.Output.log retention after a detached session ends is left to the Linux/Firecracker PR.
-claude