Repository navigation
feat(runtime-vm): credential proxy, egress allowlist and local vm images (ZOD128) - #131
Merged
Merged
Conversation
…ges (ZOD128) ZOD109 cycle 2. A runtime: vm agent can reach the network and its model without the credential entering the guest. - core: vm.allow_hosts (no network without it) and vm.git (https, host must be allowlisted). - runtime-vm: --net/--allow-host/--mount-socket in the create argv, hashed only when set so cycle-1 machines are kept; local image archives with a size+mtime stamp; a guest TCP→Unix forwarder; a settle exec after a networked first boot, because smolvm 1.25.2 SIGKILLs the exec in flight then. - acp-client: the pi preset's vmCredential (openai-codex proxy contract, placeholder key, credential-free guest setup). - cli: host credential proxy on a Unix socket with a single-refresher codex OAuth login; provisionVms wires proxy → machine → guest setup → forwarder; vm agents get guest env and skip the zooid-tasks extension. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
orivibes
force-pushed
the
feat/zod128-vm-smoke-tester
branch
from
October 13, 2026 21:33
159d400 to
e5929c3
Compare
orivibes
added this pull request to stack #139
October 13, 2026 21:34
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.
Part of #109 (cycle 2 of 2) and #128. Stacked on #127: merge that first, or merge both together after the full smoke run.
What
vm.allow_hostsandvm.git. A vm agent withallow_hostsgets--netand one--allow-hostper entry. Without it, the guest still has no network.vm.gitmust be an https URL whose host is inallow_hosts, and it reaches the agent asZOOID_VM_GIT.vm.imagestarting with/,./,../or~/is adocker savearchive or rootfs directory. A size+mtime stamp joins the settings hash, so rebuilding the archive recreates the machine.pionly).PRESETS.pi.vmCredentialdescribes the contract.--mount-socket, and starts a guest TCP→Unix forwarder on127.0.0.1:8787(machine exec -d).openai-codexprovider at the forwarder with a placeholder JWT andtransport: sse./backend-api/codex/to chatgpt.com. It swaps in the real bearer and account id, and streams both ways.~/.zooid/cred-proxy/pi/auth.json, which it alone refreshes, under a lock file with a re-read under the lock.provisionVmsruns proxy → create/start → guest setup → forwarder, closes the proxies on stop or on a failed setup, and logs[cred-proxy] <agent> <METHOD> <path> → <status> (<ms>ms). vm agents getPI_CODING_AGENT_DIR=/root/.pi/agentand skip the zooid-tasks extension (installPiExtensionsis extracted fromstart-daemon).Found on the way: smolvm kills an exec after a networked first boot
With
--net --allow-host, smolvm 1.25.2 SIGKILLs (exit 137) whatever exec is in flight about 130ms after a fresh machine's first boot, whatever the command:truecan finish first and leave the kill for the next exec. In the egress suite that took 2 of 5 runs.ensureVmMachinenow settles a networked machine it just started with asleep 1exec, retried until one survives. That's one second per networked boot, and 6/6 green since.Deviations from the plan
.pi-agentand thenrm -rf …/sessionsfrom the copy. Done in place, that would delete pi's live guest sessions on every start. The copy is staged instead, and a test pins that guest sessions survive.auth.json({}) in the guest.zooid-placeholderis inside the base64 payload, sogrep -cgives 0.zooid-placeholder.1.0.2/ pi-acp0.0.34, copied from the agent-pi Dockerfile, where the plan expected them indocker/versions.json. pi 1.0.2's codex provider has the same request shape, client id and token URL as the 0.87.1 the plan read.Verification
pnpm test,pnpm typecheckand the CLI build are green: 1,480 tests pass.pnpm -C packages/runtime-vm test:vm(now includingvm-egress.integration.test.ts) andpnpm -C packages/cli test:vm(vm-cred-proxy.integration.test.ts) pass against real smolvm machines:agent-smokeimage, local-workstation config:pi --printreturnedproxy ok, logged as[cred-proxy] smoke-tester POST /backend-api/codex/responses → 200 (1924ms).bin/smokecheckout/build/configure/start onmain. The realsmoke_matrixwatch code then ran steps 2–4:Not verified: Step 4.5, the unattended run from a Lead handoff in
#product. It needs the local-workstation daemon running this build. The local-workstation changes (image, smoke tester, workforce) go in the z repo after this merges, per the plan.🤖 Generated with Claude Code