mount_cache.txtar, on a Linux host: a VM an earlier devvm left strict,
with no cache mode chosen, after devvm mount-cache none, converts strict
to on (git_strict_converted) and switches the cache in the same start,
with exactly one limactl edit that sets 9p's cache none, then mounts the
folder again; its state has git.mode=on and mount.cache=none.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
After a start that switches a Linux VM's project folder to cache none,
devvm checked the remount with findmnt -no OPTIONS, but the Alpine
--from base has no util-linux and busybox has no findmnt, so an Alpine
VM got an empty answer and was stopped with mount_cache_unchecked. The
guest now prints the folder's line of /proc/self/mountinfo, picked by a
POSIX awk (lastMount) that busybox runs: the last line whose mount
point is the folder exactly, as mountinfo escapes it (mountinfoPath:
\040, \011, \012, \134), which awk reads from the environment, as -v
would undo the escapes. devvm reads the mount's and its file system's
options from it (optionsOfMountinfo), refuses an answer that isn't a
mountinfo line, and keeps the 4 KiB cap, the last line and "unknown"
for a mode it doesn't know.
- TestOptionsOfMountinfo, TestMountinfoPath, TestLastMount: real lines,
9p with and without cache=0x5, Alpine's without optional fields,
stacked mounts, a path with a space; awk run on them.
- The stubs' guest answers with a mountinfo line; the start tests and
the mount_cache script check the new command.
- e2e: the from section's Alpine VM, given Lima's mmap with no mode
chosen, gets none from devvm mount-cache none at its next start on a
Linux host; the e2e helper reads mountinfo too.
- design.md and tests.md say how the check works and what e2e checks.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
rc.2's notes tell users to run devvm update for transparent mode,
since their images predate dnsmasq, socat and nftables, and no fixture
test ran it. fixture_v010_update.txtar runs it on the frozen 0.1.0
fixture:
- web, a --clone VM, is refused before anything runs (remake_clone),
so its clone and its work stay as they are.
- app without a terminal: vm_changed changed=base, then no_input, and
nothing changes.
- app with --force: the remake exports the history, saves the home
folder, sets the old machine aside, clones today's base, puts the
home back and deletes the old machine. It keeps the VM's ID, tier,
ports, shared tools (moved to the newest first), the github secret,
its link group and .git protection (on on macOS, off on Linux, as
0.1.0 left them), and the launch it ends with gives transparent mode
the stand-in address.
- The remake keeps the project folder's cache mode as the state has
it: 0.1.0 chose none, so on Linux app keeps Lima's mmap, its mount
still without a 9p cache option and the launch still warning;
devvm update is no opt-in to none.
- On macOS, app left strict is converted to on by the update's start
(git_strict_converted), and diff.ignoreSubmodules is out of its
.git/config.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 9p cache and transparent-mode branches each added a vm.json
setting without running its command on the frozen 0.1.0 fixture, which
the fixture policy asks of a change to state.
- fixture_v010_mount_cache.txtar (Linux): 0.1.0's app VM shows mmap
with the warning; devvm mount-cache none is pending while stopped, the
next start makes it in one limactl edit with 9p's cache none and
mounts the folder again, and the start after that edits nothing.
- fixture_v010_network.txtar: app, with no transparent mode of its own,
follows the default, on, and its launch gives the setup the stand-in
address; devvm network transparent off and on go in its state and
apply from its next launch.
- checkV010Others: no 0.1.0 VM has a cache mode or a transparent mode
of its own.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm git-protect strict (0.1.0, 0.1.1-rc.1) set diff.ignoreSubmodules =
all in the locked .git/config, which can't keep git on this machine out
of a submodule the VM adds: a .gitmodules ignore line the VM writes
overrides it, and git add -A/-u, describe --dirty, diff-index,
diff-files, fetch and pull recursion and --ignore-submodules on the
command line enter submodules anyway (#37). --clone is the only way to
keep VM code away from host git.
- devvm git-protect takes on|off; strict is a usage error
(git_protect_strict_refused) naming devvm clone on. Use, help,
completion (Modes) and --json reflect it.
- A VM left strict reads as on (Mode, Next) and is pinned and kept as on.
The first check that finds it stopped (Check, then converter.unstrict:
launches, devvm stop, devvm clone on and its undo) removes the value all
from the .git/config of each repo its state recorded before that check,
under the host's git lock, and only where .git's identity is the
recorded git_id (a replaced .git, or a VM with no record after devvm
adopt, is left alone, its all named with the manual remedy:
git_strict_unknown). Each config is read through safefile first,
unlocked for the edit and locked again even after an interrupt
(context.WithoutCancel), and checked to still be a regular file in that
.git afterwards (git_lock_raced). On a watching host, a config whose sum
isn't the check's is left, and the new sums go into the watch's. An
interrupt records nothing. Then on is recorded (mode and next) with one
warning (git_strict_converted), none when next is off. Set on/off and
Unlock (devvm rm) remove it the same way, silently (strictLeft).
- strict recorded nothing about a value it overwrote, so nothing can be
restored: only all is removed (--unset-all '^all$'); any other value is
the user's and stays. This fixes off, which unset any local value.
- A config another VM keeps locked keeps it, named with the manual
remedy (git_strict_kept, via msg.M.Value), and its repo goes in the
state's strict_left, retried at each later stopped check until empty.
A config git can't change is named (git_strict_left).
- Messages: git_locked and git_embedded_new say what on can't stop;
git_locked_strict and git_config_failed go.
- Docs: .git protection's Strict section becomes VMs that were strict,
with the remedies; on and Not covered say a submodule or repo the VM
adds runs through host git until the next check names it, and only
--clone keeps VM code away; attack vectors, How it works, the design
notes, the commands table, ls, the cli skill and the CLI reference
follow.
- Tests: strict_test.go (conversion, values kept, off/on/unlock, nested,
kept and retried, replaced and unrecorded .git, interrupted, next off,
changed since the check, Linux pins and sums, Watch, next, a failed
edit), TestUnstrictFIFO, msg TestValue, git_protect.txtar,
git_pins.txtar, fixture_v010_strict.txtar (0.1.0's app VM made strict
on macOS), e2e project checks on macOS and Linux.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On every confined tier, a tool that ignores the proxy settings (workerd
under wrangler dev, a static Go binary, a container made through Docker's
API) reaches the VM's proxy by the names it looks up. In the VM, dnsmasq
answers every name with the stand-in address 198.18.0.1 and has no
upstream; nftables sends that address's ports 80, 443 and those the allow
rules name to socat listeners on it, which make each an authenticated
CONNECT transparent.devvm.proxy:PORT to the VM's proxy. The proxy reads the
host from the connection's first bytes (TLS SNI, or each HTTP request's
Host) and judges it as CONNECT host:PORT, with the same order of checks,
log, secrets and floor. A blocked HTTPS host gets the 403 over a
certificate from the VM's CA. Nothing new runs on the host, and the
backends don't change.
Proxy (internal/proxy):
- transparent.go: TransparentHost, ProxyDomain, SentinelAddr,
IsSentinelAddr, ViaDNS, transparent (serve, take, tls, handler,
refusePage, ports), sniHost, replay, reservedRefusal, withVia, viaOf.
- routeFor and route: the one order of checks for CONNECT and the
transparent path; carry, the one tunnel with its SNI check; block split
into the record and blockPage; links.refuse split (isLinkDomain);
caEndedRefusal's test moved to routeFor; handshake and serveOne shared
by intercept and the 403 page.
- devvm.proxy reserved whole, CONNECT devvm.proxy:P included; the stand-in
address refused with its own reason.
- Hosts and SNI in ASCII alone, never folded (the Kelvin sign), in
splitHostPort, sniMatches and sniHost.
- A ClientHello record past 16 KiB + 256 is never read; once it starts,
a ClientHello must arrive whole within 10 s, on every tunnel; a stream
whose first byte is 0x16 is TLS from then on, so a record header that
doesn't come whole, or isn't TLS's version, is refused, never passed on
unchecked; and only a ClientHello that parsed (sniOf) counts, so one
split across records is refused, an address's tunnel's included, which
may have no name (a gap older than this change).
- routeFor carries the method and path rules: a host they narrow is
refused where it can't be decrypted and intercepted where it can, on
the transparent path too.
- On the transparent HTTP path, devvm.proxy answers /blocked alone.
- policy.transparentPorts and /transparent/ports: 80, 443, then the ports
allow rules name for hosts by name, at most 32, never 22 or 53.
- Event.Via ("dns"), shown in devvm network log, /blocked and the prompt's
note as "without proxy settings".
Guest (assets/): base.sh installs dnsmasq(-base), socat and nftables;
guest/transparent.sh is devvm-transparent: setup and teardown from
sync.sh (the proxy URL on stdin), the supervisor service (systemd or
OpenRC), the ruleset (render: two filter chains at -150 keep every
interface but lo and Docker's bridges, and every protocol but TCP, UDP
and ICMP, off the stand-in address; both NAT chains at -110 map every port of
the stand-in address, so Docker's published ports never take one; DNS to
public servers and 127.0.0.1:53 go to dnsmasq, which listens on the
stand-in address alone; private, link-local, CGNAT and loopback servers
are left alone, but the VM's own name servers, which Lima's DHCP adds
beside 127.0.0.1 and Docker gives containers, go to dnsmasq too), slots,
the port list's check, and status for devvm-why. Names without a dot and
names under the search domains (this machine's network's, through Lima)
don't resolve.
Setting: config.toml's transparent-proxy, and devvm network transparent
[on|off], the VM's own value in net.transparent (Settings.Transparent,
SetTransparent; netpolicy.TransparentOf, TransparentAddr); the setup gets
DEVVM_TRANSPARENT_ADDR while the VM runs confined and its mode is on.
devvm network --json has transparent; devvm network lock lists apart the
hosts only tools without proxy settings reached (Learned.NoProxy, via in
--json). vmssh.dialAddr refuses the stand-in address.
Tests: the transparent path's unit tests and FuzzTransparent; the
setting, TransparentOf, FormatEvent's via and learned hosts; the ruleset,
slots and port list under bash 3.2; network_transparent.txtar and
sync.txtar; e2e: transparentRuns, the network section's checks, a docker
step, the from section's Debian 12 and Alpine on the allowlist tier, and
the guarantee checks run with transparent mode stopped and running.
Docs: safety/network.md (tools that ignore the proxy, what isn't
covered, the setting, logs, lock), internals/network.md (tools that skip
the proxy), internals/design.md (the design note and threat check),
using/settings.md, using/troubleshooting.md, using/limits.md,
using/images.md, safety/attack-vectors.md, internals/lima.md,
contributing/tests.md and testing.md, the proxy's README, the CLI
reference and the Commands page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Linux's 9p client loses data with Lima's default cache=mmap for a
writable share: a stat() during an extending write() takes the host's
stale size and writeback drops the data, so files reach the host empty
or cut to 4096 bytes even after fsync (Claude Code's Edit sets it off);
and on devvm's Ubuntu 26.04 guest kernel, a lock after a write makes the
next read return zeros, which breaks SQLite in any journal mode and
Gradle's daemon. macOS's vz VMs use virtiofs and aren't affected.
- New VMs on a Linux host record cache mode none in a new mount section
of vm.json, and their project folder is made and started with it, as
is the folder devvm clone off mounts. VMs whose state has no mode
(0.1.0's, and every VM made before this) keep Lima's mmap untouched,
with no limactl edit, and each launch warns (mount_cache_unchosen)
until devvm mount-cache none.
- devvm mount-cache [none], with --json: none is the only mode devvm
sets, so any other value is a usage error (mount_cache_invalid); a
stopped VM gets it in its next start's one edit, a running one after
the restart devvm offers. macOS refuses (backend_lacks), and so does a
Linux VM whose folder isn't a 9p mount (mount_cache_no_choice). No -g
or config.toml key: every new VM gets none.
- The start that changes the mode mounts the folder again in the guest,
as cloud-init rewrites fstab only after systemd has mounted it, through
the logged runner with a minute's limit (output pipes closed a second
after), then checks it with mountpoint and findmnt, reading 4 KiB at
most and only the last line: a folder left unmounted stops the VM and
fails the start before its shell (mount_cache_unmounted), and so does a
check that gets no answer (mount_cache_unchecked); one still mounted
with the old mode is warned of (mount_cache_remount_failed), any mode
but none or mmap named unknown. An interrupt meanwhile, on any tier,
leaves a cleanup that stops the VM, the one stop then. A launch into a
running VM asks the guest, in words, whether its folder is a mount
point, and refuses one that isn't (project_unmounted) or whose check
fails or gives no answer (project_unchecked). A stored mmap, from a
build before none alone, reads as none chosen, and devvm clone off
records none for its new mount; any other mode is refused naming
vm.json.
- backend: FeatureMountCache (native on Linux, none on macOS, built on
project-mount), Want.ProjectCache, Instance.ProjectCache, CacheModes.
- lima: mount rewrites keep only the sshfs and 9p settings devvm knows
where they differ from Lima's defaults, and drop the rest for Lima to
fill in, so lima.yaml never freezes a default; same() compares the
cache where devvm sets one. Build VMs' writable output folders (tools,
--from) get none.
- tools: an EROFS tool image that ends before its superblock does, or is
shorter than its superblock says, as a build under mmap could leave
one, counts as not built, so the next build makes it again; a build's
short output is refused. The fakes' tool images are a page
(backendtest.ToolImage).
- The limactl stub lists QEMU's vmType, fills in 9p cache defaults on
Linux, and answers the remount's check.
- Docs: backends/lima (the project folder's cache, when it changes,
programs that map files for writing, SQLite), using/limits,
using/clone, commands, internals/lima, internals/backends, the design
note (both mmap bugs, why none alone, the remount, tool images, the
e2e findings), the CLI reference and the cli skill.
- Tests: TestProjectCache, TestMountRoundTrip,
TestStartSetsProjectCacheOnce (the remount's outcomes), TestCutShort,
TestBuiltCutShort, TestGuestMountOptions, TestFilledMounts,
TestUpCacheMode, TestWarnMountCache, TestCacheAtNextStart,
TestSwitchCache, TestSetMountCache, TestCheckStateCache, the
mount_cache CLI test, clone_switch and the 0.1.0 fixture on Linux, and
e2e's projectMountCache (findmnt, a stat-while-write loop, SQLite's
journals, a shared writable mmap refused, the opt-in switch of an
unchosen VM, what mmap does reported, macOS unchanged).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The fixture tests read 0.1.0's state and launched each VM once; they now
use it with what changed since: custom secrets and nested-repo protection.
- fixture_v010.txtar: app's launch keeps 0.1.0's bindings file byte for
byte and finds its github secret; scratch's and web's launches edit no
Lima config and say nothing of nested repos or the github secret.
- A repo nested in app: on macOS, git_nested_protectable once, then
devvm git-protect on locks lib/.git; on Linux (watched, unlocked), the
stop says git_nested_appeared and the watch covers it from then on.
- On Linux with DEVVM_PINS=on: git_protect_available, devvm git-protect
on, and the next start's run/git-pins.json pins .git and lib/.git.
- A secret of your own used in app beside github: secrets.names, yours,
version 1, github's binding kept; devvm rm unlocks both .gits (macOS),
keeps none, and deletes the VM.
- internal/secrets TestV010StoreGet: the Linux fixture's store gives
app's 0.1.0 github binding ghp_testfakev010.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A policy rule for a host name can narrow it to some of its requests:
`api.github.com GET,HEAD /repos/` in a policy file, written by devvm
network allow, deny and rm from --method and --path. Allows add up and a
deny beats any allow, as for every rule, so narrowing a host that a rule
allows whole, such as devvm's built-in GitHub, takes a deny:
`devvm network deny api.github.com --method POST,PUT,PATCH,DELETE`, or
`devvm network deny github.com --path '/*/*/git-receive-pack'`. An allow
by method and path for a host already allowed whole warns that it
narrows nothing and names the deny.
The proxy decrypts such a host's HTTPS on :443 with the VM's CA, refuses
its tunnels on other ports and without a CA, and judges every request on
the connection, kept-alive HTTP/1.1 and HTTP/2 alike, every absolute-form
one, and the shared Nix cache's own fetches. A connection's verdict and
whether its requests are judged come from one read of the policy files.
A blocked request gets 403 and a blocked event with its method and path;
devvm network log shows it, and an allowed one's forward event names the
rule that let it through.
One matcher, internal/proxy/request.go, judges rules and secrets'
bindings: methods from a closed list (RFC 9110's, PATCH, QUERY; never
CONNECT); the methods a request names besides its own (every
override-like header in any spelling, `_` for `-`, and the query's
_method), each word judged, and while a rule narrows by method, a value
that isn't exactly one method refused; path patterns with *, ** and a
last / for everything below; and only a path in plain form. Allows and
bindings match strictly, denies broadly: any case, every path that isn't
plain, the prefix above a trailing /, and a last segment cut at its first
dot (/admin.json, /admin.). A method devvm doesn't know isn't a rule, so
a typo in a deny is a broken deny. Upgrades other than WebSocket and
CONNECT inside a decrypted tunnel are refused for narrowed hosts.
devvm secret set takes an optional --method (none for every method), and
a secret's --path takes the same patterns, marked path_pattern in
custom-secrets.json; a saved path with a * from before is refused rather
than read as a wildcard. The bindings file stays version 1 while every
binding reads alike to an older proxy, so devvm secret set and rm after
an upgrade don't take a running older proxy's bindings away; a binding
with methods or a pattern makes it version 2, which such a proxy refuses
instead of putting a value in for every method, and writing one warns
for each such VM. devvm network allow, deny and rm warn, naming the VM,
when a rule by method and path changes while the VM's proxy runs from
another devvm binary, or one devvm can't tell. A query with a ; or one
Go can't read whole is refused while a rule narrows the host by method,
and denies also match each segment with its trailing dots dropped. An
allow that narrows nothing names the VMs, with -g by each VM's own
allowlist, and says when it narrows only port 80's plain HTTP.
- proxy: match, Methods, ParseMethods, PathOK, plainPath, matchPath,
overrides, overrideLike, server.judgeRequest; parseRule/parseHostRule,
CanonicalRule, NarrowRule, Narrowable, hostRules (rulesFor, verdict,
byRequest, judge, unjudgeable), egress.checkHost,
Allowlist.CoversWhole, trimDots; Binding.Methods, BindingListVersion
2 when needed (v1Binding);
pathWithin and PathPrefixOK folded into match; the Nix cache judged
- netpolicy: Rule(rule, deny, methods, path), NarrowedHost, sameRule,
Proxy.Allowlist, Proxy.NarrowNotes, Proxy.OtherBinaries, BasePolicy,
Proxy.SecretsWritten (after RefreshSecrets and devvm agent login
--api-key's write);
FormatEvent shows a blocked request's method and path and a forward's
rule
- secrets: Def/Secret/customJSON Methods, path_pattern, CheckMethods,
CheckPath on proxy.PathOK
- vm: RuleChange, PolicyChange(ctx, rules, RuleChange)
- cli: --method and --path on network allow, deny and rm, --method on
secret set, METHODS in devvm secret and "methods" in its --json
- messages: bad_request_path (was bad_secret_path), bad_methods,
rule_not_narrowable, rule_narrows, rule_narrows_nothing,
rule_narrows_http_only, rule_narrows_unknown, proxy_other_binary,
secrets_other_binary
- tests: TestParseRuleNarrowed, TestMatchPath, TestDenyBypasses,
TestAllowNarrowed, TestCoversWhole, TestForRequestMethods,
TestInterceptRules and TestInterceptSecretMethods (HTTP/1.1 kept alive
and HTTP/2), TestNarrowedNotDecrypted, TestNixCacheRulesByPath,
FuzzDenyBypass (paths, methods, headers, _method), TestRule,
TestNarrowedRules, TestOtherBinaries, TestRefreshSecretsOtherBinary,
TestNarrowNotesUnreadable, TestDefine's path of /, TestReadBindings'
versions,
TestCustomsUnreadable's prefix path, network_narrow.txtar (narrows
nothing), secret_custom.txtar's --method; on 0.1.0's frozen state:
TestV010Bindings, TestV010ProxyConfig, TestV010Rules (0.1.0's
TestParsePolicy and TestDecide, frozen), fixture_v010_network.txtar;
e2e network: netRequestRules
and the basic secret's --method GET,HEAD
- docs: safety/network.md's Rules by method and path, the secrets'
flags and an example, internals/network.md's Requests by method and
path, the design note replacing the open-work entry, attack vectors,
the commands page, internal/proxy/README.md, the CLI reference
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm --clone in a folder of git repos gives one VM a clone of each repo
the user chooses, each at the same path as on the host, so paths between
them (file:../pkg, ../Lib/Lib.csproj) work in the VM, and a copy of the
folder's own files outside the repos, made once.
- Discovery by .git protection's walk (4 folders down, the same skipped
folders, 100 repos); each repo checked as --clone checks one; a linked
worktree of a repo in the folder isn't a repo of its own; a repo whose
folder, or common dir, another VM mounts is refused, naming it, as is
one whose name a terminal can't show. A picker in a terminal (every
copyable repo ticked, the others shown with why); --repos
all|none|LIST answers without one, and the question is refused naming
it. A folder that's a repo keeps today's single clone unless --repos
is given; one inside another repo's working tree is refused
(workspace_inside_repo). The choice is recorded in the VM's state.
- A single --clone, or devvm clone on, in a folder another VM mounts is
refused too (clone_folder_mounted), at plan time and before the seed's
push.
- Each repo seeded with its current and default branch (origin/HEAD,
else main, else master); a detached HEAD checks out the default. One
VM command makes every repo, leaving one an earlier push reached as it
is; each repo is checked again just before its push, and its remote
chosen once the one before is added. The folder's own repo's clone
excludes the other clones (escaped, anchored lines) and the host's
info/exclude, at the seed and at devvm clone add.
- The folder's own files: walked folder by folder beneath the folder
(safefile.Root.OpenDir), no links followed, no hard-linked files, no
bare repos, no set-id bits, bounded; refused folders (checkUnsafe)
apply.
- devvm clone fetch [--json]: every repo's branches into its remote's
remote-tracking branches (--refmap=, one refspec), listed by branch
name with their repos; nothing new is said only when a repo was
fetched from. devvm clone add PATH: one more repo; one whose copy
didn't finish is copied again.
- rm, devvm clone off and the switch loop over the repos; rm's check
reads every repo in one VM command (cloneState), parsed strictly and
capped (8 MiB, 10,000 branches in all), counting only worktrees inside
the folder, a VM-side folder never made read as every repo gone; a
clone missing in the VM is asked about, an unfinished repo checked
when it's there; a host repo that changed refuses the check, and one
another VM mounts, a single clone's too, gets no host git and is asked
about; each repo is checked again before rm's fetch.
- The finder opens a workspace clone VM inside one of its repos; --here
still makes the repo's own. --repos's dependencies go through needs(),
which now takes a first argument too (devvm clone on).
- State is additive: clone.workspace, clone.repos, clone.made.files; a
0.1.0 clone reads as one repo at ".". CHANGELOG: an Unreleased section.
Messages: flag_needs_flag, repos_value, repos_not_workspace,
workspace_repo_unknown, workspace_pick_help, workspace_pick_cannot,
workspace_reason_*, workspace_inside_repo, workspace_repos_past,
workspace_skipped, workspace_repo_dropped, workspace_detached,
copying_repo, uncommitted_not_copied_repos, workspace_ready,
workspace_files_failed, workspace_files_skipped, unfetched_commits_in,
clone_repo_dirty, clone_repo_gone, clone_repo_changed,
clone_repo_mounted, clone_repo_unchecked, clone_folder_mounted,
clone_check_repo_changed, fetch_before_delete_repos,
no_terminal_fetch_repos, clone_fetch_*, fetching_repo, clone_fetched_*,
clone_add_*, clone_added.
Tests: TestDefaultBranch, TestBranchPlan, TestIsWorkspace,
TestChooseRepos, TestPickRepos, TestFindRepos, TestRepoExcludes,
TestWorkspaceFiles, TestCloneChangesAcrossRepos, TestFetchedByBranch,
TestCloneRepos, TestV010CloneReadsAsOneRepo, TestCoversRepo,
TestParseCloneState, TestCloneStateScript, TestWorktreePathPins,
TestOpenDir; the clone_workspace, clone_workspace_repo, subfolder and
nested_replaced scripts; fixture_v010_clone (0.1.0's web clone fetched,
checked by rm, made a workspace clone by devvm clone add, switched off;
its scratch switched on); the e2e clone section's cloneWorkspace.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A VM over a folder of repos now protects each nested git repo, not only
the folder's own: one walk (hostsafety.Walk, at most 4 folders down and
100 repos, no symlinks, one device) finds them, and each is locked on
macOS, pinned on Linux or watched where Linux can't pin, scanned within
its own top folder and the mount. A repo counts as covered only when a
scan locks its git dir; git dirs follow git's own rule, .git is matched
without case on macOS, and a recorded repo stays protected while
anything is at its .git. Repos the walk can't protect, that appear,
that leave or that look like bare repos are named, with the config keys
and hooks a VM-made repo would run. Existing VMs get a one-time notice
and opt in with devvm git-protect on. Ownership fails closed under one
host lock, so a VM never unlocks what another protects; one scan budget
covers every repo, and launches into a running VM check only the top
repo. devvm doctor gives a tip to set safe.bareRepository=explicit,
reading the user's GIT_CONFIG_GLOBAL when set.
Refs #3.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm secret set NAME --host HOST[,HOST…] --env VARIABLE [--header H]
[--prefix P] [--stdin] saves a secret of your own: the value from a hidden
prompt or stdin (never argv) into the Keychain or devvm's secrets folder,
and its definition into custom-secrets.json. A VM that uses it (devvm
secret use NAME) gets only a per-VM placeholder in VARIABLE, and its proxy
puts the real value in that header only for those exact hosts, over TLS on
443; the hosts join that VM's allowlist. Names, hosts, headers, variables
and prefixes are checked; wildcards, addresses, internal names and other
ports are refused. One placeholder builder serves every secret and login,
and the proxy caches values by kind, agent and name.
After an independent review, a secret goes in only in four exact shapes
(alone; Bearer, Token or a saved --scheme in Authorization; the Basic
password; the Basic username only with --basic-user), values are
printable ASCII under 3,800 bytes, the proxy checks each binding against
its definition, definitions carry IDs and VMs record their hosts, and
custom values are stored apart from the known secrets.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
testdata/v0.1.0/{darwin,linux} hold what devvm 0.1.0 itself left: four
VMs, its defaults, its agent store and logins, its image and tool records
and each --json it printed. The TestV010 tests in internal/vm read and
write back every field, and fixture_v010.txtar runs today's devvm on it:
each --json keeps all of 0.1.0's, read-only commands change no file, and
launches start each VM without a Lima edit, naming Codex's unknown login
field as withheld. Contributing's Released state says the fixture is
frozen.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On Linux, a start of a VM whose protection is on pins .git, its git dirs
and every lock path read-only in a user and mount namespace that devvm
_qemu pinned makes around QEMU. It keeps the pins while QEMU runs, records
each re-pin, refuses hard links and fails closed on watches and records;
doctor says why a host can't lock, and such hosts watch .git instead. The
pins' events file is read through safefile, and the command-line check
takes "devvm lock" in prose as English.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
--network learn runs a VM on the internet tier while it records the hosts
it reaches beyond its allowlist, shown as internet (learning). devvm
network lock picks which of them go into the VM's own rules, ticking only
reviewed registries on 443 and listing risky hosts apart, then gives the
VM the allowlist tier at once. learn is per VM only. The lock command
names its docs page in its about.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The VM's copy of Codex's auth.json holds only codexKeep's fields, and its
~/.claude.json only claudeAccountKeep's oauthAccount fields; everything
else is withheld and named by path in login_fields_withheld, which
replaces login_kept. A declarative keep-list in format.go owns what each
format keeps or binds, and TestFormatsWithholdUnknown puts a canary in
every object of every format's golden login.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each toolchain is one image.ToolDef in image.SharedTools, which also
holds its guest environment, its PATH folders and its version files. They
leave base's devvm-tools.sh for /etc/devvm/toolchains.sh, which every
launch writes, so base.sh changes and every image rebuilds once. The
structure test's names rule fails on a toolchain's name as a literal
outside internal/image, TestToolchainsComplete checks the toolchains
page, and Contributing gains Adding a toolchain.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The model providers whose API keys the VM's proxy puts in for opencode and
pi are one table, agents.Providers (ID, name, hosts, header), from which the
bindings, devvm agent login --provider and its help, and the docs' table
derive (TestProvidersComplete). Google Gemini, Groq, Mistral, xAI and
DeepSeek join Anthropic, OpenAI and OpenRouter: the VM gets a placeholder,
and the proxy puts the key in, in the provider's header, for its hosts
alone. Binding wins over [pass-keys], and each launch notes a bound API key
that [pass-keys] still lists (login_pass_bound), never a bound OAuth login.
The docs and the note say that a key a VM was given before stays usable
wherever it was copied, that a bound key can mint credentials that work
without the proxy (Gemini's Live API ephemeral tokens, xAI's and OpenAI's
realtime client secrets), and that some providers' own tools fetch URLs the
VM names. The network e2e checks pi's Gemini key in x-goog-api-key, never
in the URL, and opencode's Groq key in its Authorization.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
opencode gets the rule pi got: an entry of its auth.json that devvm
neither binds nor passes reaches the VM's copy with only the fields
that name its account, with the login_withheld warning, which says to
list the provider under opencode in config.toml's [pass-keys]. A listed
provider's api entry goes whole, metadata included (login_passed), and
opencode 2's import brings every API key the copy holds into its
database. A bound API key's entry is {type, key: placeholder} alone, its
metadata kept on the host. pi's allowlist becomes withheldEntry and
withheldKeep, which both agents share; login_oauth_withheld goes.
A user with a local server's key in opencode sees it withheld after
upgrading, and the launch warning names the provider.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each coding agent gets one definition, an agents.Def in a new stdlib-only
leaf package, internal/agents, and everything else iterates over
agents.Defs: agentlogin's format per login kind, secrets' login kinds,
settings' [pass-keys], image.SharedTools, the vm package's store tables
and scripts, and cli's help lists. The VM copies of every login file,
their bindings, the store's layout, the scripts and the CLI reference
stay the same byte for byte, as golden tests made before the refactor
show.
The agents' guest variables leave base.sh for /etc/devvm/agents.sh,
written at every launch, so every image rebuilds once. Messages are
merged per agent (login_kept, login_passed, login_withheld,
login_oauth_withheld, agent_login_key_only). The structure test's new
names rule fails on an agent's name or login kind as a literal outside
internal/agents, and literals on one holding an agent's folder. Docs
link the supported coding agents rather than listing them, and
Contributing gains Adding a coding agent.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds pi (earendil-works/pi) as a shared coding agent beside Claude
Code, Codex and opencode: --agents pi, devvm tools add pi, the new-VM
picker and devvm setup offer it. Its network policy allows pi.dev; base
sets PI_SKIP_VERSION_CHECK=1 and PI_TELEMETRY=0 and installs fd-find,
so base and every image on it build again once. The agent store mounts
and copies pi's settings, with keys redacted as JSON.
pi's auth.json is a new login kind: its API keys for Anthropic, OpenAI
and OpenRouter become per-VM placeholders the proxy fills in (devvm
agent login pi --api-key --provider PROVIDER), and everything else is
withheld by default, unless config.toml's [pass-keys] lists the
provider. pi's own account logins aren't supported, and pi has no musl
build, so a musl VM refuses it (image.ToolDef.GlibcOnly). Its sessions
go into devvm history export and import.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Linux hosts have no unprivileged immutable flag, so devvm can't lock
.git there. It now warns at every launch of a VM that mounts a folder
with a .git (git_unprotected), unless it's a --clone VM or the user
chose devvm git-protect off (git.chosen), and it names, after the fact,
the hooks and config that changed (git_changed). It sums what a lock
would cover, .git/commondir, include.path targets and the folder
core.hooksPath names, never through a symlink out of the project folder
and within bounds (git_watch_blind names what it can't fully watch), at
each launch that finds the VM stopped and at devvm stop.
A check on such a host runs protect's reports without locking:
git_replaced, git_commondir, stray worktrees, git dirs that appeared,
core.hooksPath and delegations into the project folder, and a
submodule's folder that isn't a git dir (git_gitdir_not_git), in which
nothing is created and which the watch doesn't sum as a git dir.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The VM writes a submodule's .git file or folder, so it could name any
folder in the project as a git dir, and devvm then locked that folder's
hooks and config (a React src/hooks, say) or made an empty hooks folder
there. A git dir in the working tree now counts only when isGitDir
passes (a HEAD next to objects and refs folders), the check gitDirs
already ran for .git/modules. devvm locks and creates nothing in a
folder that fails it, and reports it once, and again whenever it
changes, as the new git_gitdir_not_git (delegation kind notgit).
Docs: safety/git-protection's When devvm reports .git, and
internals/git-protection's What's locked and On each launch.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Prereleases now reach the Homebrew tap through a second formula, `devvm-rc`. The stable `devvm` formula stays on the last final release.
Co-authored-by: Claude Opus 5.5 <[email protected]>
Adds `dotnet`, the .NET SDK, as a fifth shared toolchain next to node,
python, rust and go. `--tools dotnet`, `devvm tools add dotnet` and the
picker offer it, and a folder with `*.sln`, `*.slnx`, `*.csproj`,
`*.fsproj` or `global.json` at its top level suggests it in the new VM's
summary, the way `package.json` suggests node.
Refs #2. Thanks to @jsskeen-utah for the detailed request.
Co-authored-by: Claude Opus 5.5 <[email protected]>
devvm's host mise didn't trust the CAs in ~/.config/devvm/ca, so behind a
network that inspects TLS, resolving the shared tools' versions failed with
UnknownIssuer and a message to check the connection.
The host mise and its download now trust the folder's checked CAs: mise gets
them as MISE_EXTRA_CA_CERTS, and on Linux also an SSL_CERT_FILE bundle of the
system's roots plus those CAs (SSL_CERT_DIR only when the user set neither
variable). On macOS, mise's Sigstore client still needs the CA trusted in the
Keychain, as the docs say. A certificate failure now shows tools_untrusted,
pointing at the CA docs.
Refs #1
Co-authored-by: Claude Opus 5.5 <[email protected]>
devvm can ship prereleases, such as release candidates and betas, for
people to try before a release is out. A prerelease's version is
`x.y.z-<word>.N`, such as `0.2.0-rc.1` or `0.2.0-beta.2`. `VERSION`
holds it, the tag is `v0.2.0-rc.1`, and it gets a `CHANGELOG.md` entry
as usual.
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
When upstream's latest is a version older than the pin (a release marker
that lags, as codex's and opencode's have), report() says the pin is newer
and neither counts it as outdated nor bumps it. Digests and dated releases
are compared as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
CI's e2e workflow installs Lima 2.3.0, its tarball's checksum taken from the release's SHA256SUMS, checked against the sha256 Lima's release notes publish. scripts/bump.sh e2e-lima moves that pin the same way. devvm's doctor, install.sh, the README and the Lima page ask for Lima 2.2 or newer, compared by major and minor.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The formula has an archive per platform (macOS and Linux, arm64 and
Intel), each URL and checksum filled in by release.sh from the
SHA256SUMS it wrote, and installs only the binary; no Go dependency.
release.sh --formula-from DIR writes the formula for a published
release from its downloaded SHA256SUMS, checked against minisign.pub.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A project VM mounts its whole folder read-write, so a nested project with
a VM of its own is in the parent folder's VM too: code there can change
the nested project's files, .git included where .git protection doesn't
cover it, and replace its folder (which devvm's start refuses since the
nested-replaced checks). devvm now says so each time it makes or opens
such a VM: once per run of devvm, naming the nearest parent folder's VM
that mounts the project (project_in_vm_folder, linked to using/vms.md's
"A nested project replaced").
The finder owns the walk up: parentVM's loop over project.Parents is now
finder.parents, which mountedBy shares. mountedBy reads only the states,
so a stopped parent VM counts (it writes whenever it runs), and it passes
over --clone VMs, which mount nothing, and states made for another
folder. warnMounted skips a --clone VM of the folder's own, new or not.
Only Up warns; devvm restart and the other commands don't.
Docs: using/vms.md says when devvm warns and why; internals/overview.md
how the finder finds the VM; attack-vectors.md's nested entry mentions it.
Tests: TestWarnMounted (the nested VM's creation and next launch with the
parent stopped warn once; the parent's own launch, the parent's VM in a
subfolder, a new --clone VM and a parent --clone VM don't);
nested_replaced.txtar checks the same through the CLI, and that devvm
restart doesn't warn.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each export in devvm's exports folder records its VM's network tier on
the last line of its .folder file (Exports.writeFolder, read back by
Exports.record, Export.Tier). Every import (devvm history import and the
one a new VM offers, both through importHistory) warns first, by
netpolicy's Tier.AtLeast, when the export's VM was on a less strict tier
than the VM it goes into (history_import_less_strict), or when there's
no record of its tier (history_import_tier_unknown, as if open): an
export without a tier, or any file outside the exports folder, whose
.folder file a VM could have written. Then it imports.
Tests: TestExportRecord, TestImportWarnsOfTier (open, internet, none,
the same tier, none recorded, a file elsewhere; an open VM warned of
nothing), TestRm's .folder file, history_import.txtar (the launch's
offered import from an open VM into an allowlist VM, and a file of
your own).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The history export keeps at most 2 GiB: past it, devvm stops the VM's
command, removes the partial file and keeps no export. devvm history
export fails with history_too_large; devvm rm, devvm rm VM and a remake
warn with it and go on. opencode's import of devvm's logins (devvm agent
login) is read up to 1 MiB, then stopped and refused
(opencode_import_too_much). Each VM command adds at most 4 MiB to the
run log (Env.vmLog), then a "devvm: truncated" line.
agentsave's bounded writer is the one owner, in bounded.go: it takes in
vm's capped, and with a cancel it fails every write past its max, so a
command that keeps writing ends. Its buffer is a field: embedded, it gave
the writer bytes.Buffer's ReadFrom, which io.Copy (os/exec's copy of a
command's output) used in place of Write, so no cap held, agent save's
128 MiB included. vmssh's capped had the same flaw, fixed the same way.
Env.HistoryMax, and DEVVM_HISTORY_MAX in a test build, stand in for the
export's cap in tests. The stub guest's opencode-floods and
history-floods switches write without end.
Tests: TestBounded (io.Copy too), TestVMLog, TestExportTooLarge,
TestRemakeHistoryTooLarge, TestImportLoginsTooMuch, TestShellFloods,
vmssh's capped through io.Copy; history_import.txtar (an export that never
ends: export fails, rm deletes and warns, the run log truncated) and
agent_login.txtar (opencode's import floods).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The maintainer tags main's HEAD (git tag -s vX.Y.Z) and runs
mise exec -- scripts/publish.sh, entering the minisign password once.
It checks the preconditions (release.sh --check for the tag and its
signer, main's HEAD and origin, a clean tree, gh logged in, minisign,
no other release, the tap's checkout clean on main), builds dist/ with
release.sh, prints the version, commit, files with sizes and SHA-256s,
the CHANGELOG entry and the tap's diff, asks once on the terminal, then
pushes main and the tag, makes the GitHub release as a draft with every
file and publishes it, and commits and pushes the tap's formula. Each
step skips what's done, a draft left by a failed run gets its files
again, and a failure says what was and wasn't published. --dry-run
stops before the question; --help.
release.sh gains --check (the tag's checks only, printing its commit),
fills in the formula's @URL@ and @SHA256@ only outside its comments,
and points at publish.sh in its last line.
Tests: testdata/script/publish.txtar (a local bare origin and tap, a
fake gh, SSH-signed tags, a passwordless minisign key): refusals (no
tag, a tag release-signer doesn't pin, a dirty tree, an existing
release without its files, gh logged out, no tap), --dry-run, n, y
failing at gh release create then at publishing the draft, the reruns
and the call order, and a run with everything done.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
release.sh wrote install.sh after it signed SHA256SUMS, so nothing signed
covered the script and checking it by hand with the release key wasn't
possible. It now writes install.sh, adds its checksum to SHA256SUMS, then
signs. install.sh and devvm upgrade look up their archive by name, so the
extra line changes nothing for them. release_head.txtar checks the line.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Builds carry packaging/minisign.pub's key now, so an empty DEVVM_RELEASE_KEY
falls back to it and the test server's release fails its signature check.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On Linux, a child another script forked while testscript's cp held the copy's write descriptor kept it open until that child exec'd, so running the copy failed with ETXTBSY. cp_exe writes it under syscall.ForkLock; upgrade.txtar and release_notice.txtar use it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
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]>
The steps of each shared tool's build named the build VM every tool
shares (devvm-tools-build), so a build of several tools printed the same
lines over and over. Each step now names its tool: cloning base for
node 24.22.2, starting the build VM for node 24.22.2, building node
24.22.2, deleting the build VM for node 24.22.2. Lima's start, configure,
script and delete steps take the name from the context (withShown).
Messages: building_tool, cloning_for_tools, tools_build_vm; building_tools_in
goes. tools.txtar checks all five steps for each tool, in order.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
After the network tier, a picker (PickOne) offers every port, none, or
a list typed at new_vm_ports_prompt and checked by settings.ParsePorts,
asked again on port_invalid. The summary's ports are preselected and
Enter at the list keeps them; the choice is this VM's alone. --ports
skips it and counts in leftToChoose; where devvm can't ask, the
summary's ports stand. Ports are now read for the requirements after
the choice. new_vm_choose, the customize question and devvm's help name
--ports. Tests: TestPortsRows, TestChoosePorts, TestUpCustomize,
TestLeftToChoose, up_customize.txtar, network.txtar. Docs: commands.md,
first-vm.md, images.md, ports-size.md, devvm.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
The disk's question (new_vm_disk_prompt) starts from the summary's disk,
after one line saying it grows with devvm size --disk but never shrinks
and takes only what the VM writes (new_vm_disk_question). It's this VM's
alone, skipped with --disk, and a disk below the image's or not a size is
refused with Size.Check's and ParseGiB's messages, then asked again.
leftToChoose counts the disk; new_vm_choose and the customize question
name --disk. Tests: TestSizeChoiceAskVM, TestUpCustomize, TestLeftToChoose,
up_customize.txtar. Docs: commands.md, first-vm.md, images.md, devvm.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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]>
Customizing a new VM shows the four tiers in order, each with what it
reaches (Tier.Desc, which devvm setup's network picker shares), the
summary's tier chosen, through the UI's PickOne (vm.Env.PickOne). Where
the picker can't show, the VM keeps the summary's tier. net_ask,
net_about and net_tier_unknown go; network_default_open, _internet,
_allowlist and _none become net_tier_*; net_tier_help is the picker's.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
opencode 2 keeps its logins in its database's credential table, not
auth.json. When this machine's opencode --version is 2 or later, the
import runs opencode auth export (its output read from stdout, never
logged) and maps each provider's active credential to the store's
opencode format (agentlogin.OpencodeFromExport): an API key as
{"type":"api","key"}, the OpenAI login from a Codex method
(chatgpt-browser, chatgpt-headless, or none for one imported from
auth.json) as {"type":"oauth","access","refresh","expires","accountId"}.
Sign in with ChatGPT, other providers' OAuth and unknown types are left
out with agent_import_opencode_skipped; a failing export fails the
import (agent_import_opencode_failed). opencode 1 keeps auth.json.
Tests: TestOpencodeFromExport, TestOpencode (the new opencode stub),
agent_import_opencode.txtar; AgentImport.Opencode is the seam.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The logo prints from the UI alone (ui.UI.Logo, msg.Reporter's Logo), once
a run, only with stdout a terminal (or a test build's PickOnPipe), not with
--no-input, --json or names mode; its mark green, plain under NO_COLOR. The
CLI reference's pages don't get it: only the root's help func prints it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The first run starts with a line saying its questions set devvm's
defaults for every new VM and its base image (first_run_defaults), then
asks new VMs' size and agents and base's features (build's
Choice.Choose, before the summary rather than at the build), then shows
the summary, now headed as this folder's new VM, and asks to customize
it. A base whose features are chosen asks nothing, as before.
new_vm_customize no longer carries its own [y/N], which Ask prints:
TestEveryMessageRenders fails on any message with [y/N] or [Y/n], as
the prompts own them.
Docs: first-vm.md's walkthrough and flowchart, commands.md's questions
table in the first run's order, customizing.md's features question,
images.md's summary and the README.
Co-Authored-By: Claude Opus 5.5 <[email protected]>