Commit Graph
511 Commits
Author SHA1 Message Date
Jürgen ŠuvalovandClaude Fable 5.1 72f6284eb9 fix(lima): VM names leave the NUL byte out of the ssh socket's path (#25)
`NameMax` budgets for `paths.SocketMax - 1`, as
`ControlMax` does, and the Lima package's own copy of the limit goes, so
`paths.SocketMax` is the one owner. On the edge case above, devvm now
picks a one-character-shorter folder part,
`devvm-jyrkki-webs-fbe3918054ffd3`, and the VM is made. The Lima limits
page says a socket path has fewer than 104 characters.

Co-authored-by: Claude Fable 5.1 <[email protected]>
2026-11-07 15:01:08 -07:00
CJandClaude Opus 5.5 72b648df31 feat(release): prereleases on the Homebrew tap, as devvm-rc (#19)
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]>
2026-11-07 11:36:20 -07:00
CJandClaude Opus 5.5 8d8da01037 feat(tools): dotnet, the .NET SDK, as a shared toolchain (#7)
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]>
2026-11-07 10:44:25 -07:00
CJandClaude Opus 5.5 da804f0568 ci: devvm.dev shows the latest release's docs, next.devvm.dev shows main's (#16)
Two docs sites, from one Docs workflow (`.github/workflows/docs.yml`):

- **devvm.dev** shows the latest release's docs. The `release` job
builds a tag's `docs/` and the `deploy` job deploys it to GitHub Pages
(`github-pages` environment), on a published release that isn't a
prerelease, and on a `workflow_dispatch` with `site=devvm.dev` and `ref`
(a release tag; empty means the latest release, from `gh release view`).
The tag is checked against `^v[0-9]+\.[0-9]+\.[0-9]+$` through `env:`
before it's used, and checked out as `refs/tags/<tag>`. Pushes to main
no longer deploy devvm.dev.
- **next.devvm.dev** shows main's docs. On pushes to main that touch the
docs (the same paths anchor), or a dispatch with `site=next.devvm.dev`,
`check` lints and builds, then `next` builds with `hugo -s docs --minify
--config hugo.yaml,next.yaml`, checks out devvmhq/docs-next with
`DOCS_NEXT_DEPLOY_KEY` (environment `docs-next`, only after the build),
replaces everything but README.md, and commits `Build from devvm <short
sha>` as github-actions[bot], skipping an unchanged build. Its
concurrency group keeps pushes from racing.
- `docs/next.yaml` sets `baseURL: https://next.devvm.dev/`, Hextra's
`params.banner` (a note that links devvm.dev), and `noindex` both as a
site param and through `cascade`, so Hextra's head writes `noindex,
nofollow` on every page. `docs/layouts/robots.txt` adds `Disallow: /`
when the site's `noindex` is set. The build stays in Hugo's production
environment, so Hextra's minified, fingerprinted assets are the same as
devvm.dev's.
- PRs get the same lint and build as before, and nothing runs with an
environment or a secret on `pull_request`. Permissions: `contents: read`
at the top; only `deploy` has `pages: write` and `id-token: write`. The
publishing jobs set `cache: false` on mise-action (zizmor's
cache-poisoning, now that the workflow publishes on `release`), and so
does `check`.
- Docs: Contributing's Maintaining has a new section, The docs sites
(what deploys each, the hand redeploy, the key and environments,
Cloudflare Pages serving devvmhq/docs-next); Contributing's two mentions
of the deploy point at it; Upgrading's Trying a prerelease links
next.devvm.dev.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-07 09:02:34 -07:00
CJandClaude Opus 5.5 b3a188712f fix(tools): the host's mise trusts the system's and devvm's CAs (#9)
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]>
2026-11-07 08:33:56 -07:00
CJandClaude Opus 5.5 63e41118c6 feat(release): release candidates and betas, as GitHub prereleases (#13)
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]>
2026-11-06 23:36:15 -07:00
CJandClaude Opus 5.5 3c4e90da0c fix(tools): opencode's backend is named, so mise's registry can't move it to npm (#10)
## What this changes

**The cause.** The pin bump in 588ba6f9 moved devvm's mise, on the host
and in VMs, from 2026.10.7 to 2026.11.3. Starting with mise 2026.10.9
(jdx/mise#14295), mise's registry puts npm first for opencode 2.x. Here
is `registry/opencode.toml` at each version:

```toml
# v2026.10.7
backends = ["aqua:anomalyco/opencode"]

# v2026.11.3
backends = [
  { full = "npm:@opencode/cli", min_version = "2.0.0", options = { allow_builds = ["@opencode/cli"] } },
  "aqua:anomalyco/opencode",
]
```

devvm named opencode only as `opencode = "2"`, so mise 2026.11.3
resolved it to `npm:@opencode/cli`. That lock entry has no download for
any platform. As a result, every resolve warned that opencode 2.2.5
isn't published for every platform, opencode's tool image couldn't be
built, and the e2e check "the shared tools resolve to upstream's newest"
failed on every machine. opencode's GitHub releases still ship v2
binaries for every platform, musl included, along with a `SHA256SUMS`.

**The fix.** `assets/shared-tools/mise.toml` now has a `[tool_alias]`
table. It names the backend of every shared tool that isn't one of
mise's own `core:` tools, so the registry's choice can't move them:

- `opencode = "github:anomalyco/opencode"`: its GitHub releases. With
mise 2026.11.3, the aqua backend now gives opencode.ai URLs, and on musl
it gives the glibc tarball. The github backend gives musl VMs opencode's
own `-musl` build and records `provenance = "github-attestations"`.
- `claude`, `codex`, `pnpm` and `uv` keep the aqua backends they already
resolve to, so their lock entries are unchanged. They are named because
each of them already lists a second backend in the registry (http, npm,
npm, and asdf/pipx). That is how opencode's switch happened.
- node, bun, python, go and rust are mise's `core:` tools. None of them
changed between 2026.10.7 and 2026.11.3, so they are not aliased.

The other two places where mise picks a backend now follow the same
table:

- The step back (`lockVersions`) locks older versions from the backend
the newest one came from.
- Each project VM's `/etc/mise/config.toml` gets the same table, sent as
`tool-alias.toml` in the setup. Without it, the VM's mise 2026.11.3
reports opencode's backend as npm, and a non-shared version would be
installed from npm.

`tests/e2e-mise.lock` was resolved again with mise 2026.11.3 through
`scripts/bump.sh e2e-tools`. It now has lockfile version 4 and opencode
from GitHub. codex stays at 0.166.0, because mise's latest for codex is
still the older 0.163.0.

**The guard.** `TestToolBackendsNamed` fails in two cases: when a shared
tool that isn't on a `core:` backend has no `[tool_alias]` entry, and
when an alias isn't the backend that `tests/e2e-mise.lock` resolved. On
main it would have failed for claude, codex, opencode, pnpm and uv. The
existing download-per-platform check (`TestE2ELockPins`) couldn't catch
this regression, because the e2e lock had never been resolved again with
2026.11.3. `TestAliases` covers the VM's table, and
`TestRefreshStepsBack` now checks the step back's `mise.toml`.

Docs: internals/images.md (Versions) explains the aliases.
contributing/maintaining.md says where a new shared tool's alias goes
and what the test checks.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-06 18:52:16 -07:00
w3cjandClaude Opus 5.5 1276474123 ci: a weekly check of the pins scripts/bump.sh keeps, as an issue
Mondays, scripts/bump.sh --check runs and its outdated lines go into one
open issue, "Pinned versions to bump", created or updated with gh and
--body-file; with none left the issue is closed. bump.sh's output passes
through files only. maintaining.md says what to do with it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 11:36:38 -07:00
w3cjandClaude Opus 5.5 22387c5b78 fix(scripts): bump.sh --check never offers an older version as the latest
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]>
2026-11-06 11:32:37 -07:00
w3cjandClaude Opus 5.5 b24da31e41 build: Lima 2.3 in CI, bump.sh e2e-lima, and Lima 2.2 as devvm's minimum
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]>
2026-11-06 09:57:01 -07:00
w3cjandClaude Opus 5.5 f3e4753445 build(release): the Homebrew formula installs the release's signed binary
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]>
2026-11-06 09:34:18 -07:00
w3cjandClaude Opus 5.5 e9bd270398 docs: brew trust before brew install, as Homebrew 7 asks
The --confirm flag's ssh-askpass hint names no tool: put one on PATH or set SSH_ASKPASS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 09:20:11 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-06 08:13:01 -07:00
w3cjandClaude Opus 5.5 78530c3a35 feat(vm): warn when a project folder is inside another VM's mounted folder
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]>
2026-11-06 08:02:00 -07:00
w3cjandClaude Opus 5.5 3223045c46 feat(vm): warn of a history import from a less strict network tier
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]>
2026-11-06 07:59:21 -07:00
w3cjandClaude Opus 5.5 e0c4ed97e4 fix(vm): bound what devvm reads from a VM
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]>
2026-11-06 07:13:30 -07:00
w3cjandClaude Opus 5.5 a85cba7858 build(release): scripts/publish.sh, a release from a signed tag in one run
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]>
2026-11-06 07:56:07 -07:00
w3cjandClaude Opus 5.5 133b29be2c docs(home): step 2's terminal shows the new VM's summary and Customize it? [y/N]
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 07:55:44 -07:00
w3cjandClaude Opus 5.5 730588d789 docs(home): step 2 says confirm or customize
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 07:46:13 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-06 07:31:47 -07:00
w3cjandClaude Opus 5.5 c3b9e89211 docs: the release key, and checking the install script with it
README.md, SECURITY.md and How it works' install page show the minisign
public key, and the install page links to Checking the install script:
download install.sh, SHA256SUMS and its signature, check the signature
with the key (minisign -Vm SHA256SUMS -P KEY), the script against the
sums (shasum -a 256 -c --ignore-missing), then run it. A key from the
docs, not the release, catches a release replaced whole.
TestDocsShowTheKey checks that every key in README.md, SECURITY.md and
docs/content is minisign.pub's, and that the three pages show it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 07:25:16 -07:00
w3cjandClaude Opus 5.5 586b45f9ad fix(release): install.sh's checksum in the signed SHA256SUMS
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]>
2026-11-06 07:25:15 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-06 07:12:56 -07:00
w3cjandClaude Opus 5.5 edce817b4f test(cli): cp_exe copies devvm for scripts under the fork lock, no text file busy
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]>
2026-11-06 07:03:35 -07:00
w3cjandClaude Opus 5.5 c171e205ec docs: the layout as it is, and the agents' guide on the VM's host folders
The in-VM guide says the project folder is the only host folder the VM
can write to, with the agent store's folders and the shared tools
mounted read-only. design.md names internal/vmssh/links_test.go and
internal/proxy/testdata/nix/, and its devcontainer forwardPorts entry
says the file's ports are added, as its Ports entry does. Contributing
drops the old shared CA folder's paragraph; space.md says secrets/ is
for hosts without a Keychain. Coverage baselines raised (netpolicy,
settings, vm).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 06:46:15 -07:00
w3cjandClaude Opus 5.5 b0b0c86890 fix(tools): a tool version counts as published only with its download's checksum
A lock entry's platform with a URL but no checksum counted as a
download, and its tool image would have rested on TLS alone. It now
counts as unpublished there, so devvm steps back to an older version
or says none has a download. Every entry of the locks today has its
checksum. TestHasDownload covers a lock without them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 06:46:15 -07:00
w3cjandClaude Opus 5.5 b44cbb9b9d fix(cli): a space between the sentences of four commands' help
devvm images rm, layer add, layer rm and secret rm joined two strings of
their Long without a space (--no-input.devvm). TestEveryCommandsHelp
now fails on a sentence's end joined to the next one's start.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 06:46:15 -07:00
w3cjandClaude Opus 5.5 8d44175601 refactor: the Go module is github.com/devvmhq/devvm
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 06:16:29 -07:00
w3cjandClaude Opus 5.5 a23bd4ac21 docs: installing devvm before its requirements, and Managing VMs before Images and tools
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 06:19:03 -07:00
w3cjandClaude Opus 5.5 53c3ce3fd2 docs(safety): the restart question's default, without the keys to type
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 06:11:37 -07:00
w3cj 9d4de9e92f docs: shorter getting started, with managing VMs, the command line and upgrading in using/ 2026-11-06 06:06:31 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-06 04:40:50 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-06 05:39:41 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-06 04:33:39 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-06 01:02:42 -07:00
w3cj 3f2d3658ed fix(network): allow the trust roots mise checks attestations against 2026-11-06 02:32:41 -07:00
w3cjandClaude Opus 5.5 1556e9d690 docs: a tool in a VM that skips the proxy fails with a DNS error, by symptom in troubleshooting
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 02:27:07 -07:00
w3cjandClaude Opus 5.5 b80550bc5a feat(vm): customizing a new VM asks which ports it forwards
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]>
2026-11-06 02:15:28 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-06 01:56:50 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-06 01:04:39 -07:00
w3cjandClaude Opus 5.5 086ee543c3 feat(vm): customizing a new VM asks its disk after its memory
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]>
2026-11-06 00:52:27 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-06 00:36:16 -07:00
w3cjandClaude Opus 5.5 500f70d8b0 test(e2e): the link and from sections in Go
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 22:41:09 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-06 00:59:59 -07:00
w3cjandClaude Opus 5.5 1df893a586 chore(github): issue forms for toolchain and built-in layer requests
Toolchain request asks for the toolchain and its mise name, the files
that should pick it, why, versions, install source, package hosts for its
policy, what it writes into its folder, and its Linux builds. Built-in
layer request asks what it is, why built in, how it installs, run-time
needs, other layers and bases. Troubleshooting's Reporting a bug names both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 01:10:07 -07:00
w3cjandClaude Opus 5.5 0c86b98582 docs(using): order the Using devvm pages from everyday work to reference
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 01:09:20 -07:00
w3cjandClaude Opus 5.5 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]>
2026-11-05 22:19:55 -07:00
w3cjandClaude Opus 5.5 f3a89fac54 fix(msg): the picker's Layers heading says what a layer is, and devvm tools' names devvm layer add and rm
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 00:52:02 -07:00
w3cjandClaude Opus 5.5 b5c7a7fb1c feat(vm): a new VM's network tier is chosen from a list
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]>
2026-11-06 00:40:48 -07:00
w3cjandClaude Opus 5.5 6be9f27fbe fix(agents): devvm agent import opencode reads opencode 2's logins through opencode auth export
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]>
2026-11-06 00:34:34 -07:00