mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 21:36:40 -10:00
v0.1.0
205
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f2eac89211 |
fix(lima): on macOS, mount the project folder by its device and inode
A parent folder's VM can move a nested project folder aside and put a link in its place. The checks around a start refuse what they see, but a swap timed for the moment Virtualization.framework opens the share, and put back before devvm's last check, made the nested VM mount the link's target. On vz, the Lima backend now mounts the project folder as location /.vol/<dev>/<ino>, from the folder devvm recorded (the state's folder, passed as the new Want.ProjectID), with mountPoint set to its path. macOS's volfs opens the folder by its inode wherever it is, so the share is the recorded folder, never what's at the path. Checked first on a real vz VM (Lima 2.2.1, macOS 26): vz and Lima accept the /.vol location; with the folder swapped for a link before limactl start the VM read the real folder's files at the project path, and wrote there; limactl list --json keeps the location and mountPoint as set. vz serves the share by the path the folder had at the start, so once the folder is put back the VM gets Operation not permitted (as for any rename while it runs) until its next start, and replacing that path with a link while it runs gives the same: never the decoy. The Lima backend alone decides it: projectMount (vz with a recorded folder: by inode; otherwise, and on QEMU/9p, by path), used by CreateVM (the image's vmType, which its clone has) and Start's wantEdits, which now compares the project mount whole (location, path in the VM, writable) through keptMounts, so a start edits nothing when they match and limactl list's filled-in fields never cause an edit. Instance.Project is the mount's path in the VM, so devvm's comparisons, devvm ls, devvm ports and .git protection keep using the host path. mount_comma checks the path in the VM too. platform.VolPath parses a FolderID. The checks from the nested-replaced fix stay, as defence in depth and for Linux, where 9p has no equivalent. Docs: internals/lima.md (the mount, the compare), internals/overview.md (what's checked and what stays open per OS), safety/attack-vectors.md (the residual gap is Linux's only), using/vms.md. Tests: TestVolPath (parsing; on macOS the path opens a moved folder), TestProjectMountByInode (wantEdits on vz: as it is, another inode, moved, a comma, a path mount before, no folder recorded, --clone; QEMU by path; Instance.Project), TestCreateVMByInode (the clone's mount, no mount edit), TestUp (spec and start carry the state's folder), TestUpClone (none); e2e's project section: the folder swapped as limactl start runs and put back when it returns, through the parent's VM (macOS: the VM never sees the decoy, its mount is /.vol/<dev>/<ino> at the path; Linux: noted), and the next start runs no limactl edit. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
6fa5a82071 |
fix(vm): never start a VM on a project folder replaced after the finder found it
A parent folder's VM mounts a nested project folder read-write, so code in it can move the nested folder aside and put a link (to the home folder, or anywhere) in its place after devvm found the nested VM. Lima passes the mount's location as it is, and QEMU's 9p and Virtualization.framework's virtiofs follow the link when they open the share at the VM's start, so the nested VM mounted the link's target read-write. The e2e check below showed it on macOS (vz, virtiofs) and Fedora (QEMU, 9p) before this change: devvm restart, and a start whose limactl start found the link, both ran the nested VM with the decoy folder's files at the project path. devvm now checks the folder a start mounts (folderChanged: its path's links resolved give the same path, and its FolderID is the state's) before bringUp's host checks of a stopped VM, which would act on the link's target, just before the backend's start, and once it returns. Before the start it refuses (project_folder_changed); after, it stops the VM and its proxy and refuses (project_folder_changed_stopped). Both link to the new "A nested project replaced" section of using/vms.md; attack-vectors.md and internals/overview.md say what's checked and what stays open (a swap put back between the mount and the last check, and the boot it ran for). Tests: TestFolderChanged (a link in its place, a link above it, another folder, gone); nested_replaced.txtar, with the limactl stub's new start-links and stop-links switches (fails without the fix); the project section's "a nested project folder replaced by a link" (tests/e2e/ nested_test.go): replaced while the VM runs (9p keeps its folder, vz's virtiofs answers Operation not permitted, neither shows the link's), once devvm restart's stop ends, and as Lima starts it, through a limactl stand-in that has the parent's VM make the swap. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
48fee3a42b |
fix(agents): opencode history export drops well-known remote configs, tested on opencode's own schema
opencode 2.2.5's real database schema (sqlite3 .schema in an e2e VM after opencode auth import, opencode mcp auth and opencode run; no rows) is now a fixture, internal/vm/testdata/opencode-2.2.5.sql. TestOpencodeCleanSchema builds a database from it, plants a row in every table, cleans it, and checks that no byte of the copy holds a value of credential, account, control_account or account_state, while every other table's row (the session's included) stays; a table in neither list fails the test. The real schema has no session_share (opencode 2.2.5 keeps share_url on session_v2), and its kv table keeps each organization's remote config, fetched with a well-known login, under wellknown:config:<origin>, which the cleaning kept. The cleaning now deletes those rows (opencodeWellknown) and checks none is left. e2e's network check plants one too. Docs: the design note's steps and what it doesn't cover (plugin storage in kv, remote workspaces' bindings); Maintaining says when and how to refresh the fixture. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
8d44175601 |
refactor: the Go module is github.com/devvmhq/devvm
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
d209071ec3 |
feat(network): devvm-why and the agents' note point at a tool that skipped the proxy
With nothing blocked, the proxy's /blocked answer (devvm-why) adds that a DNS or connection error for an allowed host means the tool skipped the proxy, to turn on its own proxy setting or give it $HTTPS_PROXY, and links troubleshooting's A host on the allowlist doesn't resolve. The agents' note in ~/.claude/CLAUDE.md and ~/.codex/AGENTS.md says the same in one sentence. Tests: proxy_test's empty answer, network.txtar asks a running proxy's /blocked, and the e2e network section checks that curl --noproxy fails for github.com, devvm-why's hint and the note in CLAUDE.md. Docs: internals and safety network pages. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
7c205ce846 |
test(e2e): logins and the link, desktop and opencode checks wait for the event, not a fixed time
loginState and the Claude Code login's FIFO open wait with Until, in the check's window. lkOwnServer waits with Until for the client's own server; lkStopped waits for the network log's refusal of the stopped target, then checks it still doesn't run; the fake desktop server's check waits for its key event; the opencode keys check waits up to 10 s for no opencode process to be left before making its database again. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
49bf27b72d |
test(e2e): checks that prove a backend feature say so with Needs and Needing
The link, nix and --from sections take FeatureLink, FeatureNixLayer and FeatureFrom once with S.Needing; --from's docker and nix layer checks, the base VM's forward checks (FeaturePortsAll) and the listed ports' (FeaturePorts) name theirs. TestHarnessNeeds shows a check skipped, titled and counted on a fake doctor's backend without the feature. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
283d06e9a4 |
refactor(e2e): one owner for each of the Go e2e's text, launch, log, mount, process and leak helpers
The phase's review found helpers that the section ports copied: - firstLine (tools) duplicated FirstLine: every caller uses FirstLine. - tailLines moves beside FirstLine and LastLine (text_test.go), and LastLine and link's errorsOf are built on it. - Launch and launchWith share one launch (S.launch), which records the VM through OwnVM, in place of two copies of OwnVM's body. - Paths.RunLogs is the one reader of devvm's run-log folder: RunLogHas, NewestLog, the heartbeat, from's corpLog and network's two log reads use it, in place of six globs. - MountsOf is built on MountLine, in place of a second limactl list --json reader. - Procs reads the processes through psAll, as the process watch does, so the listing stays out of the check's log. - network's dialable goes: its check uses ReachesWithin and Local. - Res.Has is HasLine on its output; CA.Line is pemLine on its PEM; link's out is Trim; tools' lockSum is readText. - FilesHave goes: the desktop password's and agent save's checks that a secret is in no file here use NoLeak, which also fails on a file it can't read and names the file, never the secret. - project's tarList reads the export with exportFiles (Go's tar) in place of host tar -tzf. Tests: TestHarnessNetReaders covers LastLine and Res.Has; TestHarnessExport covers exportFiles and tarList. Contributing's testing page lists RunLogs, MountsOf and tailLines, and drops FilesHave. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
b6b60d5cf3 |
fix(agents): opencode 2 VMs get the store's changed logins and keys at each launch
opencode 2 keeps its logins in its database, so a VM whose database existed kept the logins it had: a key saved from another VM, or a ChatGPT login for another account, never reached it. Every launch's setup now sends the store's opencode logins as opencode auth import reads them (agentlogin.OpencodeImport: each API key the proxy puts in and OpenAI's Codex login, placeholders alone, IDs cred_devvm_<provider>; methodID chatgpt-browser and a whole-number expires, as opencode 2.2.5's credential schema needs). The new guest script assets/guest/opencode.sh reads them on its input, never argv, and, once opencode has a database, imports them when they differ from its record (~/.local/state/devvm/opencode-import.json) or when the database no longer holds one of devvm's IDs (deleted, or replaced by a history import; checked with opencode auth export, only the IDs kept). It logs out of devvm's earlier entries (opencode auth import skips an ID it has), imports each entry on its own and switches its provider to devvm's entry; the user's own credentials stay in the database. devvm agent login opencode --api-key runs the same script at once, in place of the old one-key import. The record lives in the VM because only the VM knows its database and what it holds. No partial success: a provider whose import opencode refuses is printed as devvm-opencode-failed PROVIDER, the script exits 1 and records nothing, so the next launch tries again, and devvm agent login names the providers in the new message opencode_import_failed. Three faults found on real opencode 2.2.5 VMs and fixed: bash -lc runs ~/.bash_logout (Debian's clear_console, failing without a terminal), which under set -e became the script's status after a good import, so the work runs in a subshell; opencode 2.2.5 made its database without importing auth.json while the script had recorded the entries anyway, so nothing is recorded until the database exists; and a missing expires becomes 0. Every VM also sets OPENCODE_DISABLE_AUTOUPDATE=1, beside Claude Code's DISABLE_AUTOUPDATER in base's /etc/profile.d/devvm-tools.sh: the agents are read-only shared tools whose versions mise pins. Tests: TestOpencodeImport; TestOpencodeScript (the script against a fake opencode: no database, an import, the same input again, a database made again, a refused entry); TestOpencodeRefused; TestToolsEnvironment; agent_login.txtar (the script at a key's save, opencode-import.json in the setup, a refused provider named through the guest stub's new opencode-refuses switch). e2e's network section: OPENCODE_DISABLE_AUTOUPDATE in an opencode VM's login shell; a second opencode VM with a database and a credential of its own gets a key saved from the first at its next launch, its own credential kept; and gets it again once its database is deleted and made again. Failures print opencode.sh's stderr, the run logs' opencode lines and the VM's credential IDs. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
3f2d3658ed | fix(network): allow the trust roots mise checks attestations against | ||
|
|
2545de19f3 |
test(e2e): the Go runner is the entry point, mise run e2e -- FLAGS, and tests/e2e.sh goes
TestE2E already set up the sandbox, slots, locks and flags itself, so the 898-line script only handed over. The run is now `mise run e2e -- FLAGS` (go test -tags e2e from tests/e2e, CGO_ENABLED=0) with the same flags: --only, --from, --clean, --every-feature, --slots, --slot, --newest-base, --golden, plus --reuse. - options: the flags named as the script's options; the hand-over flags (lock-holder, count, total, started, summary) and the ported/unported split are gone. - e2eUbuntuRelease, a const in sandbox_test.go, holds the Ubuntu pin; scripts/bump.sh e2e-ubuntu moves it (get_const), and TestE2EUbuntuPins, bump.txtar and the E2E workflow read it there. - From the script into Go: the OpenSSL-not-LibreSSL host check, and --newest-base's start line and its UPSTREAM DRIFT summary. - The script's leftover bash helpers (perl vm_state, no_leak, ca_*, lima_listens, the retry list, its heartbeat) are gone with it. - mise's e2e:go task merges into e2e; TestCommandLines drops its $D rule. - Docs (contributing, testing, maintaining, internals) and AGENTS.md name mise run e2e; testing.md's "Porting a section" becomes "Adding a section". Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
b4b19759c5 |
feat(guest): a guide to devvm in every VM, for the agents in it, and devvm-help
Every launch sends assets/guest/guide.md with the guest setup, and sync.sh installs it as /usr/share/doc/devvm/README.md (root's, mode 644, again whenever it differs) with /usr/local/bin/devvm-help, which prints it. The guide covers what a devvm VM is, network tiers and secrets, tools and installs, and the host commands to ask the user for. TestGuideCommandLines checks that the guide is among TestCommandLines' files and that each devvm command and flag it names exists. Docs: using/coding-agents.md's The guide in every VM. e2e: the project section checks the file's owner and mode, devvm-help's output and that the VM's user can't write it. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
6391a8ba48 |
fix(agents): opencode 2's history exports leave its credentials out
opencode 2 keeps its sessions and its logins in one SQLite database, ~/.local/share/opencode/opencode.db (opencode-<channel>.db for other channels), in WAL mode, so the history export, which tarred ~/.local/share/opencode, carried its credential table (logins, API keys, MCP OAuth tokens), account and control_account (its console's access and refresh tokens) and session_share's secrets to this machine, and an import gave them to another VM. The -wal file carries them too: it holds full page images of what opencode wrote last, a just-saved credential row among them, until a checkpoint, and opencode makes it at once. The export now copies each database in the VM with sqlite3 (base installs it: sqlite3 on Debian and Ubuntu, sqlite on Alpine), keeping the sessions: VACUUM INTO (one snapshot, the WAL's rows included); every trigger dropped; the login tables emptied (credential, account, control_account, account_state, session_share, and any table whose name or a column's says it holds a secret, for tables a later opencode adds); the record of opencode's auth.json import migration taken out, so the next VM's opencode imports the logins devvm's setup wrote there; WAL off and secure_delete with VACUUM, so no free page keeps a deleted row; then the rows counted, and the database left out on any failure or without sqlite3. tar leaves the database and its -wal, -shm and -journal files out and adds the copy at its path (--transform, links' targets kept). The import does the same in the VM to an export it unpacks (one devvm didn't write may hold the logins): it deletes the -wal, -shm and -journal files and any database that isn't a regular file, and puts in the copy, or nothing. Every sqlite3 runs with trusted_schema off. opencode 1's mcp-auth.json joins the logins left out. Rejected: excluding the database (loses opencode's sessions); opencode session export (runs opencode and its server per session, and per project, which rm's export can't count on). Security review (security-audit skill, guidance mode, data isolation and lifecycle): export scope, the WAL, import of an export holding the logins, a trigger restoring rows and a hostile schema each have a holder and a test (design.md's threat check). Not covered, documented: a secret pasted into a session stays in it; a VM without sqlite3 exports no opencode database; a remake's home copy keeps the database's logins, as it's the same VM's data going to the same folder's VM. Tests: TestOpencodeClean (a running opencode's database, its credential only in the WAL of an open connection, an account's tokens, a share's secret, a later table's key and a trigger: none in any byte of the copy, the session kept; a file that isn't a database gives none), TestHistoryExportRuns and TestHistoryImportCleansOpencode (GNU tar, with and without sqlite3); the CLI tests' export calls; e2e's network section plants a key with the VM's sqlite3 and finds neither it nor the login's placeholders in devvm history export's file. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
500f70d8b0 |
test(e2e): the link and from sections in Go
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
50e517938c |
fix(tools): opencode 2's model catalog, models.opencode.ai, on opencode's allowlist
opencode 2 reads its model catalog from models.opencode.ai (core/src/models-dev.ts's defaultSource) and no longer from models.dev, which it reads only from a custom source that lacks the v2 catalog. opencode.ai stays for Zen, the console, MCP's OAuth client and its schemas. e2e's network section checks both hosts are reached. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
fbab32b6e7 |
test(e2e): the project and desktop sections in Go
tests/e2e/project_test.go and desktop_test.go port tests/e2e.sh's project and desktop sections, every check title word for word and in the same order, with the same macOS and Linux branches (130 checks on a Mac, 122 on Linux, with desktop's 16, its local proxy's two included). tests/e2e.sh drops both blocks and the helpers only they used (tty_run, mounts_of, host_port_kept, lima_serve, vm_say, lima_boot, ports_live, desktop_*, watch_*), their host-tool checks and cleanup lines, and lists them in go_sections. The project section sets the sandbox's Claude Code logins (which an earlier network run leaves in devvm's store) aside while its agent VMs run, as those VMs expect none, and puts them back after. The emptied CA's check looks for the CA in the VM's bundle with vmHas. Harness files: text_test.go (SaidLine, FirstLine, LastLine, Trim, FilesHave, Listed, Locked, Procs, Forwarders, DevvmIn, OwnVM), net_test.go (Reaches, ReachesWithin, Answer, Local, Local6, HostProgram, LimaServe, VMSay, LimaBoot, PortsLive, HostPortKept), tty_test.go (TTYRun, with Cmd's new Input), watch_test.go (WatchSees, WatchMisses), ssh_test.go (SSHAgent, StopPid, KeyComments, RfwdLinks), goe2e_test.go (ExecQuoting, ServeDesktop, Desktop's View and End). They use the shared s.Start, NewCA, WatchProcs, MountLine, HasLine, ExitStatus, gitTool, sshTool, devvmCmd, grepF, readText, vmHas, loopbackOnly and limaListens. testing.md lists them. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
36f910839e |
fix(desktop): browsers reach the web through a local proxy that adds the VM's password
Chrome, Chromium and Firefox ignore the password in HTTP(S)_PROXY, so in devvm desktop they asked for the proxy's username and password on every site. The guest setup now writes devvm-local-proxy, which socat (now in the desktop layer) serves on 127.0.77.1:3128, the VM's loopback alone. For each connection it reads the request's head, drops the client's Proxy-Authorization and Proxy-Connection, adds the VM's password and sends it to devvm's proxy, then socat carries the rest both ways. It takes only CONNECT HOST:PORT and absolute http(s):// requests, the latter with Connection: close, so each connection's one request carries the password. devvm-desktop starts it and points the Xfce session's http_proxy, https_proxy, HTTP_PROXY and HTTPS_PROXY at it; on Xfce, Chrome and Chromium read those, and Firefox reads them first with its default system proxy setting. A blocked host still gets the proxy's 403. - proxy.LocalProxyAddr, LocalProxyPort, IsLocalProxyAddr: the one owner of the address, sent to the guest as DEVVM_LOCAL_PROXY (vm.localProxy). - vmssh: the port forwarder never forwards a server on 127.0.77.1. - Tests: netpolicy's TestLocalProxy runs sync.sh's script (bash 3.2 on macOS) against a fake proxy: the password replaced, Connection: close, a tunnel, the 403 passed on, origin-form and junk refused with 400 before any connection; TestListeners, TestIsLocalProxyAddr, TestLocalProxy (vm), sync.txtar. e2e desktop (tests/e2e.sh, still the bash section): the session's variables, the listener on 127.0.77.1 alone, curl without a password to github.com, example.com's 403 over CONNECT and plain HTTP, 400 for origin form, nothing on this machine's 3128. - Docs: using/desktop.md (Browsers), internals/desktop.md (The local proxy), design.md's desktop note, ports.md, network.md's setup. Security review (security-audit skill, guidance mode, local IPC and proxy request handling): - Fixed by design: devvm forwards every VM port by default, so a local proxy on 127.0.0.1 would have put a password-less route to the VM's proxy, and its secrets, on the host's localhost for every local user. The forwarder now skips the local proxy's address on every port. - The password goes only to the VM's proxy, whose address is fixed in the script, never to an address a request names, in the one header the local proxy adds; devvm's proxy strips Proxy-Authorization before forwarding. It's never in a process's arguments (bash builtins only). - Web pages: requests from a page to the loopback are origin form, refused with 400 before any connection; a page can't send CONNECT or an absolute-form line, and DNS rebinding changes only Host. - No new power in the VM: the same password is in /etc/environment; the script is mode 700, the VM user's. - Residual: a program in the VM can hold up to 256 connections slowly (30 s a line, 100 headers), only against the VM's own browsing; an ssh -L the user types to 127.0.77.1:3128 would expose it, as any forward they choose. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
db90ab1b5b |
fix(tools): opencode 2 in VMs, with its Codex logins and its database
devvm's pinned mise (2026.10.7) resolves aqua's "latest" to GitHub's latest release, which opencode keeps on its 1.x line (v1.19.5) while it publishes 2.x beside it, so ls-remote lists 2.2.5 but lock picks 1.19.5. The shared tools' mise.toml holds opencode at "2", which locks the newest 2.x on every platform (linux-arm64/x64 and their musl entries, the same assets as 1.x). opencode 2 keeps its logins in its SQLite database and imports auth.json once, as it makes its credential table. devvm agent login opencode runs its Codex logins (opencode auth login openai --method chatgpt-browser or chatgpt-headless), which still post to auth.openai.com/oauth/token with Codex's client ID, so the capture and the host's refresh are unchanged; its Sign in with ChatGPT (/api/accounts/oauth/token, a client of its own and an id_token checked against OpenAI's keys) stays refused by the proxy's guard. An API key saved into a VM whose opencode has made its database is imported with opencode auth import (OpencodeKeyImport). Tests: TestOpencodeKeyImport, the login argv, agent_login.txtar's import and its failure, the guard on opencode 2's token-sharing path; e2e's network VM gets opencode and a device-code login against the fake endpoint. tests/e2e-mise.lock bumped (opencode 2.2.5, claude 2.1.318, pnpm 12.18.0). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
721dab3b1f |
test(e2e): the network and nix sections in Go
networkSection (network_test.go) and nixSection (nix_test.go) port tests/e2e.sh's network policy and nix layer sections, every check title, order, skip, tier and retry as there: 66 checks on macOS (4 skipped elsewhere: Seatbelt is macOS's) and 18. The fake token endpoints, the loopback listener and the LAN server run with s.Start; secrets go on stdin or in environments, never in arguments. netharness_test.go: devvmCmd, launchWith, vmRun, inVM, vmOut, vmGrep, vmHas, failed, out1, grepF, readText, lineWith, countWith, countLine, modeOf, jsonAt, jsonFileAt, pemLine, pids, proxyRuns, devvmSecret, forgetSecrets, web (get through a proxy, with roots), proxyURL, rootsOf, unverified, lanAddr, dialable, limaListens, loopbackOnly, python3Tool; TestHarnessNetReaders and TestHarnessWeb. tests/e2e.sh hands network and nix to Go (go_sections) and drops their blocks and host-command needs. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
cc5f11008a |
test(e2e): the images, tools and clone sections in Go
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
9e822cd538 |
test(e2e): the shared helpers in Go: a company proxy, the run's CA, no_leak and the process watch
The helpers that several of tests/e2e.sh's sections share, ported to the Go runner's harness, so the section batches use one copy each: - s.Start(Cmd) and Proc: a background command in its own process group, past its window, stopped by Stop or the run's end. - StartCorp(s) and Corp (corp_start, corp_stop): a devvm _proxy on 127.0.0.1 at slot 0's port 18766, its password in its config (mode 600) and in Env's HTTPS_PROXY/HTTP_PROXY only, never in its arguments; URL, Addr, Password, Saw, Log, Running, Stop. - WriteProxyConfig(s, file, proxy.Config) (proxy_config), with the proxy's own Config and Encode. - NewCA(s) and CA (e2e_ca, ca_serve, ca_stop, ca_gone): the run's CA in Go's crypto/x509, made once; Trust, Untrust, Serve, StopServing, Sign, Line, GoneFrom; Paths.CAs is devvm's CA folder. - NoLeak(secrets, paths...) (no_leak): SEEK_DATA/SEEK_HOLE, so a sparse disk's holes are never read; names the file, never the secret. - GuestHasNone(s, vm, secrets, dirs...): sudo grep in the VM, the secrets on its input. - WatchProcs(s), ProcWatch, ProcsHave(s, secret) and ProcsFlaky() (ps_watch, ps_unwatch, the retry list's reason). - Paths.ToolVersion(tool) (lockv). Their tests: TestHarnessNoLeak, TestHarnessToolVersion, TestHarnessStart, TestHarnessProcWatch, TestHarnessCorp, TestHarnessCA. tests/e2e.sh's helpers stay until their last section is ported. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
09f7f3b568 |
test(e2e): the Go end-to-end runner, tests/e2e, and its gc section
tests/e2e (build tag e2e) is the end-to-end runner in Go that takes over
tests/e2e.sh's sections one at a time. TestE2E is the run, with
tests/e2e.sh's options as flags (-e2e.only, -e2e.from, -e2e.clean,
-e2e.every-feature, -e2e.slots, -e2e.slot, -e2e.newest-base, -e2e.golden)
and its own -e2e.reuse. It keeps the sandbox (each slot's paths, Lima
home, XDG folders, Keychain service, ports +100 per slot, the lock),
devvm built from the checkout, config.toml and the pinned tool lock, the
host-tool check, the output lines (PASS/FAIL/SKIP/RETRY [n/N], times,
ETA), the heartbeat, each check's time limit (process groups: TERM, then
KILL), the timings files and the check-count guard (keyed by a checksum
of tests/e2e's Go files), the retry of checks marked Flaky, the slots'
plan, seeding (clonefile, reflinks) and summing, and the cleanup of only
what the run made.
Files: main_test.go (TestMain, TestE2E), options_test.go (flags),
sandbox_test.go, runner_test.go, check_test.go (S, Check, Skip, Flaky,
Builds, Tail, Needs), cmd_test.go (Run, Devvm, DevvmNames, Msg, Limactl,
InVM, Status), state_test.go (Paths: State, VMOf, VMDir, KeysOf, Record;
NewProject, Launch, Reuse, Layer, Own, Until, Settle, Port, Defer),
shared_test.go (Golden, GoE2E), slots_test.go, clone_{darwin,linux}_test.go,
sections_test.go (the table), gc_test.go (the gc section, its five check
titles tests/e2e.sh's word for word) and harness_test.go (TestHarness*,
no VM, run by scripts/test.sh).
tests/e2e.sh no longer has the gc block: after its own sections it hands
the chosen sections that go_sections lists to TestE2E in its sandbox and
under its lock, passing its pid, check count, expected total and start,
and adds the Go run's summary.go to its results. mise run e2e:go runs the
Go runner on its own. golangci-lint builds with the e2e tag; tests/e2e may
print, exit from TestMain, signal its own process groups, and run and read
its sandbox's commands and files.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
760e602d18 |
fix(agents): host-side login refreshes trust the user's CAs
An agent's OAuth refresh (Claude Code, Codex, opencode) runs in the VM's proxy on the host and goes through the company proxy, but trusted only the system's roots, so a company proxy that inspects TLS made it fail. Each secret lookup's context now carries the proxy's own roots, the system's and upstream_cas (proxy.WithRoots, RootsOf), which the refresh's client trusts through the new fetch.Client.Trust. Tests: fetch TestTrust, agentlogin TestRefreshTrustsTheProxysRoots and proxy TestLookupRoots, each against a TLS server signed by a test CA; the e2e network section's Claude refresh check now expects success. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
62cdd16dd4 |
feat(agents): devvm agent login claude, Claude Code's login captured in the VM for every VM
Claude Code logs in from inside a VM, so this machine never needs it, and devvm keeps one Claude Code login on the host for every VM with Claude Code: the subscription's OAuth login, or a Claude Code token from claude setup-token. The newest replaces the other. The VM holds placeholders alone, so claude /login in a VM no longer leaves real tokens there. - Capture: every VM's proxy captures at platform.claude.com and console.anthropic.com /v1/oauth/token (agentlogin.Endpoints), only for a VM whose image has Claude Code (netpolicy.Capturer). setup-token's code grant (expires_in, agentlogin.SetupToken) gives the claude secret (agentlogin.ClaudeToken, secrets.Token's checks) and the VM the secret's placeholder. Any other code grant goes in the store's .claude/.credentials.json (a File of kind agentlogin.ClaudeOAuth: claudeAiOauth accessToken, refreshToken, expiresAt ms, scopes); the VM's reply holds sk-ant-oat01-devvm-proxy-managed-oauth-<salt> and a managed refresh token, and the VM's own refresh is answered from the store. Refused: a new login without user:inference (Console), any login or refresh with org:create_api_key, an access token that isn't sk-ant-oat01- shaped. - One login: saving the claude secret (captured or devvm secret set claude) removes the OAuth login, and an OAuth capture deletes the saved token, both under the claude logins folder's lock (agentlogin.LockFolder); a token that can't be deleted is a warning. CLAUDE_CODE_OAUTH_TOKEN in devvm's environment wins, as in Claude Code (secrets.ClaudeOf(store).Login). A launch gives the VM either CLAUDE_CODE_OAUTH_TOKEN or ~/.claude/.credentials.json (placeholder, managed refresh token, expiry 2099), never both. Both bindings (claude, claude-oauth) go into Authorization for api.anthropic.com while either login exists, and Store.Get gives each the login devvm keeps now, so a running VM survives the switch. - Refresh: the host refreshes the OAuth login when due, JSON to platform.claude.com with Claude Code's client ID and the login's scopes, through the company proxy (proxy.RouteOf), under the file's lock; claude_refresh_failed says to log in again. - devvm agent login claude [--setup-token]: claude auth login --claudeai or claude setup-token in the VM without CLAUDE_CODE_OAUTH_TOKEN, the code pasted back on this terminal (no forward); the VM is set up again once the store has a new login of the kind asked for (secrets.ClaudeOf(store).Sums); claude_env_token_wins when the environment's token wins. --device-code, --api-key and --stdin are usage errors with claude, --setup-token without it. - Confirmed in Claude Code 2.1.317's linux-arm64 bundle (sha256 checked): TOKEN_URL platform.claude.com/v1/oauth/token, client ID 9d1c250a-e61b-44d9-88ed-5944d1962f5e, the JSON code and refresh bodies, setup-token's expires_in 31536000 and user:inference scope, the claudeAiOauth fields, the anthropic-beta oauth-2025-04-20 header Claude Code sends itself, claude auth login's pasted code#state on stdin. The real claude auth login logged in in e2e against the fake. - Messages: agent_login_claude_paste, claude_login_saved, claude_setup_token_saved, claude_env_token_wins, agent_login_claude_flag, agent_login_setup_token_alone, claude_refresh_failed, claude_no_login; no_claude_token, claude_token_invalid, claude_token_howto and not_setup_token point at devvm agent login claude. - Tests: TestClaudeCapture, TestClaudeSetupToken, TestClaudeOAuthGet, TestCaptureRefuses' Claude cases (agentlogin); TestOneClaudeLogin, TestClaudeBindings, TestClaudeOAuthVMCopy (secrets); TestCapturer's Claude cases (netpolicy); agent_login.txtar's Claude section; network.txtar's bindings. - e2e (network): the fake company proxy fakes Claude's token endpoint and Anthropic's API too; setup-token's request makes the claude secret; devvm agent login claude runs the real claude auth login, the store keeps the login, the claude secret goes, the VM holds placeholders and no token, the API gets the store's token for the VM's placeholder; a due login makes the host refresh through the company proxy (which fails there, as the host doesn't trust the run's CA). - Docs: Claude Code login (using/coding-agents.md), first VM, the home page, README, commands, settings, safety/network.md, internals network.md, the design note's risk that this path is unofficial, Contributing's e2e, the proxy README; the CLI reference. Security review (security-audit skill, an independent read): - Fixed: a login granting org:create_api_key would let a VM make an API key through the binding and get it unread: refused, on refresh too. - Fixed: a refresh could install a Console login when the store had none: the scope check applies to every new login. - Fixed: any VM, without Claude Code, could replace the login or delete the token with a refresh grant: only a VM with Claude Code captures. - Fixed: two captures at once could leave neither login: one lock. - Fixed: a saved token that couldn't be deleted gave the VM a 502 for a saved login: a warning instead. - Fixed: captured and refreshed access tokens are shape-checked. - Accepted, documented: the bound login reaches every api.anthropic.com path its scopes allow (profile, sessions); any VM with Claude Code can replace the login; a token Claude Code mints in a VM for another use (install-github-app) becomes devvm's login. - Unconfirmed: whether another Anthropic host also answers /v1/oauth/token (it would pass unguarded). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
2df3c6840c |
feat(agents): devvm agent login, an agent's login in the VM for every VM
devvm agent login codex|opencode logs the agent in from inside this
folder's VM, so this machine never needs Codex or opencode, and devvm's
agent store keeps the login for every VM with the agent. It sits under
devvm agent beside import and save: it fills the store, as they do, and
a bare devvm login would read as a verb on the VM itself.
- Browser login (the default): the agent's own login runs in the VM on
this terminal (codex -c cli_auth_credentials_store="file" login;
opencode auth login --provider openai --method "ChatGPT Pro/Plus
(browser)"), and devvm forwards this machine's localhost:1455, and
1457 (Codex's fallback) when free, on 127.0.0.1 and ::1, to the same
ports on the VM's loopback, only while the login runs: closed when it
ends, fails or is interrupted (AddCleanup), and an interrupt also ends
the agent's login in the VM (its pid kept in ~/.cache/devvm-login.pid),
so its server doesn't linger for the VM's port forwarder. Port 1455
taken on this machine: refused, naming --device-code.
- --device-code: codex login --device-auth, or opencode's headless
ChatGPT login; nothing forwarded.
- --api-key [--provider anthropic|openai|openrouter] [--stdin]: the key
is asked for on this machine (msg.Question answered by --stdin) and
saved in the store, never in the VM: Codex's auth.json becomes
{auth_mode: apikey, OPENAI_API_KEY}, opencode's gets the provider's
{type: api, key} beside the others; the running VM gets its copy with
a placeholder and its proxy the binding at once.
- The proxy's capture (agentlogin's capturers) saves ChatGPT logins;
devvm then confirms what the store saved, with the account's email,
and fails when the login saved nothing new.
- opencode 1.19.5 has no Anthropic OAuth in its core (no Anthropic
plugin among its built-ins), so there's no pasted-code capturer:
Anthropic is an API key. opencode's OpenAI login listens on 1455 only;
Codex 0.166 on 1455, falling back to 1457.
- vmssh: SSH.ForwardLoopback (LoopbackForward: listeners in devvm's own
process, each connection its own ssh -W to the VM's 127.0.0.1, no
master; ErrPortTaken).
- agentlogin: KeyProviders, File.SetKey, File.ChatGPT.
- secrets: Store.SaveKey, LoginSum, ChatGPT (loginsDir shared with
Capture).
- vm: AgentLogin (agentlogin.go), LoginAgents.
- cli: agentlogin.go (--device-code, --api-key, --provider, --stdin,
--here/--parent); usage errors before anything runs.
- assets/guest/sync.sh: cli_auth_credentials_store = "file" first in
the VM's ~/.codex/config.toml on every launch.
- Messages: agent_login_* and agent_key_*; codex_no_key,
codex_no_chatgpt, codex_refresh_failed and opencode_refresh_failed
point at devvm agent login.
- Tests: agent_login.txtar (usage errors, no VM, no agent, device code
argv, browser forward and its end, the agent failing, a login saved
while it runs, port taken, interrupt, API keys, the VM's copy failing,
no terminal, an empty key), unit tests for the forward, SetKey,
ChatGPT, SaveKey, the confirmation and the argv; coverage baselines
raised.
- e2e (network): the real Codex's login in the VM against the run's
fake token endpoint, its callback opened through the forward, the
store's tokens and key, placeholders in the VM, the forward gone; an
interrupted login takes its forward away.
- Docs: Logging in with devvm agent login (using/coding-agents.md),
the Commands page, the questions table, Contributing's e2e, the cli
skill's tree, AGENTS.md; the CLI reference.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
3823c41e57 |
test(e2e): the network section finds this machine's LAN address on the default route's interface, not only en0 or en1
On a Mac whose LAN is on another interface (the mini's Ethernet is en8) the address came out empty, so the open and internet tiers' LAN checks failed. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
0a28f98f0a |
feat(agents): devvm agent save, a VM's agent settings into devvm's store
devvm agent save [AGENT...] reads the folder's VM's agents' settings,
shows what differs from devvm's agent store and, after a yes, saves them
there for every VM: import's other direction. It always asks, with no
flag that answers (RefusedWith), so without a terminal or with
--no-input it shows the diff and is refused; devvm starts a stopped VM
for it.
What it reads (a fixed list, the agents asked for only): agentFilesOf
(Claude Code's settings.json and CLAUDE.md, Codex's config.toml and
AGENTS.md), agentDirsOf (skills, agents, commands, output-styles,
plugins with marketplaces; prompts, skills), opencode's config folder's
entries but node_modules and lock files, and ~/.claude.json's subset
(claudeTopKeys, reduced by jq in the VM and again on the host, never its
per-project entries). Never a login (.credentials.json, auth.json) or
history. The guest script sends it as a tar stream; a folder that's the
store's own mount (the link to it) is no change.
Every byte from the VM is untrusted, checked on the host (readSent):
- the stream bounded: 128 MiB, the command cancelled past it; its
stderr into the run log, at most 1 MiB
- at most 20,000 entries, a file at most 16 MiB (its header first)
- paths relative, clean, valid UTF-8, only characters a terminal shows
(no control, format, bidi or zero-width), each once, only in the
list, each inside a folder the stream has (nothing below a link):
anything else saves nothing
- only files, folders and links; other kinds left out with a warning
- links never written: one inside its settings folder to a file there,
by relative paths through real folders, at most 8 hops, becomes a
copy; any other is left out, the store's copy kept
- modes normalized: 600, or 700 when executable; no set-id bits
- every file written with state.WriteFileMode; folders replaced in
place (pruneStore through an os.Root), files the VM lacks kept
- every settings file parsed whole (Redact's decode), left out when it
doesn't parse
- placeholders never saved: agentlogin.Restore puts the store's value
back only where the VM's copy (the store's file redacted again, or
for .claude.json the VM's salted claudeVM copy, as every VM gets)
had the same placeholder at the same path and its table and the one
above are unchanged; else the file is left out. A placeholder in any
other file leaves it out; opencode's withheld files, which no VM
gets, are left out.
The diff (data output): each file's lines against the store's, settings
files and .claude.json redacted on both sides so it never prints a
secret, a folder's A/M/D list then each added or changed file's diff, a
mode change line, every character a terminal wouldn't show as \u{HEX},
binary files named only, a file over 1 MiB or 10,000 lines and lines
past 20,000 as counts. Then agent_save_runs: every VM runs the hooks,
MCP servers' commands and plugins saved.
Security review (security-audit skill, guidance mode, an independent
read): nothing reaches outside the store, follows a link, or sends a
store secret to another host. Findings, all fixed here:
- folder files showed only as A/M/D names, so a changed hook or
script went in unseen: their diffs are shown
- invisible Unicode (tag characters, zero-width) passed
msg.Printable into the diff: shownLine escapes every non-graphic
character
- names with bidi or format characters spoofed the diff's headers:
refused in entryName, headers escaped too
- the diff could use GBs of memory on 16 MiB files of newlines: per
file and total caps
- Restore's rewritten JSON/TOML hid a change among reformatted lines:
both sides are diffed as rewritten
- the VM's stderr went into the run log without limit: 1 MiB
- quadratic work over many opencode folders: entries indexed by folder
- an execute-bit change showed no line: a mode line
Found in my own review: the diff printed the store's secrets in
context lines (now redacted), and a VM could replace opencode files
it never got, such as a .env (now left out). With captured logins,
HasPlaceholder also knows the JWT-shaped placeholders (fakeJWT's
devvm-placeholder signature, now jwtMark), so a captured token's
placeholder copied into a settings file is never saved; the save never
writes Codex's or opencode's auth.json or Claude Code's
.credentials.json, which the capture keeps in the logins store.
- agentlogin: Restore, PlaceholderError, HasPlaceholder, ClaudeSubset,
ClaudeTopKeys; Redact and ClaudeCopy share decode/encode
- vm: AgentSave (agentsave.go), readSent, listedPath, resolve,
agentSaveScript (agentsave_read.go), lineDiff, shownLine
(linediff.go); opencodeFolder/opencodeFile from agentDirs/agentFiles
- cli: devvm agent save, with --here/--parent
- messages: agent_save_no_agent, agent_save_none, agent_save_nothing,
agent_save_ask, agent_save_runs, agent_save_refused, nothing_saved,
agent_settings_saved, agent_save_unsafe, agent_save_too_much,
agent_save_link_left_out, agent_save_kind_left_out,
agent_save_unparsed, agent_save_placeholder, agent_save_withheld,
agent_save_not_read, agent_save_failed
- stub: agent-save.tar, the VM's stream
- tests: agentsave_test.go, linediff_test.go, restore_test.go,
testdata/script/agent_save.txtar; e2e project (refused, then saved,
never the login or a link out) and network (MCP header put back,
refused once its URL changed)
- docs: coding agents (saving a VM's settings), commands, attack
vectors, internals network (saving the copies back), contributing,
the cli skill's tree, CLI reference
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
2151d1b959 |
feat(proxy): capture agents' logins at their token endpoints
A login that Codex or opencode makes inside a VM goes to devvm's agent store, and the VM gets only placeholders. Every VM's proxy intercepts OpenAI's token endpoint (auth.openai.com/oauth/token, listed in its config's captures for Codex and opencode on every tier), and its host joins the allowlist of a VM whose image has either agent. This is the proxy's first response rewriting (ModifyResponse, stdlib only). - proxy: Config.Captures, IO.Capture (Capturer: Request, Response), Exchange; a POST to the endpoint's path (cleaned, without ;params, any case) is read (64 KiB) and its 2xx reply (1 MiB) goes to IO.Capture, never to the VM; the VM gets IO.Capture's reply with only Content-Type, Cache-Control, Pragma and Date; a "login" event names the agent; what can't be read gets 502, logged as a refused block, values never logged. - agentlogin: Endpoints, Pick (the User-Agent tells opencode, Bun's, from Codex), File.CaptureRequest and File.Capture under lockLogin: Codex's auth.json (tokens, account_id, last_refresh; the id_token->API-key exchange's key in OPENAI_API_KEY, the VM's id_token placeholder swapped for the store's on the way out), opencode's auth.json openai entry, Claude Code's .credentials.json (capturer only: no VM captures Claude yet). A code replaces the login, a refresh adds to it (newest refresh token kept). The VM's reply: the bindings' placeholders, refresh token devvm-proxy-managed, expiry 2099. - secrets: Store.CaptureRequest, Store.Capture (folder private, out of backups), the token endpoints' hosts in secrets.policy. - netpolicy: Capturer (devvm _proxy's IO.Capture: the VM's salt, its agent, the bindings written again at once); devvm network log shows login lines. - e2e (network): a fake token endpoint behind a company proxy of the run's own, with the run's CA; the store gets the real tokens and key, the VM placeholders and no refresh token, no log holds a value, the next launch gets the login as placeholders. - Docs: Logins made in a VM (internals/network.md), coding-agents.md, safety/network.md (the account swap), the proxy's README. Security review (security-audit skill, plus an independent read): - Fixed: a VM could spell the path another way (/oauth/token;x) and get real tokens uncaptured: path parameters dropped before matching. - Fixed: another path on the host could hand the VM tokens: any 2xx from a token endpoint's host naming access_token, refresh_token or id_token is refused, whatever its type (web pages pass unread); 101 refused. - Fixed: 1xx replies (103 with Set-Cookie) reached the VM before ModifyResponse: dropped on token endpoints' hosts. - Fixed: Set-Cookie and other headers on a captured reply reached the VM: only four headers kept. - Fixed: an error reply to the exchange could quote the real id_token: it reaches the VM as its OAuth error code alone. - Fixed: a captured request went upstream under the VM's raw path and query: it goes to the endpoint's own path, no query. - Fixed: repeated form or JSON fields, which devvm and the endpoint could read apart, are refused. - Fixed: captures depended on the image's agents, so a self-installed Codex logged in uncaptured: every VM's proxy captures at the endpoint. - Fixed: at most 8 bodies read whole at once. - Fixed: the VM's refresh with its managed refresh token is answered from the store, so a VM's Codex isn't logged out after 8 days. - Fixed: a login saved whose bindings write failed reached the VM as a 502: it reaches the VM, the error is logged. - Accepted, documented: any VM with the agent can replace the store's login (an account of its choosing); on the open tier a program can go around the proxy; Claude Code's own /login in a VM isn't captured. - Unconfirmed: domain fronting through a sibling OpenAI host whose tunnel isn't intercepted (depends on the CDN routing on Host). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
d94929523d |
feat(vm): a new VM shows a summary, then asks whether to customize it
Before devvm makes a new VM it shows a summary of what the VM gets: each toolchain, coding agent and layer with why (the file that calls for it, devvm setup, config.toml or the flag that gave it), its size, network tier and ports, and the devcontainer.json it's made as. Where the picker shows (CanPick) and something is left to choose, it asks "Customize it? [y/N]": Enter makes the VM as shown; y opens the picker (a part a flag gave greyed out), then the network tier question when no tier is given or saved, then the VM's CPUs and memory (for this VM alone). Without a terminal or with --no-input the summary ends with the flags that choose others. The summary replaces new_vm_gets and devcontainer_using. devvm's first run asks its size and agents first, as before, then shows the summary. A test build's DEVVM_PICK_ON_PIPE shows the picker with a terminal on stdin alone, so testscript's ttyin reaches it (up_customize.txtar). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
fcbab78670 |
refactor(secrets): one path for secrets, placeholders on every tier
Every VM gets its CA, its proxy setup and placeholders, whatever its tier, so even an open VM never holds a real secret: a request that goes around its proxy carries only the placeholder. - vm/sync.go: the open branches of stage go (the agents' logins copied as they are, the ClaudeCopy for unconfined VMs and its MCP warning, real values in ~/.config/devvm/env); stageNet is stageSecrets, run for every VM, and the salt is every VM's. - netpolicy: Prepare readies the CAs, salt and secret files on every tier, and the proxy config carries the CAs and bindings on every tier; dropCA and its caller are gone, so a VM keeps its CAs as its tier changes. - Removed without a caller left: the messages secret_unuse_copied, net_on_old_tokens and claude_mcp_secrets_copied; secrets.Store.ClaudeCopy and MCPSecrets; agentlogin.MCPSecrets, claudeSecrets and argsHoldSecrets; settings.CompanyProxy.ConfigOnly. - Tests: TestPrepareOpen (open has CAs, salt, secrets; CAs kept across tiers), TestInterceptOpen (an open proxy puts secrets in, 421 for another host), TestStageSecretsEveryTier (every tier's setup sends the VM's CAs, the guard against a tier's own path); sync, ca, network and secret scripts for open VMs. - e2e: network checks that an open VM holds no real secret (its proxy puts the token in over TLS the VM verifies, a direct request carries only the placeholder and gets a 401); project checks an open VM's placeholder, and its company-CA checks allow for the VM's own CAs in /etc/ssl/devvm.pem. - Docs: safety/network (tiers, secrets), internals/network, the design note's tiers threat check, attack vectors, coding agents, first VM, staying safe, contributing; devvm secret's help. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
ceda0bf925 |
feat(cli): --network TIER, devvm network TIER and the tier question
The command line names the four network tiers. --network TIER (open,
internet, allowlist or none) chooses a new VM's tier, checked before
anything runs (arg_not_choice). devvm network open|internet|allowlist|none
gives the folder's VM a tier through Net.SetTier, and devvm network -g
takes the tiers and ask. config.toml's and settings.json's network is ask
or a tier (settings.NetworkChoices, checked against netpolicy.TierNames
by a test, since settings can't import netpolicy).
The question on creation is Proxy.Choose(vm): net_about says what each
tier reaches, net_ask asks for one (Answer, AnsweredBy("--network")),
Enter or a refusal gives allowlist, and an answer that isn't a tier is
warned of (net_tier_unknown) and asked again. devvm setup's picker
offers ask and the four tiers (network_default_open, _internet,
_allowlist, _none). On an existing VM, --network is ignored with the
devvm network TIER command that changes it.
devvm network --json: policy is the tier or unenforced, and each policy
file whose denies alone apply (internet and none) has denies_only: true,
as the text output's "(denies only)", so a script can tell a file's
denies from all of its rules without knowing the tier rules.
Messages reworded: net_tier_backend (--network open), net_open_policy
(devvm network allowlist), net_about, net_ask, network_default*,
net_default_failed, network_failed, setting_already's and
widen_parent_vm*'s descriptions. safety/network's "Choosing a tier"
replaces its on/off section; docs, the cli skill, testscripts and e2e
use the new forms, and e2e's internet and none checks go through devvm
network.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
c0f4b8fb5c |
feat(netpolicy): network tiers in state, confinement and the proxy
A VM's network is one of four tiers, open, internet, allowlist and none, in its state's net section (netpolicy.Tier), in place of on/off. Every VM has its proxy. Confined tiers start on NetProxy; open starts on the backend's own network with its proxy set in the guest (Confinement.GuestProxy): on Lima no Seatbelt profile and no QEMU wrapper, the proxy at 192.168.5.2 on both hosts, propagateProxyEnv off. The proxy: Config.Open (every host and address, no floor, no policies), Config.DenyPolicies (files whose denies alone apply), the rule port :* (any port), and ** matching address literals (the floor still holds). Policies per tier (netpolicy.PolicySet): internet is network/internet.policy (**:*) plus your denies; none is the agents' built-in policies, the secrets' hosts and your denies; open none. Links: a client links only to a target on its tier or a stricter one, and a group's VMs are all on one tier. The self-check per tier: open asks its proxy through the guest's settings and warns (net_proxy_unreachable). devvm ls and devvm network show the tier. A backend without egress-proxy offers open alone (net_tier_backend). devvm network on/off and --network-policy/--no-network-policy map to allowlist/open. Design note, threat check and docs; e2e in the network and link sections. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
317bd8f978 |
feat(agents): devvm's agent store, filled by devvm agent import
Every VM gets its agents' settings and logins from devvm's own store, never from the agents' files in the home folder: settings in ~/.config/devvm/agents/<agent>/, logins in ~/.local/share/devvm/logins/<agent>/ (folders 700, files 600, each agent's logins folder kept out of Time Machine), each laid out as in a home folder. The store's settings folders are mounted read-only and linked into the VM's home; its files and logins are copied in, with network policy as placeholders the proxy fills from the store. devvm agent import [AGENT...] [--force] copies the home folder's agent settings and logins into the store once: only agentDirs, agentFiles and secrets.LoginRel's paths, never history; .claude.json reduced to its settings, account state and MCP servers; read through each agent's folder as an os.Root, so no link out of it is followed (a link to a file inside becomes a copy, any other is left out with a warning, and so is a login file that's a link); Claude Code's plugin records renamed to the store's folders. It asks before replacing what the store has (refused without a terminal, naming --force), replaces in place, keeping the mounted folders, and prunes what the home folder no longer has. - paths: Dirs.AgentSettings, Dirs.AgentLogins - secrets: LoginRel, LoginFile(Dirs, kind), SaveLogin, HasLogin, Store.ExcludeFromBackup; Logins, VMLogin, ClaudeCopy, MCPSecrets and the proxy's Get read the store - vm: agentStore, agentMounts/homeSkips/Inventory.Mounts take Dirs, syncer.stageAgents, AgentImport; the guest's links file holds each folder's home path and its mount's (host_home is gone) - structure: callers takes methods (pkg.Type.Name); Dirs.AgentSettings only in vm/agents.go, Dirs.AgentLogins only in secrets/secrets.go - messages: agent_import_none, agent_import_nothing, agent_import_replace, nothing_imported, agent_settings_imported, agent_login_imported, agent_import_link_left_out, agent_login_read_failed, agent_import_failed; the login refresh messages point at devvm agent import - tests: agentimport_test.go, testdata/script/agent.txtar, sync and network scripts through the store, e2e project and network sections - docs: coding agents (devvm's agent store, importing from this machine), README, getting started, safety, internals, contributing Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
c4318f1c57 |
test(e2e): a file written without sync just before devvm stop is kept
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
10a2a69b80 |
test(e2e): the moved-folder check's home file is written, synced and checked, and a failure shows the VM's home and mounts
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
0b82dc189f |
feat(vm): a moved folder's Claude Code history follows it
A folder move records the path the agents' state is under in the VM's state (the moved section, set in recordMove under the VM's lock: the first move's old path, kept through more moves, cleared by a move back). The VM's next setup gets a moved file with both paths and their Claude Code slugs (claudeMoved, claudeSlug), and guest/claude.sh's claude_project_moved renames ~/.claude/projects/<old slug> to the new one, or merges into it without replacing anything, and moves ~/.claude.json's projects entry (claude_json_project_move, kept on its own for reuse). Once the setup succeeds, followed clears the section. The slug is Claude Code's own rule (2.1.318's sanitizePath): every UTF-16 unit but an ASCII letter or digit a dash; over 200, cut and ended with "-" and abs(h*31+u, int32) in base 36. Tests: TestClaudeSlug, TestClaudeMoved, TestClaudeProjectMoved, TestMovedTo, TestFollowed, TestMoveHere's record and its clearing, move.txtar, e2e project's moved checks. Docs: commands.md's moved folder (Claude Code, Codex, opencode), internals overview. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
d17e62961e |
refactor(msg): one message for each kind of setting, flag and requirement
Messages that said the same thing for different settings are one message each, given what differs: - new_vm_flags_ignored and new_vm_flags_ignored_run (flags, vm, command) replace from_ignored, net_flag_ignored, git_protect_flag_ignored, size_flags_ignored, ports_flag_ignored, parts_flags_ignored, ssh_agent_flag_ignored and no_devcontainer_flag_ignored: one warning for each command that changes the same on the VM, naming only the flags given (ignoredFlags). - setting_already (command, vm) replaces net_already, agent_already, clone_on_already and clone_off_already. - setting_set (vm), for a stopped VM, replaces net_set_stopped, agent_set_stopped and links_next_start. - next_start (count, vm), for a running VM, replaces net_set_running, agent_set_running, size_next_start, agent_next_start, mounts_next_start, folder_next_start and net_off_next_start; a launch warns of each change with its next_start_* line, then next_start once. - program_missing, program_broken and program_old (+ _fix) replace lima_missing, lima_broken, lima_old, qemu_missing, macos_old and their _fix messages; the minimum versions are minLima and minMacOS in the lima backend, passed into program_old. - ports_list_needed replaces link_ports_invalid: devvm link publish and unpublish check their ports with ParsePortList, as devvm ports add does, and ParsePublish is gone. - no_vm replaces no_vm_link. - vm_unfinished says nothing of the user's is in the VM, as remake_unfinished does. Kept apart: git_protect_next_stop (it applies at the next stop, and devvm stop applies it), already_stopped and ports_all_already (not settings), group_already (joining again syncs the group's links), has_tools and has_layers (they name which of those given were there), docker_missing (Docker is optional, so it never says to install it). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
d58b24affe |
refactor(ui): prompts in one place: each question declares its answer
Every question is a msg.Question that declares what answers it where
devvm can't ask: AnsweredBy("--force") names a flag or command, which the
refusal names (no_input), and RefusedWith(msg.X(...)) gives a question no
flag answers its own refusal. msg.AnswerFor and its table go.
The Reporter's Ask, Confirm and Answer, and the UI's Secret, take a
Question and return a *msg.Refusal where they can't ask: with --no-input,
without a terminal, or at the end of the input, one refusal for all three
causes. Commands return it through the failure path (showFailure ->
UI.Refused: the question, then the refusal); nothing dies on an unanswered
question any more. Questions with a usual answer fall back on it instead:
network policy on, restart no, history import later, the Include line
warned, an unenforced VM stopped, the first run's size kept.
Gone: confirmed() in cli (4 callers), force_needed and no_input_terminal,
vm.Env.CanAsk and ui.CanAsk, vm's interactive, setup's terminal, the
Reporter's StdinIsTerminal/StdoutIsTerminal and the Fake's StdoutTerminal,
and every caller's terminal check (18 in vm, netpolicy, build and
sshconfig; 3 CanAsk; 1 interactive; 2 in cli). The picker's check
(CanPick) stays in the picker, which keeps its choices with --no-input
too; setup and the first run's agents and the new-VM summary still read
CanPick, because what they save or say depends on whether the picker
showed.
A Question's About context (the network policy's, a secret's howto, the
restart's changes, the size's host) is said only when it's asked.
devvm update asks before its tools change, so a refusal leaves the VM as
it is.
The CLI tests answer through a terminal (ttyin) or, explicitly, with a
test build's DEVVM_PIPED_ANSWERS=1, a line of input each.
Tests: ui's TestConfirm, TestAsk, TestAnswer, TestPromptsOnlyAtATerminal,
TestSecret, TestNoInput, TestNoTerminal, TestNoAnswer, TestPipedAnswers,
TestRefusedInterrupted, TestPickNoInput; msg's TestQuestionRefused,
TestQuestionAbout; cli's agreement test TestQuestionsDeclareAnswers (every
AnsweredBy names devvm's flags and commands, every RefusedWith a message,
no Question made otherwise) and TestCheckAnswer; vm's
TestSizeChoiceRefused; testscript prompts.txtar (each cause, a refusal of
its own, piped answers).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
2a99183ea4 |
feat(vm): devvm update reads a changed devcontainer.json again
devvm update now makes the folder's VM again from its devcontainer.json as it is now when the file changed, is gone or appeared since the VM was made, as well as when its image is outdated. devcontainer_changed and devcontainer_new name devvm update instead of devvm rm, then devvm. A file's forwardPorts now join the VM's ports as devvm ports add adds them, for a new VM and when devvm update reads the file again. - vm.json's devcontainer section records what of the VM is the file's: image (the file's image, when the base starts from it), from_flag (--from won), parts (what its features mapped to), gave (those the VM got from the file alone, not from --tools/--layers, setup's layers, the folder's other files, nor unchecked), ports (its forwardPorts) and ports_gave (those it added to the VM's ports). - devcontainer.Reread (pure) drops what the file gave that it no longer lists and adds what it lists anew that the VM lacks; the user's stay, and what the user took out stays out. It applies to parts (rereadParts) and to ports (filePorts, through AddPorts and RemovePorts, as devvm ports add and rm). devcontainers.reread re-pins a new image (or falls back to $DEVVM_FROM's), keeps --from's, and replaces variables and commands. - The remake section carries reread (the new from, shared tools, ports and devcontainer section; tools built for the new base after the image) and was (what the VM had, kept when the new machine is made), which the undo gives back, for every remake. - Messages: devcontainer_changed/new reworded, devcontainer_reread and devcontainer_gone added, devcontainer_ports_not_forwarded removed; the docs link points at the new "Updating a VM from the file" section. - Tests: TestReread, TestRereadParts, TestFilePorts, TestFileParts, TestUpdateDevcontainer (undo and finish), TestUpDevcontainer and TestPlanDevcontainerFrom (the file's ports added), devcontainer.txtar (a new VM's ports, update after a change with the user's port added and the file's removed, --from winning, the file removed, a file that appeared), e2e's devcontainer section (the file's port reaches this machine; devvm update, the home kept, the new port in place of the old one). - Docs: using/devcontainer (its ports, the security note), images, toolchains, commands, the internals overview's remake section and state table, the design note, the security model, attack vectors. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
e9ca7a4859 |
feat(vm): a moved or renamed project folder keeps its VM
A VM's files and machine are keyed by its name's hash, which stays; what moves is the state's dir. The finder finds a folder's VM by the state that records its path (finder.state: the path's hash first, then every state, recorded), so a VM moved there is found from the new path alone, and links by path (project.ForDir) match the recorded dir. When the folder has no VM, the finder looks through the states for one made for this folder at another path (moveHere, move.go; the match is here.movedFrom): the same folder identity (device, inode, birth time), the folder this user's, its identity unique (platform.UniqueFolderID: an ID with a birth time, and on macOS APFS or HFS+), another recorded path that's gone on the folder's device or only a symlink to here, its creation finished, not a --clone VM. One match is offered: in a terminal move_vm, [y/N]; without one vm_moved_here, naming devvm adopt; devvm adopt --force moves it without asking. Several matches warn (vms_moved_here) and move none. Never automatic. The move (finder.move) refuses a folder no new VM may have (checkUnsafe), holds the creation locks of the VM and of the folder's would-be new VM, checks again that no state records the folder and that the folder is still the one asked about (move_folder_changed), stops a running VM as devvm stop does, then records the path and identity under the VM's lock, refusing a state that changed meanwhile (create_running); vm_adopted says so. .git protection's record is kept: .git, its identity and its uchg locks move with the folder. The project folder's mount is now part of backend.Want (Want.Project, Instance.Project, Apply), so the next start mounts the folder where it is: Lima's wantEdits rebuilds .mounts in its one edit when the project mount or the agent folders differ (mount.project). A VM running with another path asks to restart (Y/n) and otherwise warns (next_start_folder, folder_next_start). A new VM at the old path can't use the moved VM's folder, so newName takes the first of the path's names whose VM folder holds no state (project.Nth: the hash of the path, then of the path and n). devvm adopt [VM]: with VM (by name or alias, as devvm rm VM), moves a VM whose folder is gone or not connected to this folder, for a copy on another disk (a new inode, never matched on its own): adopt_move_vm [y/N], --force, adopt_move_refused without either; refuses a --clone VM (adopt_clone), a lost machine (rm_vm_lost), an unfinished VM, a folder still there (adopt_folder_there) and a folder with a VM of its own (adopt_has_vm). It clears .git protection's record, as the copy's .git is another. rm_vm_state_mismatch is gone, as a dir needn't hash to the name any more: devvm rm VM acts as devvm rm only on the folder's own VM (finder.folderVM), and a VM whose state names a folder with another VM of its own is refused as one whose folder is there. macOS's FolderID has the folder's birth time too, as Linux's has. Security review (security-audit skill, focused, with an independent read): inode reuse needs a unique identity (birth time; APFS/HFS+ on macOS), the same device (in the ID) and the old folder gone; another user's folder never matches (its owner checked); a copy has a new inode and never matches; links and groups go by name and stay, and links by path take the recorded dir, a move refused when another VM records it; a symlinked cwd is resolved first, and a symlink at the old path counts only when it resolves here; .git protection's record stays for a move and is cleared for a copy; agents' mounts are unchanged (only the project mount changes); a VM can rename only folders inside its own mount, which it already writes. Fixed from the review: a folder swapped at the path while devvm asked was moved to (now move_folder_changed); macOS device:inode could collide with a later volume given the same device number (birth time added); a running VM kept the old path's share, which a new folder made there would reach (the move stops it first); a move to the home folder or into devvm's own folders (now checkUnsafe). FolderID's format change makes VMs and .git records made before it look like other folders (adopt them, or make them again). Tests: TestMovedFrom (table: gone/present, same/different device and inode, a non-unique ID, another user's, a clone, unfinished), TestMovedAway (gone, a folder, symlinks here/elsewhere/dangling), TestMoveHere (refused, no, yes, found by its dir, stopped, the new mount at start, a restart for a running old mount, a new VM at the old path by its next name), TestMoveFolderChanged, TestAdoptMoved, TestMoveHereSeveral, TestAdoptVM, TestUniqueFolderID, ForDir and Nth in project, wantEdits' moved project, the conformance start's moved project; move.txtar (refused, no, yes, found, Lima's mounts edit, a new VM at the old path, adopt VM of a copy); rm_vm.txtar's hand-edited dir; e2e project: mv, refused, a yes in a terminal (script), the home file kept, the new path mounted alone, moved back with adopt --force. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
b8d0bb0a3b |
test(history): devvm history import on Alpine --from VMs runs GNU tar
devvm history import needs GNU tar: busybox's refuses --absolute-names,
--quoting-style, --anchored and --skip-old-files ("unrecognized
option", exit 1), so on busybox the import would fail before unpacking
anything. Every --from VM already has GNU tar: Debian and Ubuntu always
do, and base's Alpine branch installs Alpine's tar package, which takes
/bin/tar over busybox's (it's in base's key with the rest of base.sh).
TestHistoryImportHasGNUTarOnAlpine holds base.sh's Alpine apk add to
tar. e2e's from section checks GNU tar in the Debian 12 VM and the
Alpine VM, imports an export into the Alpine VM and refuses one with a
path outside the agents' history there, looking for the escaped file by
name (busybox's grep -r over the home ran past the check's limit). The
import's page says it works on every VM; --from's says why Alpine's
base gets GNU tar.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
c98f91d8ad |
feat(history): devvm history import, and a new VM offers its folder's newest export
devvm history import [FILE] puts an export of agents' history into this folder's VM: FILE, or the newest export devvm saved for the folder (by its .folder file, through vm.Exports.Newest), never another folder's. The file is streamed into the VM as it is, and the VM's GNU tar unpacks it there as the VM's user, so the host never reads it. The VM lists the export's paths as they are first and imports nothing when one is outside the agents' history, absolute or has a .. part (history_import_unsafe). It unpacks into a folder of its own without owners or modes and without the agents' logins, ~/.claude.json (the old VM's placeholders) and every agent's mounted folders and copied files (importSkips), takes out symlinks pointing outside, then copies the history paths into the home without replacing what the VM has. A new VM with an agent offers the folder's newest export: in a terminal it asks, [y/N] (history_import_ask); without one it says how to import later (history_import_later). The import runs once the VM has started, before its setup, and a failed one only warns. Messages: imported, history_not_imported, history_import_unsafe, history_no_export, import_failed, history_import_ask, history_import_later. Tests: TestHistoryImportScript, TestHistoryImportRuns (GNU tar only), history_import.txtar; the stub guest keeps an import as history-in.tgz and takes a history-unsafe switch. e2e's project section: rm, a new VM in the same folder naming the export, devvm history import, the history checked in the VM, and a refused export with a .. path. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
edc2ea1151 |
test(e2e): the link VMs reserve the link checks' ports
The client's 257 connections in the link limit check took their own ends from Linux's ephemeral range (32768 to 60999), which holds every fixed port of the link section. Those the client closed stayed in TIME_WAIT for 60 s, and a bind of 127.0.0.1 on such a port fails then, SO_REUSEADDR or not: so the hostile-sshd check's ssh -R to 47348 and the group join's server on 47346 failed in slot 1, both within a minute of it, both even ports as Linux's connect() picks. lk_prep now reserves $P47240-$P47249 in each link VM (ip_local_reserved_ports, in /etc/sysctl.d too, for its restarts), and lk_cap checks it first. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
e13839aa41 |
feat(cli): every command on the folder's VM takes --here and --parent, resolved in one place
The VM a folder uses is decided once, by vm's resolveFolder, from the folder's own VM, the nearest parent folder's (with any repo of its own in between) and the command's rule (vm.Env.Folder): by default the folder's own, else the parent's unless a nested repo is in between, else none (devvm makes the folder's own, other commands say no_vm). --here takes only the folder's own; --parent takes the parent's across a nested repo and past the folder's own, and refuses a folder inside none with a VM (no_parent_vm). devvm asks nothing now, in a terminal or not: use_parent_vm and use_parent_vm_repo are gone. The questions before deleting, remaking or widening a parent's VM stay. find resolves through it; own is the folder's own VM (adopt, --clone); lookup and useParent are gone; Options.Here is the rule's. cli: addFolderFlags (flags.go) adds --here and --parent into the run's app, which vmEnv sets as the rule; the two are exclusive, and with -g where a command has it; --clone and --parent are exclusive; devvm rm VM takes neither (rm_vm_folder_flag). Commands: devvm, restart, stop, update, rm, code, desktop, host, history export, tools (add, rm, update), size, ports (add, rm), network (allow, deny, rm, log), ssh-agent, git-protect, clone, secret use, secret unuse, layer add, layer rm, group (join, leave), link (add, rm, publish, unpublish). Tests: TestResolveFolder (own, parent, none, nested repo, --here, --parent), TestFolderFlags (every folder command takes both, and no other; refusals before anything runs; the rule each sets), the parent tests and subfolder.txtar's cases updated for no questions and --parent. Docs: the Commands page's subfolder section, first VM, --clone's subfolders, the overview's subfolder VM; the CLI reference regenerated. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
cf30bdfd99 |
test: golden fixtures from the real tools, captured by e2e
testdata/golden/<os>/ holds what the real tools printed, and the tests check devvm's parsers and the stubs against it on any machine: limactl-version.txt and limactl-list-stopped.json (TestLimactlStubContract's dummy instances, with STUB_GOLDEN set), limactl-list-running.json (a running project VM), qemu-img-info.json (base's disk, Linux), qemu-img-info-overlay.json (a project VM's, Linux, when project runs there), security-missing.txt and tmutil-isexcluded.txt (macOS). - tests/e2e.sh --golden captures them into the checkout: images runs the contract test with STUB_GOLDEN, qemu-img info, security and tmutil; project lists its first VM. Home, user name, full name, timezone and a VM's environment are replaced (golden in e2e, anonymous in Go). A capture isn't a check, so check counts don't change; --slots passes it on. - TestGoldenLimactlVersion, TestGoldenLimactlList and TestGoldenQemuImgInfo read every system's fixtures through limaVersion, Lima.list and diskInfo, and check every field the stub prints is one the real tool prints, of the same kind (the stub's listing after the contract scenario); TestShapes checks the comparison and anonymous. TestGoldenSecurityTmutil checks the stubs' exit status and form on macOS. Captured on this Mac (e2e --only images,project,tools --slots 2 --golden) and on Fedora (--only images --golden). Docs: testing.md's Golden fixtures, contributing (--golden, the stubs), AGENTS.md's testdata row. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
d9d169e972 |
fix(tools): a --from base never builds tool images other VMs mount
gnu tool images, which any VM whose tools need their key mounts, always build in a clone of devvm's own Ubuntu base on the VM's backend, never in a --from image, whose code runs as root in its build. --from Debian and Ubuntu VMs mount those images, and tool_needs_glibc still refuses a base too old for one. When devvm's own base isn't built yet, devvm says so (tools_need_own_base) and builds it first, pinning the cloud image on its first build as usual. musl tool images build in the VM's own --from base, and their keys hash that base's digest (image.Tool.Base, tools.Target.Base, from the base's record), so they're only ever another VM's on the same container image. Their records keep it (base). devvm tools add, tools update and update build a musl VM's base first, its digest looked up, so the keys they work out are those of the base the images build in. Every gnu key hashes devvm's own base, so no image built in a --from base under an earlier key is mounted again. Share.Build reads the record of the base it's about to clone and refuses any but the one the images are for (buildsFor, tools_wrong_base): base from Ubuntu's cloud image for gnu, a --from base with the target's digest for musl. Tests: TestBuildOnlyInItsBase (hostile --from gnu and musl bases, a layer, no record), TestUpFromTools, TestToolsAddFrom, TestToolFile's musl digest, TestToolFileRefuses, TestToolTarget's digest; from.txtar: the clone of devvm's own base, a base record that says it came from a container image refused (tools_wrong_base), and tools_need_own_base before devvm's own base is built; e2e from checks where the Debian and Alpine VMs' tool images built and the musl records' digest. Docs: internals/images.md (building tools, keys, the share, listing), using/from.md, using/images.md, using/space.md, internals/design.md, internals/security.md, contributing's e2e list, AGENTS.md's tool-key rule. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
a25c0c34f1 |
test(e2e): --slots seeds base's package cache into each slot
seed_packages clones slot 0's packages/*.deb into slot K (APFS clone or reflink, else the slot builds its own, named) and copies packages/sets/, so a slot with a cloned base passes the package-cache images checks. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
70c4a0a204 |
test(e2e): --newest-base builds base from Ubuntu's newest image and packages
tests/e2e.sh --newest-base builds base as a user's first build does: devvm gets no DEVVM_UBUNTU_RELEASE, so it pins the newest cloud image, and the packages come from the mirrors. It runs in a sandbox of its own (slot 0's paths with -newest, its ports +1000), whose images, tool images and package cache it deletes first, so the cached pinned images stay as they are. Its sections are images, project and tools unless --only says; it refuses --slots and --slot, and keeps its times under timings/<tier>-newest. It reads the newest release from Ubuntu's listing at its start, as scripts/bump.sh e2e-ubuntu does, and the images section checks that devvm pinned it and booted base from it with no fallback to the release before (origin_no_boot). The images record check compares with that release (base_release). Its summary names the release Ubuntu listed and the one devvm pinned, and a failure prints UPSTREAM DRIFT with the release. Maintaining says when to run it (before each release and every week or two) and what to do when it fails; the end-to-end tests' page lists the flag. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
5ae2d4ef79 |
test(e2e): a symlink in a mounted agent folder can't reach host files outside it
The project section's agent folders check puts two host symlinks in the mounted ~/.claude/skills, one relative and one absolute, both pointing to a fake file elsewhere in e2e's own HOME. In the VM, readlink shows both links, and reading through them (as root) never gives the file's contents. It passes on macOS (vz, virtiofs) and on Linux (QEMU, 9p). The coding agents page's Mounts section says so. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
c53b6e2d15 |
test(e2e): in_vm is exported, so checks run in bash -c can call it
The clone section's clone on and clone off checks call in_vm inside bash -c, which only sees exported functions. Co-Authored-By: Claude Opus 5.5 <[email protected]> |