Skip to content

Multipass VMs on Apple silicon: linux-arm64 build, Local Network errors, relative programs - #79

Merged
samifouad merged 1 commit into
mainfrom
claude/arm-vm-fixes
Oct 14, 2026
Merged

samifouad merged 1 commit into
mainfrom
claude/arm-vm-fixes

Conversation

@samifouad

Copy link
Copy Markdown
Member

Fixes the three bugs found running gild spawn --vm on Apple silicon (bugsy, M1, macOS 27, Multipass 1.16.4).

What changed

A. linux-arm64 build. scripts/pack.mjs adds cli-linux-arm64 (bun-linux-arm64, os linux, cpu arm64). It goes into gildforge's optionalDependencies, and the node-pty linux-arm64/pty.node prebuild is pinned in scripts/node-pty.json (sha256 5a3b89…f825, from the same upstream tarball). No @gildforge/server-linux-arm64 optionalDependency, because that package does not exist (npm 404) and test:install resolves every optional package. release.yml adds gild-linux-arm64 to the R2 manifest; the publish loop already covers packages/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 for ready/missing, so only a missing marker file means "not set up". Any other failure is reported instead of starting the install again. startMultipassChild waits until the guest has written the session pid file before the detached session reports ready, so a terminal or SSH session that closes right after gild spawn --detach --vm no 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

  • New 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 + sync pass. typecheck 0, format:check 0. bun run pack builds and verifies cli-linux-arm64 (ELF aarch64 + node-pty). test:install, test:installed-pty and test:install:revert pass.
  • Live on bugsy, with this branch's binaries:
    • ./check.sh ran in the VM as prog=./check.sh, and the VM's own gild 0.6.12 answered a credentialed git ls-remote. The detached session survived ssh exiting immediately; released 0.6.11 under the same conditions loses the session.
    • Run after the SSH session had gone, the new error appears after about 5 s, exit 1. 0.6.11 instead reported "Install Node, git…: exec failed…".
  • No clippy (TypeScript repo).

Needs Sami: @gildforge/cli-linux-arm64 must be published by hand once, then get the trusted publisher (gildforge/cli, release.yml, env release) before the Release workflow can publish it (noted in PUBLISHING.md).

Side note: a darwin-arm64 binary cross-compiled by bun run pack on the Intel iMac has an invalid signature (killed, 137) until re-signed with codesign -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

…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.
@samifouad
samifouad merged commit 015b672 into main Oct 14, 2026
4 checks passed
@samifouad
samifouad deleted the claude/arm-vm-fixes branch October 15, 2026 15:41

This branch was successfully deployed

1 active deployment
public-ci — 350dd838 Deployed Oct 14, 2026 by samifouad via vz-helper #228
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant