Skip to content
These docs are for the next devvm, which isn’t released yet. The docs for the current release are at devvm.dev.
Maintaining

Maintaining

For maintainers: version bumps and releases. Run the scripts with mise, which puts the pinned minisign on PATH: mise exec -- scripts/release.sh. A release you build yourself builds in a container, so you also need podman or Docker for that, though not to push a release’s tag for CI.

Updating pinned versions

scripts/bump.sh moves every version pinned in the repo, so preparing a release’s pins is one command:

scripts/bump.sh --check         # every pin, by group, against upstream; changes nothing
scripts/bump.sh                 # every patch and minor bump, then a summary for the commit message
scripts/bump.sh docker pele     # only these tools, with a named images or e2e tool's major
  • --check prints each group’s pins under its name in brackets, such as [go], with each pin’s current version and upstream’s newest, and whether a bump would be a patch, a minor or a major, or a new digest, commit, checksum or release for a pin that isn’t a version. A held pin says which version holds it, and a line that the run wouldn’t apply says how to apply it. When upstream’s latest is older than a pin, as when a release marker hasn’t moved yet, --check says the pin is newer and bump.sh leaves it as it is.
  • With no tools named, bump.sh applies every patch and minor bump. It never applies a major, a held pin or a tool that it applies only when named. Naming an images or e2e tool also applies its major. e2e-tools always applies one, because users get the shared tools’ new majors as well, and assets/shared-tools/mise.toml holds what stays.
  • It writes a value only if it has the shape of a pin (a version, a 64-hex checksum, a dated release, a commit, an image digest), since some of the edited files run on the host, and it edits nothing unless every value is good. Then it runs the commands that finish a bump: mise lock for Go and the dev tools, go get and go mod tidy for the modules, go get and hugo mod tidy in docs/ for Hextra, npm install --ignore-scripts in docs/ and then mise run docs:diagrams for pele, and actionlint and zizmor for the workflows. If one of those fails, the pins are already edited, and bump.sh says so.
  • It needs curl and jq, mise for Go, the dev tools, the end-to-end lock and pele, go to apply the modules and Hextra, and gh for the actions.
  • bump.sh sends GH_TOKEN, or else GITHUB_TOKEN, when one is set, with its calls to GitHub’s API and to nothing else, through a header file rather than curl’s command line. Without a token, GitHub allows 60 calls an hour from one address, which a CI runner shares with other jobs, and once they’re spent it refuses the rest with a 403. A fetch that fails names its URL.
  • Every Monday the Pins workflow (.github/workflows/pins.yml) runs scripts/bump.sh --check with the workflow’s token and opens or updates one issue, “Pinned versions to bump”, which lists the outdated pins under their groups and the shared tools that e2e-tools waits for, and closes it once none is left. It never bumps anything, so you run scripts/bump.sh, then the --from tier of the end-to-end tests when an images or e2e pin moved, because those bumps change images.

The tools, by group, as --check prints them:

GroupToolsWhat they move
imagesdocker, nix, direnv, nix-direnv, mise, git-lfs, rustup, crane, omb, eza, tealdeerthe downloads pinned in assets/, and devvm’s host mise, so scripts/bump.sh nix direnv nix-direnv moves the nix layer’s three pins
shared-toolscursor, only when namedCursor’s CLI in assets/shared-tools/mise.toml, the one shared tool pinned for users
e2ee2e-tools, e2e-from, e2e-curl, e2e-ubuntu, e2e-limathe end-to-end tests’ own pins
gogo, go-minor only when named, go-mods, deadcodeGo, its modules and the deadcode task
dev-toolsdev-toolsmise.toml’s tools except Go, with their mise.lock entries
cici-mise, actionsthe mise the workflows install, and their actions
releaserelease-imagethe container that every release is built in
docshextra, pele only when namedthe docs site’s theme, and pele, which draws its diagrams
  • go moves Go to its newest patch release of the minor that go.mod names, from go.dev/dl. It edits the go lines of go.mod and docs/go.mod, mise.toml’s go, and its mise.lock entries. --check reports a newer minor on the go-minor line, and scripts/bump.sh go-minor moves the same files to it.
  • go-mods moves go.mod’s direct modules, the ones the depguard allowlist allows and the tests’ own, to their newest patch or minor release from the Go module proxy, with go get and go mod tidy. The indirect ones move as go mod tidy needs them. A module’s next major has a new path, so --check reports it and you move it by hand. deadcode moves the deadcode task’s version in mise.toml to golang.org/x/tools’ newest release.
  • dev-tools moves each of mise.toml’s tools except Go to mise’s newest version of it, edits its line and runs mise lock, so mise.lock keeps every platform’s checksum, and markdownlint-cli2’s lock folder in .mise/locks/ moves with it. nilaway has no releases, so its pin is a pseudo-version, which mise latest prints nothing for. dev-tools moves a Go tool pinned to a pseudo-version to its newest commit’s, from the Go module proxy’s @latest for the module that holds the tool, the longest prefix of its path that the proxy has. A tool with no newest version stops the run with an error, never a change, and so does any failed request to the proxy, except its answer that a prefix isn’t a module.
  • ci-mise moves the version that the workflows give jdx/mise-action to base’s mise, as the run leaves it, so scripts/bump.sh mise ci-mise moves both. actions moves each workflow’s uses: to its newest release’s tag, as the tag’s commit from gh api, with the tag in the comment after it, and reports a newer major without applying it. An action in a folder of its repo, such as actions/cache/restore, moves with its repo’s releases.
  • release-image moves release_image in scripts/release.sh, the container that every release is built in, to the digest of Docker Hub’s newest index of buildpack-deps:trixie-scm. The digest is the SHA-256 of the index it fetched, which every pull checks the registry’s index against, and before it records the digest, it checks that the index has a linux/amd64 and a linux/arm64 image, the two that builders run. Every release trusts this image, because its git, awk, tar and gzip write the release’s files, so read what changed in it before you commit a bump (docker-library’s repo-info repository lists each image’s packages), and run scripts/repro-check.sh after it (Reproducible releases).
  • hextra moves the docs site’s theme in docs/go.mod, and it reminds you to compare the copies of Hextra’s files in docs/layouts/ with the new release’s. pele moves pele only when named, because the diagrams need a look on the built site. It runs npm install in docs/ with the exact version and no install scripts, which writes docs/package.json and docs/package-lock.json, and then draws the diagrams again with mise run docs:diagrams. The drawing script’s self-check fails that step when the new pele no longer measures and writes its small text, such as edge labels, as the script expects (diagrams).
  • cursor moves Cursor’s CLI only when named, to the release that Cursor’s install script fetches, with each platform’s SHA-256 computed from its download, because Cursor publishes no checksums. devvm’s login and proxy code was read against the pinned release, so read the new one where that code names it, then run e2e-tools.
  • A hold keeps a pin below a version, and --check shows the newest version beside it. Go modules and actions take Dependabot’s ignore list in .github/dependabot.yml, which keeps pflag below 1.1.0, because pflag 1.1 prints every boolean flag with [=true|false] in the help. The other holds are in bump.sh’s holds, which keeps Node, the one in mise.toml, on its major.
  • bump.sh’s header lists every pin with the tool that moves it, or with - and the reason it’s left, as # pin lines. TestBumpCoversPins in internal/structure finds the pins in assets/, mise.toml, both go.mod files, the workflows, tests/e2e-mise.lock, tests/e2e’s consts, scripts/release.sh’s container, docs/hugo.yaml and docs/package.json’s dependencies, without the network, and fails on a pin that no line covers or on a line that covers nothing, so a new pin gets a tool or a reason. The header also says why the pins outside those files are left as they are, such as the Lima that install.sh installs, which is the newest release checked against its SHA256SUMS, and the Homebrew formula, whose URLs and checksums release.sh fills in.
  • base’s Ubuntu cloud image and its apt packages have nothing to bump: devvm pins the newest image on each machine at its first build of base, and records the newest packages for each key of base at its first build (Ubuntu’s cloud image, base’s packages). docker moves Docker’s packages (assets/layers/docker.sh), read from its repository for base’s Ubuntu release, and its signing key. Packages added to assets/layers/base.sh or assets/features/ need no pin of their own: they change base’s key, whose first build records them.
  • mise moves base’s mise (assets/layers/base.sh) and devvm’s host mise (internal/tools/mise.go) together: the host one writes the lock base’s installs from. TestMisePins fails when their versions or Linux checksums differ, and base’s mise version is in the key of each tool image mise installs, so a bump builds them again.
  • The shared tools aren’t pinned for users, except Cursor’s CLI. Holds go in assets/shared-tools/mise.toml (node = "24" stays on that major). testdata/mise.lock is a fixed lock for the tests.
  • Their backends are named in mise.toml’s [tool_alias] table, for every tool that isn’t one of mise’s own core: tools, because mise’s registry can move a tool to another backend in any release (versions). A new shared tool gets its alias there, and TestToolBackendsNamed fails when a tool that isn’t a core: tool has none, or when its alias isn’t the backend that tests/e2e-mise.lock resolved.
  • When opencode’s major version changes, or a bump of e2e-tools moves opencode to a version that adds migrations, refresh internal/vm/testdata/opencode-<version>.sql, the schema of opencode’s database that TestOpencodeCleanSchema cleans. Print it with sqlite3 ~/.local/share/opencode/opencode.db .schema in a VM with that opencode, after opencode auth list has made the database, and copy only the schema, never rows. You can also make the file from the release’s packages/core/src/database/schema.gen.ts in opencode’s repo: unwrap its SQL and add the migration table’s line at the end, and it matches .schema line for line. Name the file for the version, and in the test put each new table in its list of tables that devvm empties or keeps, which the test asks for. A table or a column that holds a login also goes into opencodeLogins (internal/vm/agents.go) and the design note’s opencode’s database in history exports.
  • e2e-tools, e2e-from, e2e-curl and e2e-ubuntu move the end-to-end tests’ own pins, which keep their cached images valid between runs. e2e-tools resolves tests/e2e-mise.lock again, with devvm’s pinned host mise, for both architectures’ glibc and musl VMs. e2e-from moves the digests of node:24, alpine:3 and ubuntu:26.04 in tests/e2e/from_test.go to Docker Hub’s. e2e-curl moves curlImage in tests/e2e/transparent_test.go, the curl image that the network checks run in containers, to curlimages/curl’s newest release, by its digest. e2e-ubuntu moves e2eUbuntuRelease in tests/e2e/sandbox_test.go, the dated release of Ubuntu’s cloud image that e2e pins base to in place of the newest, to the newest Ubuntu lists. Ubuntu removes dated releases after a few months, and e2e’s going stops its first builds of base: bump e2e-ubuntu before that. Run e2e-tools after any change to assets/shared-tools/mise.toml, because the end-to-end tests refuse a lock resolved from another one (end-to-end tests). mise run test catches it first: TestE2ELockPins checks the lock’s first line against mise.toml and that it locks each of its tools, and TestE2EUbuntuPins checks that e2eUbuntuRelease is a dated release of base’s Ubuntu release, which e2e-ubuntu lists, and that scripts/bump.sh and tests/e2e name only that release.
  • A shared tool’s newest release isn’t always published for every platform at once, as when its files are still uploading, or for a few days after a Node release until its musl builds appear. e2e-tools counts a version that is newer than the one in tests/e2e-mise.lock as unpublished on a platform when its lock entry has no download with a checksum there, or when mise lock stops with a 404 for that platform’s download. It then names the tool, the version and the platform, and stops without editing the lock, so you try again later. When devvm resolves the shared tools for users and a lock entry has no download for a platform, it steps back to an older version (versions), but e2e-tools only waits, and its next run tries the newest version again. While a tool waits, e2e-tools can’t resolve the lock again after a change to assets/shared-tools/mise.toml either.
  • --check reports an unpublished version as waiting for upstream and goes on, so the Pins workflow still passes, and its issue lists the line under Waiting for upstream, so the issue stays open while a tool waits. --check still reports the other shared tools. When mise lock stopped on the 404, --check holds that tool back, at the lock’s version or left out when the lock has none, and runs mise lock again, so another tool’s failure still stops the run. Applying e2e-tools prints mise’s output before it stops. A 404 counts as unpublished only when it’s the only error mise lock printed, apart from the version and --verbose lines that end its output, and never when mise only warned about it, and only when the download’s file name names an architecture and its address holds the version of exactly one of the tools that mise resolved. A version no newer than the lock’s that has no download for a platform still stops the run, because upstream published it, and so does any other failure of mise lock, with mise’s output, such as a checksum that doesn’t match, even beside a 404, or a network error.
  • While a tool waits, a plain scripts/bump.sh stops at e2e-tools before it edits anything, so bump the other pins by name, with scripts/bump.sh TOOL…. A wait usually ends within a few days. When a line has been under Waiting for upstream for two weeks, look at the tool’s release, because a wait that long rarely ends on its own: upstream may have renamed the download, mise’s registry may build the wrong address for it, or the tool may have stopped publishing checksums. Each of these needs a fix in mise or a hold on the tool in assets/shared-tools/mise.toml, not more waiting.
  • e2e-lima moves the Lima release that CI’s end-to-end workflow installs, LIMA_VERSION in .github/workflows/e2e.yml, to Lima’s newest release, and LIMA_SHA256 to its Linux-x86_64 tarball’s line in that release’s SHA256SUMS. Lima’s release notes print the SHA-256 of SHA256SUMS itself, so e2e-lima checks the downloaded file against that value first and edits nothing when they differ.
  • assets/layers/ubuntu-cloud.gpg is Ubuntu’s cloud image signing key (fingerprint D2EB44626FDDC30B513D5BB71A5D6C4C7DB87C81), from keyserver.ubuntu.com. If Ubuntu changes it, pinning a new image (a first build of base, or devvm rebuild base) stops with ubuntu_bad_signature: fetch the new key, check its fingerprint against Ubuntu’s announcement, and replace the file (gpg --export FPR).
  • assets/layers/ubuntu-archive.gpg is Ubuntu’s archive signing key, “Ubuntu Archive Automatic Signing Key (2018)” (fingerprint F6ECB3762474EDA9D21B7022871920D1991BC93C), fetched from keyserver.ubuntu.com by that fingerprint, checked against the fingerprint that Ubuntu’s security team lists, and exported with gpg --export-options export-minimal --export FPR. devvm checks the InRelease files of a first build of base against it (ubuntu.ArchiveKeyring). If Ubuntu signs the archive with a new key, that build stops with packages_refused: fetch the new key, check its fingerprint the same way, and replace the file. The key must be RSA, because internal/ubuntu/pgp.go checks only RSA signatures. Moving base to a new Ubuntu release (ubuntu.Series, ubuntu.Version) also moves ubuntu.Released, the day Ubuntu released it, which is the date of that release’s own InRelease (dists/<series>/InRelease), because devvm refuses a release pocket dated before it.
  • Edited scripts change image keys, so the affected images rebuild on next use. An edit to assets/prelude.sh changes the key of every image and every shared tool image. Build them in a sandbox of their own (LIMA_HOME, DEVVM_LIMA_HOME, XDG_DATA_HOME, XDG_CONFIG_HOME) before committing (devvm build docker, or a VM made with the tools whose build script changed), then devvm gc, and run the end-to-end tests.

Known vulnerabilities

govulncheck checks devvm against the Go vulnerability database. mise run vuln scans the code twice, once as built for Linux and once as built for macOS, because some files build for only one of them, and it reports a vulnerability only when devvm’s code calls the vulnerable function. Two workflows run it:

  • CI’s vuln job runs mise run vuln on every push and pull request that CI runs on, as a job of its own, so a vulnerability published since the last change fails that check alone, and lint and test still report.
  • The Vulnerabilities workflow (.github/workflows/vuln.yml) runs every Monday, and you can start it by hand from the Actions tab. It scans main’s code for both systems, then downloads the archives of the latest release and of the newest release, prerelease or not, and checks that SHA256SUMS lists each archive and matches it. Then it scans each platform’s binary with govulncheck -mode=binary, because a release’s binaries keep the Go and modules they were built with.

A binary’s scan works differently from the code’s. It reports the vulnerable code that the binary holds rather than the calls into it, and it can name a package that isn’t linked into the binary at all. Before you release for a vulnerability that only a binary’s scan found, check that the binary has it, with go version -m BINARY for its Go and modules and govulncheck -mode=binary -show traces BINARY for the code it holds.

The workflow keeps its findings in one issue, “Known vulnerabilities in devvm”, which lists each scan’s vulnerabilities with the version found and the version that fixes it, and links each one’s entry in the database. It comments on the issue whenever the findings change, so a new vulnerability notifies you, and closes the issue once every scan finds nothing. When govulncheck itself fails, the job fails and leaves the issue as it is. Only a scan job with read access runs govulncheck. A second job, the only one that can write issues, reads the scan’s findings and updates the issue, and it does so only in a run on main, so a run started on another branch never closes it. The scans cover devvm’s Go code alone, not the packages in the VM images, the pinned tools, Lima, or releases older than the two they scan.

To fix a vulnerability, move what it’s in to the version that fixes it:

mise run vuln                # what govulncheck finds in your checkout, and the calls that reach it
scripts/bump.sh go           # Go's newest patch release, for one in the standard library
scripts/bump.sh go-minor     # Go's newest minor release, when only a newer minor has the fix
scripts/bump.sh go-mods      # the direct modules' newest patches and minors, for one in a module

A module that only go.mod’s indirect requirements hold moves with go get <module>@<fixed version> and go mod tidy. Once main is fixed, its scan passes, but the issue stays open while the latest release or the newest release still has the vulnerability, and it closes only when a release with the fix is the latest. A vulnerability that affects devvm’s users calls for a release (Releasing), and one that devvm’s code reaches only in a way that doesn’t matter can wait for the next one.

Fuzzing failures

The Fuzz workflow (.github/workflows/fuzz.yml) fuzzes every target each night and keeps its failures in one issue, “Fuzzing found failing inputs”, which names each failing target and links the night’s run. For each target there, download its crash-<target> artifact from that run, and fix it as Fuzzing says:

cp ~/Downloads/crash-FuzzNoProxy/* internal/proxy/testdata/fuzz/FuzzNoProxy/   # the input, in its target's seeds
go test -run '^FuzzNoProxy$' ./internal/proxy                                  # fails until the code is fixed

Commit the input with the fix and its test. The input stays in the target’s corpus, so the target fails on it each night until the fix is on main, and the issue closes on the first night every target passes (the nightly run).

Checking base against Ubuntu’s newest

The end-to-end tests pin base to e2eUbuntuRelease, so they never build base the way a user’s first build does, from Ubuntu’s newest cloud image and the mirrors’ newest packages. An upstream change can break those builds before any test sees it. For example, vz’s direct kernel boot needs an uncompressed arm64 kernel, and a VM shuts down only when its kernel has gpio_keys. mise run e2e -- --newest-base builds base as a user’s first build does and runs the checks that prove it works: images, then project (a VM that boots, stops, starts again and shuts down) and tools. --only chooses other sections in their place.

The run gives devvm no release to pin. It reads the newest release from Ubuntu’s listing, as scripts/bump.sh e2e-ubuntu does, and prints it at its start next to e2eUbuntuRelease. It runs in a sandbox of its own, which is slot 0’s with -newest added to its Lima home, state folder, Keychain service and lock (~/.lt-e2e-go-newest, /tmp/devvm-go-e2e-newest, devvm-go-e2e-newest and /tmp/devvm-go-e2e-newest.lock), with each fixed port slot 0’s plus 1000. So the cached pinned images in the other sandboxes stay as they are. Each run first deletes its sandbox’s images, tool images and package cache, so base is built from nothing, with its packages from the mirrors. The images section checks that devvm pinned the release Ubuntu listed as its newest and that base booted from it. When the newest doesn’t boot, a user’s devvm falls back to the release before it (origin_no_boot), so that check fails on the fallback. Its times go in timings/plain-newest/ in slot 0’s state folder, apart from the cached runs’. --newest-base can’t be combined with --slots or --slot.

Run it before each release and every week or two between them, on an arm64 Mac (vz) and on a Linux host (QEMU) when you can, because the two boot base differently. At its end, it prints the release Ubuntu listed and the release devvm pinned. When a check fails, it says UPSTREAM DRIFT and names the release, because a user’s first build of base gets the same failure now. Then:

  1. Read the failed check’s output and the run log of base’s build, which the build’s output names (log_details), in the sandbox’s state folder under data/devvm/logs/runs/.
  2. Run mise run e2e -- --only images on the pinned release. If it passes, the failure is upstream’s, from the newer image or its packages. If it fails too, the fault is devvm’s own, so fix that first.
  3. Fix devvm for the new release, such as a change to assets/layers/base.sh or to the Lima template. Then run --newest-base again until it passes.
  4. Bump e2e-ubuntu to that release once it passes, so the other end-to-end runs test it too.

Until a fix ships, users can still build base, because devvm’s fallback to the release before covers a newest release that doesn’t boot. A package that breaks base has no fallback, so a fix for one goes in the next release.

Releasing

  • Once, GitHub: the release environment, the rulesets, immutable releases and the co-signer’s GitHub App, as Setting up GitHub for releases lists them in order. Until that’s done, releases go out with scripts/publish.sh --local, as Publishing from this machine describes.

  • Once, the keys: the three release keys, as Release keys describes, the old release key, a minisign key that signs each release while releases bridge from it, minisign -G -p packaging/minisign.pub -s ~/.minisign/devvm.key (commit packaging/minisign.pub; the secret key and its password never go in the repo), and a key git signs tags with (git config user.signingkey, GPG, or SSH with gpg.format ssh) that git tag -v verifies on this machine. Commit its fingerprint in packaging/release-signer, one per line (# comments): the GPG fingerprint (gpg --fingerprint, no spaces), or the SSH key’s SHA256:… (ssh-keygen -lf KEY.pub). release.sh refuses a tag signed by any other key, even one git trusts. To rotate, add the new key’s line, tag with it, then remove the old one.

  • Between releases, each change on main that someone could notice adds its line to the ## Unreleased section at the bottom of CHANGELOG.md, in the group of the people who notice it, and its full story as a section of the next release’s page in releases/, in the same commit. A line under the page’s title links Unreleased, so the top of the page shows the latest release. Unreleased has no Highlights, because they’re written at the release, and a change that affects nobody, such as a refactor, adds no line.

  • Before the release commit, sort the lines by audience. List every Unreleased line in a table for the maintainer, with the group it goes in, who notices it and the line itself, and name the close calls, the lines that could go in either of two groups, with the case for each. Once the maintainer approves the table, write the Highlights and the lines as it says. Then someone who didn’t write the lines, such as a fresh agent, reviews them with the docs-voice skill, reading the visible part as a user would on GitHub and then each collapsed group, and flags what’s vague, padded, repeated across groups or about the notes themselves. Fold in the fixes until the review finds nothing to change.

  • Each release: bump VERSION, move the Unreleased lines to the top as the release’s ## <version> entry, leaving the empty ## Unreleased section at the bottom, and commit it on main. Then tag main’s HEAD and push it, and CI and the co-signer do the rest:

    git tag -s v<version>                       # sign the tag with your SSH key
    scripts/publish.sh                          # check the tag, then push main and the tag
    mise exec -- scripts/publish.sh --sign-legacy   # once the co-signer's draft is there, while the bridge lasts

    Approve the Release workflow’s run in the Actions tab, and GitHub emails you when it waits. Approve only a run for the tag you just pushed, because the run is that tag’s own workflow, and approving it gives CI’s release key to the tag’s code. Within the hour, the co-signer rebuilds the release, signs it and makes its draft release, or tells you through its notify command why not. While releases bridge from the old release key, --sign-legacy adds that key’s signature to the draft, asking for its password, and at its next run the co-signer publishes the release and updates the tap. The old key’s secret half never leaves this machine, and only minisign reads it, so no CI job and no GitHub secret ever has it.

  • If a final release changed the state format, freeze testdata/v<version>/ once the tag exists: run its generate.sh against the tag on a Mac and on Linux, and add its tests, as Freezing a release’s state says. A release that changes nothing on disk adds no fixture, and a release candidate adds none either, because its final release’s fixture holds the state it changed.

  • A prerelease, such as a release candidate or a beta, goes out the same way, with a version of the form x.y.z-<word>.N: VERSION holds 0.2.0-rc.1, CHANGELOG.md gets an entry ## 0.2.0-rc.1, and the tag is v0.2.0-rc.1. The word is lowercase letters, such as rc, beta or alpha, and release.sh refuses any other form of VERSION. The co-signer, or scripts/publish.sh --local, marks a prerelease’s GitHub release as a prerelease, so GitHub’s latest release skips it, and so do the install script’s default, devvm upgrade and the daily release check. In the tap it changes only Formula/devvm-rc.rb, the formula that follows prereleases, in a commit titled devvm-rc <version>, so the formula devvm stays on the last release. At the end, --local prints how to check the prerelease with brew upgrade devvm-rc or brew install devvmhq/tap/devvm-rc, and the prerelease’s install script line.

  • The tap’s two formulas are devvm, the newest release’s, and devvm-rc, the newest prerelease’s or release’s, whichever is newer. devvm-rc only moves forward: each publish, a release’s or a prerelease’s, points Formula/devvm-rc.rb at the version it publishes, unless the tap’s devvm-rc already names a newer one. So a release moves devvm-rc users onto it once it’s newer than their prerelease, and a patch release of an older line, or a prerelease older than the tap’s, leaves devvm-rc where it is. The co-signer and --local follow the same rule. --local’s printout says which way it goes, and when nothing in the tap changes, as for such a prerelease, it has no tap step and prints the install script line and devvm upgrade --to for checking it.

  • The changelog’s entry is sorted by who notices each change. Each line goes where a reader asking “does this affect me?” looks for it, so the question for a line is who notices it: everyone upgrading, the users of one feature, only a hostile VM, or nobody in practice. The entry starts with a paragraph that says which release it is and how to install it, then a line that links the release page, then its groups in this order, each one only when it has something:

    • Highlights: three to five concrete lines on what the release means for you, such as what now works or which reported bugs are fixed. A highlight never refers to the notes themselves, such as by pointing at What to do.
    • What to do: numbered steps, each an action that someone upgrading takes, such as running devvm update or restarting each running VM, with why when it isn’t plain. A breaking change goes here when it asks something of you.
    • Fixed: the bugs that users reported, with their issues, and the ones a typical user plausibly hit.
    • If you use…: a collapsed block for each feature, such as <details><summary>If you use a Linux host</summary>, holding the changes that only that feature’s users notice.
    • Security hardening: a collapsed block whose summary starts Security hardening: and says what the hardening means for you, such as <details><summary>Security hardening: a VM that tries to attack your machine can now do much less</summary>, with one line for each change that matters only when a VM is hostile.
    • Internal changes: a collapsed block, <details><summary>Internal changes</summary>, for rare conditions, limits nobody meets, pins, logs, status lines and the rest.
    • A collapsed block renders its list on GitHub only with a blank line after its <details><summary>…</summary> line and another before its </details>. markdownlint allows details and summary and no other inline HTML.
    • Each line is one outcome sentence, then its links. The sentence says what changes for you and what to do, if anything, in at most 35 words, not counting its links or a credit, and how devvm does it goes on the release page. A step in What to do may run longer, but it says only what to do and why. A line that covers several changes keeps every link of each.
    • The links come in this form and order: the user page to act on, for a step in What to do or a breaking change, then the change’s section on the release page, then its issue, then its commit, as in ([details](https://next.devvm.dev/docs/releases/0.2.0/#claude-codes-setup-token-login), [#57](https://github.com/devvmhq/devvm/issues/57), [6965efc](https://github.com/devvmhq/devvm/commit/6965efcc0a97f7f6334f00d0530007ecf459972c)). The issue is a full link, such as [#57](https://github.com/devvmhq/devvm/issues/57), or /pull/N in place of /issues/N for a pull request, because a bare #57 links only in GitHub’s view of the release’s notes, and not in CHANGELOG.md or anywhere else the entry is read. gh api repos/devvmhq/devvm/issues/N --jq .pull_request tells them apart: it prints nothing for an issue. Every reference to an issue or a pull request in the changelog is written this way, a credit’s included, and the release page writes them the same way. The commit is the one that made the change, or the main one of several, linked by its full SHA and shown by its first seven characters. Find each one with git log v<last release>..main and its messages, and git log -G on CHANGELOG.md names the commit that added a line. Credits, such as thanks for a report, stay in the line’s text, after its sentence and before its links.
    • The links point at next.devvm.dev in a release candidate’s entry, because devvm.dev shows the latest release’s docs, which don’t have its release page yet, and at devvm.dev in a release’s entry. Each anchor is the heading’s ID as Hugo makes it, such as #a-no_proxy-entrys-port for A NO_PROXY entry’s port, so check a new one against the built page. lychee checks the docs’ links offline, so it doesn’t check these.
    • TestChangelogShape keeps the shape, in internal/cli/docgen/changelog_test.go, which mise run lint:docs and mise run test run. For each entry from 0.2.0-rc.1 on, and for Unreleased once it has a line, it checks the groups and their order, three to five Highlights in a release’s entry, each collapsed group’s <details>, <summary> and blank lines, each line’s 35 words outside What to do, its details link to a releases/ page, and a full link for every issue and pull request. The entries before 0.2.0-rc.1 are history, and the test leaves them as they are.
  • The release page holds each change’s full story, and it is docs/content/docs/releases/<major>.<minor>.0.md, such as releases/0.2.0.md, which covers the release and its release candidates. Each release candidate adds its changes there, in the same commit as its changelog entry, so the page is written as the release is made. Each change gets a section of its own with its full story, under Breaking changes, Changes, Fixes and Hardening, as Writing docs describes, and the Releases section’s own page lists the page. Every fact a changelog line leaves out is in its section, so a line can stay one sentence. A change that two lines describe, such as a step in What to do and a line in Fixed, can share one section, which both link, and a line that covers several changes links each one’s section.

  • A prerelease’s changelog entry lists what changed since the version before it, whether that’s a release or another prerelease, and it becomes that prerelease’s notes on GitHub. When the release itself goes out, its entry, such as ## 0.2.0, replaces its prereleases’ entries and lists everything since the last release, so someone who upgrades from that release reads one entry. Each prerelease’s notes stay on its GitHub release.

  • scripts/publish.sh, with no flag, checks and stops with nothing done when a check fails. The working tree has to be clean. The tag v<version> has to pass scripts/release.sh --check-tag, which runs release.sh’s checks of the tag and the release keys and needs no container runtime, so the tag exists, is signed, and is signed by a key in packaging/release-signer. Its commit has to hold the release keys in packaging/keys, because CI’s workflow refuses one without, and without them it stops, pointing at step 1 of Setting up GitHub for releases and at --local. CHANGELOG.md has to have an entry for the version, which the co-signer makes the release’s notes from. The tag’s commit has to be main’s HEAD, origin’s main has to be an ancestor of it, and if origin already has the tag, it has to be the same tag. Then it prints the version, the tag’s commit and its two steps, each marked done or to do, and asks Push main and v<version> to origin? [y/N] on the terminal. It pushes main, then the tag, and prints what comes next. --dry-run stops before the question. It needs git alone, and it builds and publishes nothing.

  • scripts/publish.sh --sign-legacy adds the old release key’s signature to the co-signer’s draft, while releases bridge from that key. It needs gh, logged in, and minisign. It reads VERSION’s GitHub release, which has to be a draft holding SHA256SUMS, SHA256SUMS.ci.minisig and SHA256SUMS.cosign.minisig, and says so and stops when there’s no draft yet, when the co-signer’s signature isn’t on it yet, when it’s published, or when it holds SHA256SUMS.minisig already. It downloads those three files, and scripts/release.sh --sign-legacy DIR checks both signatures with this checkout’s packaging/keys, refusing when it has no release keys, and the trusted comment devvm-release <version>, so the old key signs only what both builders built and signed. Then it signs SHA256SUMS with the old key, DEVVM_MINISIGN_KEY or ~/.minisign/devvm.key, as SHA256SUMS.minisig with the trusted comment devvm <version>, which minisign asks the password for, and checks it with packaging/minisign.pub. It prints SHA256SUMS, asks Upload SHA256SUMS.minisig to devvm <version>'s draft release? [y/N], and uploads it with gh release upload. --dry-run signs it but uploads nothing.

Publishing from this machine

scripts/publish.sh --local builds, signs and publishes a release from this machine, as releases went out before CI and the co-signer. Its release carries the old key’s signature alone, which devvm accepts while the bridge lasts, and it needs no release keys in packaging/keys, so it’s the way releases go out until they’re made. The tag it pushes still starts CI’s Release workflow, which stops at its first step while there are no keys, so that failed run is expected: reject it when it waits for your approval, or leave it. Use it until GitHub is set up and the first release through CI is published, and it goes when the bridge ends at the latest, because a release that only the old key signed is then one no devvm accepts. A release it publishes after the co-signer’s init is one the co-signer alerts on, because the co-signer didn’t publish it.

  • Before it builds, scripts/publish.sh --local checks what it needs and stops with nothing done when a check fails. The tag v<version> has to pass release.sh’s own checks, so it exists, is signed, and is signed by a key in packaging/release-signer. The tag’s commit has to be main’s HEAD, and origin’s main has to be an ancestor of it, so that the push is a fast-forward. If origin already has the tag, it has to be the same tag. The working tree has to be clean, gh has to be installed and logged in (gh auth status), and minisign, curl and podman or Docker have to be installed. A published GitHub release for the tag is refused unless it already has every file, which is the case when an earlier run stopped after it, and unless GitHub marks it as a prerelease exactly when the version is one. The refusal names the gh release edit command that fixes the mark. The tap’s checkout, a clone of devvmhq/homebrew-tap, has to exist, be clean and be on main, for a prerelease too, and its origin has to have no commits that its main lacks. The checkout is DEVVM_TAP_DIR, or ../homebrew-tap next to this repo by default.
  • Then it builds and shows the release. It runs scripts/release.sh, which builds dist/ and signs SHA256SUMS, and where minisign asks for the password. It prints the version, the tag’s commit, each file with its size and SHA-256, the release notes, which are the CHANGELOG.md entry for the version, and the tap’s changes as a git diff of each formula it writes: Formula/devvm.rb for a release, and Formula/devvm-rc.rb, with a line saying when a release moves it too, or when it stays on a newer version. It lists the four steps, each marked done or to do, and when nothing in the tap changes, the fourth says so. Then it asks Publish devvm <version>? [y/N] on the terminal, and any answer but y stops it with nothing published. --dry-run stops before the question, so it pushes and publishes nothing and makes no commit in the tap, and --help describes the script.
  • Then it publishes, in this order. It pushes main and then the tag to origin. It makes the GitHub release devvmhq/devvm v<version> with gh release create --verify-tag, titled devvm <version>, with the release notes and the archives, the source tarball, SHA256SUMS, SHA256SUMS.minisig and install.sh. The release starts as a draft and is published only once every file is uploaded, so nobody sees a release that is missing files. Last, it copies dist/devvm.rb to the tap’s Formula/devvm.rb and dist/devvm-rc.rb to its Formula/devvm-rc.rb, each only when it’s one the tap gets and it differs, commits them in one commit, devvm <version> for a release or devvm-rc <version> for a prerelease, with the tap’s own commit signing, and pushes the tap. It uses gh for GitHub and never puts a GitHub token on a command line. At the end it prints how to check the release: brew update && brew upgrade devvm, or brew trust --formula devvmhq/tap/devvm and then brew install devvmhq/tap/devvm, with devvm-rc in place of devvm for a prerelease, and the install script’s curl line.
  • When a step fails, it says which steps it published and which it didn’t. Fix what failed and run scripts/publish.sh --local again, because every step skips what’s already done: a pushed main or tag, a published release whose SHA256SUMS matches the new build’s, and a tap whose formulas are already this build’s. A draft release that an earlier run left gets this build’s files again before it’s published. A release published from another build, whose SHA256SUMS doesn’t match, is refused. To finish by hand instead, run the steps it didn’t do in order: git push origin main, git push origin v<version>, the gh release create above (or gh release upload --clobber to a draft, then gh release edit v<version> --draft=false), each with --prerelease for a prerelease, and then copy the formulas the printout listed, dist/devvm.rb and dist/devvm-rc.rb, to the tap’s Formula/, commit them and push it.

The release script

  • scripts/release.sh checks the tag with git tag -v and its signer against this checkout’s packaging/release-signer, then builds dist/ from the tagged commit with GoReleaser (.goreleaser.yaml), in a repository of its own that holds only the commit and the tag, so only what’s committed goes in, with one goreleaser release --skip=publish. The build runs in the release’s container, as Reproducible releases describes. In the container, it checks that the Linux binary for the container’s processor prints the version, writes install.sh and adds its checksum to SHA256SUMS. Then, outside the container, it signs SHA256SUMS with ~/.minisign/devvm.key (or DEVVM_MINISIGN_KEY) and verifies it with packaging/minisign.pub. Nothing is published, because publishing is scripts/publish.sh --local’s, or the co-signer’s for CI’s build. Before it builds anything, it checks the release keys in the tag’s commit, and so do --check and --tag, though a snapshot, such as --head’s, skips the check (Release keys). packaging/keys must hold none of the three or all of them, because a devvm with one or two refuses every upgrade. When it holds none, the commit’s install.sh must have no key in its release_<role>_key lines. When it holds all three, each must be a minisign public key, a different one, not the old release key, not marked PLACEHOLDER in its comment, and the same as the commit’s install.sh has in its release_<role>_key line. scripts/release.sh --check runs only the tag’s checks and the build’s preconditions, prints the tag’s commit and builds nothing, and scripts/publish.sh --local runs it first. scripts/release.sh --check-tag runs the tag’s and the keys’ checks alone, needing no container runtime or signing key, and scripts/publish.sh runs it.

  • dist/ then holds:

    FileWhat
    devvm-<version>-<os>-<arch>.tar.gzthe binary, its files (assets/) embedded, with README.md, CHANGELOG.md and LICENSE, for darwin and linux, arm64 and amd64
    devvm-<version>.tar.gzthe source, attached to the release for whoever wants to build devvm themselves
    SHA256SUMS, SHA256SUMS.minisigtheir checksums and install.sh’s, and the signature
    install.shthe install script, set to this release and to packaging/minisign.pub’s key
    devvm-rc.rbthe Homebrew formula devvm-rc, which follows prereleases, set to each platform’s archive, its URL and its checksum from SHA256SUMS
    devvm.rbfor a release, not a prerelease, the Homebrew formula devvm, set the same way
  • scripts/release.sh --head builds from HEAD’s commit instead, for testing, with the version in that commit’s VERSION, a release’s or a prerelease’s, and scripts/release.sh --commit COMMIT does the same for any other commit. It’s unsigned unless DEVVM_MINISIGN_KEY names a test key; DEVVM_MINISIGN_PUB names its public key in place of packaging/minisign.pub. A build signed with a test key never replaces a dist/ whose SHA256SUMS verifies with this checkout’s packaging/minisign.pub, the release key, and stops before it builds anything, so move the release’s dist/ first, or set DEVVM_RELEASE_DIST. DEVVM_RELEASE_URL points the formula at a test location. A commit without install.sh is refused.

  • scripts/release.sh --tag TAG builds the tag TAG as its release is built, with the same checks of the tag and its signer and the tag’s version, but doesn’t sign it, so another builder can build a release and compare its SHA256SUMS with the published one. An unsigned build, such as this one, never replaces a dist/ that holds SHA256SUMS.minisig, and stops before it builds anything, so move the signed build’s dist/ first, or set DEVVM_RELEASE_DIST to a folder that doesn’t exist yet for the unsigned one.

  • scripts/release.sh --formula-from DIR writes only the formulas, for VERSION’s release once it’s published, and builds nothing: dist/devvm-rc.rb, and dist/devvm.rb too when VERSION isn’t a prerelease. Download the release’s SHA256SUMS and SHA256SUMS.minisig into DIR first. The script checks the signature against packaging/minisign.pub, and that its trusted comment is devvm <version> for VERSION’s version, so it refuses another release’s files. Then it fills in the formulas the same way a build does, from that SHA256SUMS.

  • scripts/release.sh --ci TAG DIR and --ci-sign TAG DIR are CI’s release workflow’s build and signature, as CI’s release workflow describes.

  • To try dist/install.sh on such a build, copy dist/ to DIR/releases/download/v<version>/, then in a throwaway HOME with DEVVM_PREFIX under it: DEVVM_INSTALL_TEST=1 source dist/install.sh, set repo_url=file://DIR and protos='=https,file' (it downloads over HTTPS only), and run main --no-deps. Without --no-deps it offers to install what the host lacks: answer no, or run it with no terminal.

  • Every build sets the version with -X github.com/devvmhq/devvm/internal/cli.version=<version>: devvm doesn’t read VERSION. The formula template (packaging/homebrew/devvm.rb) is both formulas’ one source, and it builds nothing. It has an archive for each of macOS and Linux on arm64 and Intel, the same archives the install script installs, and it installs the binary alone from the one for this machine. release.sh fills in each formula’s class, Devvm or DevvmRc, and the other formula, which it conflicts with by its full name, devvmhq/tap/devvm-rc or devvmhq/tap/devvm, because both install the devvm command. It also fills in each archive’s URL and its checksum, which it reads from the SHA256SUMS it just wrote, on every line that isn’t a comment. Both generated formulas pass brew audit --strict --online and brew style.

  • Publishing is the maintainer’s call, so an agent asks first and never runs scripts/publish.sh, in any mode, without --dry-run on its own. The script’s tests run it against a local bare repo as origin and a fake gh: testdata/script/publish_tag.txtar the default and --sign-legacy, and testdata/script/publish.txtar --local, with a local bare tap. testdata/script/release_ci.txtar runs CI’s --ci and --ci-sign.

Release keys

devvm upgrade and the install script accept a release’s SHA256SUMS when any two of three release keys signed it, so one stolen key signs nothing and one lost key stops nothing. internal/minisign makes the check, and the structure test keeps every other package from checking a signature itself (the checks on owners). Each key has a role, and each role signs into a file of its own beside SHA256SUMS:

RoleWho holds the keyIts signature
ciGitHub’s CI, which builds the releaseSHA256SUMS.ci.minisig
cosignthe co-signer, a machine of the maintainer’s that builds the same bytes againSHA256SUMS.cosign.minisig
recoverythe maintainer, offline, to sign in place of a lost keySHA256SUMS.recovery.minisig
  • The names keep .minisig last, as minisign’s own -x default does, so tools and readers take each file for a minisign signature, and SHA256SUMS.*.minisig lists the three. The role, rather than the key’s ID, names the file, so the names stay the same when a key is replaced, and none of them is SHA256SUMS.minisig, the old release key’s, which devvm 0.1 and 0.2 read.
  • The trusted comment is devvm-release <version>, such as devvm-release 0.3.0. minisign’s global signature covers it, and devvm compares it with the version it asked for exactly, so a SHA256SUMS signed for one release can’t stand in for another’s, and a manifest of another kind can’t stand in for a release’s.
  • Each check counts signers, not files. Each file is checked only against its own role’s key, and minisign.NewKeys refuses two roles with the same key or the same key ID, so two signatures are always two signers’. TestReleaseKeys checks that the keys in packaging/keys, once they’re made, are three such keys, and that none of them is the old release key, so the old key’s signature and one release key’s are never two of three.
  • Each kind has keys of its own. A kind is what a manifest describes, so devvm-base has its own three keys, its own trusted comment and its own key files, packaging/keys/base-<role>.pub, though devvm doesn’t read a published base yet. A key of one kind can’t sign another kind’s manifest.

The co-signer, devvm-cosign, holds the cosign keys. CI’s token can only read the repo, so CI hands its build and its signature over as a workflow artifact, and the co-signer signs it only when its own rebuild matches. Then the co-signer makes the release, publishes it once two of the three keys signed it, and updates the tap. Nothing else can make or publish a release but the maintainer, and the co-signer raises an alert for any release published without it since its state began, whatever its tag, as The co-signer describes, with its setup.

The public halves are in packaging/keys, as release-ci.pub, release-cosign.pub and release-recovery.pub, which packaging.Key embeds in devvm, and in install.sh’s release_ci_key, release_cosign_key and release_recovery_key lines, which TestInstallScriptKeys keeps the same as the files. To make a key, run minisign -G -p packaging/keys/release-<role>.pub -s <its secret key's file> where its holder keeps it, then commit the .pub file and copy its key into install.sh’s line. The co-signer’s key has no password, as Making its keys says, because it signs unattended. A secret key never goes in the repo.

Until the maintainer makes the keys, packaging/keys has none of them and install.sh’s three lines are empty. A devvm built then has no release keys, so devvm upgrade and its install script check each release with the old release key alone, through the bridge, and a release signed by the release keys but not by the old key is refused. scripts/publish.sh --local builds and signs each release with the old key, as Publishing from this machine describes. CI’s Release workflow, scripts/publish.sh without --local, --sign-legacy and the co-signer all need the keys and refuse to run without them, pointing at step 1 of Setting up GitHub for releases, which makes them. The keys go in together, all three in packaging/keys and in install.sh in one commit, because release.sh refuses to build a release from a commit with one or two of them, as a devvm with only some of them would refuse every upgrade.

release.sh checks the keys of each tag it builds: none, with install.sh’s lines empty or missing, or all three, each a minisign key of its own, none of them the old release key, and each the same as its line in install.sh. It also refuses a key whose comment holds PLACEHOLDER, such as a stand-in made for a test, because a devvm built with a key nobody holds could never check a release. The Go tests check the same on the committed keys: TestReleaseKeys that they’re none or three distinct keys and never the old one, TestInstallScriptKeys that install.sh’s lines match them, and TestReleaseRefusesPlaceholders that none is marked PLACEHOLDER.

The bridge from the old release key

While releases bridge from the old release key, devvm upgrade and the install script also accept SHA256SUMS when the old key alone signed it, in SHA256SUMS.minisig, with the trusted comment devvm <version>, as 0.1 and 0.2’s releases are. That’s what lets 0.1 and 0.2, which know only that key, upgrade to a release that the new keys sign, as long as each such release carries the old key’s signature too, and it’s what lets devvm upgrade --to and the install script’s --version install a 0.1 or 0.2 release. While the bridge lasts, the old key alone is still enough to sign a release, as it is today, so the release keys protect a release only once the bridge ends. The bridge is in one place in each:

  • devvm upgrade: internal/upgrade/legacy.go, which checkSums calls when two of the release keys’ signatures don’t check out, with Source.Key, packaging.MinisignKey and DEVVM_RELEASE_KEY.
  • The install script: minisign_key, check_legacy and the lines of download_signatures and check_signature that name them.

Each release through CI and the co-signer carries the old key’s signature beside the two new ones, which you add to the co-signer’s draft with scripts/publish.sh --sign-legacy, and the co-signer waits for it before it publishes, because its config’s legacy_key names the old key (What a run does). A release from scripts/publish.sh --local carries the old key’s signature alone, so devvm upgrade and the install script check it through the bridge.

The bridge ends with a release, the last one the old key signs, after at least two releases have gone out through CI and the co-signer, so that path is proven, and once 0.1 and 0.2’s daily release check has had a few weeks to offer users a release that checks two of three. That release takes out the bridge: devvm upgrade’s legacy.go fallback, the install script’s check_legacy, and minisign_key with its lines, so its devvm and install script accept only two of the three release keys. It still carries SHA256SUMS.minisig itself, so 0.1 and 0.2 can upgrade to it. Its changelog entry has a What to do step for anyone still on 0.1 or 0.2: upgrade to it by name, with devvm upgrade --to <version>, before any later release, or install a later release with the install script, because a 0.1 or 0.2 devvm refuses every release after it. After it, the co-signer’s config drops legacy_key, so it publishes without waiting, and scripts/publish.sh drops --sign-legacy and --local, and scripts/release.sh its old-key signing (--sign-legacy, and the signature its default build makes).

CI’s release workflow

The Release workflow, .github/workflows/release.yml, is CI’s half of each release. It runs for each pushed tag that starts with v, in the release environment, which waits for the maintainer to approve the run and holds the two things the workflow trusts: the variable RELEASE_TAG_SIGNERS, the SSH keys that sign release tags, and the secret RELEASE_CI_KEY, CI’s release key (Setting up GitHub for releases). Its job’s token can read the repo and nothing else, but for what the attestation needs, so the workflow can’t make or publish a release. It takes these steps:

  1. It checks the tag with scripts/release.sh --ci TAG DIR, against the signers in RELEASE_TAG_SIGNERS, written to an allowed signers file for git, and never against the tagged commit’s packaging/release-signer, because CI runs the workflow and release.sh from the tagged commit. The tag has to be an annotated tag of a release’s version, signed by one of those keys, whose tag object names the tag itself, so a tag pushed under another name is refused, and its commit has to be on main. The commit has to hold the three release keys in packaging/keys, because its devvm checks CI’s and the co-signer’s signatures with them, and the workflow’s first step, before it installs anything, stops a tag without them and points at step 1 of Setting up GitHub for releases.
  2. It builds the release as scripts/release.sh --tag does, with the same signers as git’s allowed signers, under the runner’s podman, then copies SHA256SUMS and exactly the files it lists, each checked against its SHA-256, into DIR. The formulas aren’t among them, because the co-signer renders them itself.
  3. It signs SHA256SUMS with scripts/release.sh --ci-sign TAG DIR, which reads CI’s release key on its standard input, from the environment’s secret through a pipe, so the key is never in a file or an argument. The key has to be an unencrypted minisign secret key, the signature’s trusted comment is devvm-release <version>, and the signature has to check out with the tag’s packaging/keys/release-ci.pub, which can’t be marked PLACEHOLDER. The signature is SHA256SUMS.ci.minisig.
  4. It adds an attestation, GitHub’s signed record of which workflow run built each file SHA256SUMS lists, which gh attestation verify FILE --repo devvmhq/devvm checks. devvm doesn’t check attestations, and they’re a public audit trail.
  5. It hands the build over as the artifact release, which holds SHA256SUMS, SHA256SUMS.ci.minisig and the files, side by side, kept for 90 days. The co-signer finds it through the workflow’s runs for the tag, as The co-signer describes.

The workflow installs only minisign, with mise and no cache, and pins every action by its commit. The published base’s workflow isn’t there yet: it comes with the published base, as a workflow of its own, base.yml, beside this one, with its own environment, key and artifact, base, which the co-signer already reads.

Reproducible releases

The same commit or tag, built on any machine, gives byte-identical release files: every archive, the source tarball, install.sh, SHA256SUMS and the formulas. To check it, build twice and compare:

scripts/repro-check.sh              # build HEAD twice and compare every file
scripts/repro-check.sh <commit>     # the same for another commit
scripts/repro-check.sh v<version>   # a tag, built as its release is, to compare with its published SHA256SUMS

repro-check.sh runs both builds with this checkout’s scripts/release.sh, which runs the commit’s own code only in the build’s container, never on your machine directly. That code still runs, though, and the container is only as isolated as your container runtime keeps it, so building a commit is running its code. A commit from outside the project, such as a pull request’s, is built only with the maintainer’s go-ahead for that run, as any outside code is. A commit builds as release.sh --commit builds it, unsigned. A tag builds as release.sh --tag builds it, with the tag’s checks and version and without the signature, so its SHA256SUMS matches the published one. A commit or tag whose release.sh pins no release_image, from before reproducible builds, is refused. The second build differs from the first in what the fixes below keep out of the bytes, so that losing one of them shows as a difference:

  • A stray tag. Build 2 fetches the commit from a repository with a tag, v0.0.0-stray, at the commit, which Go would stamp into the binary as its version if the build saw it. It’s a v0 version because Go ignores a tag whose major version the module’s path doesn’t name.
  • Another user. When podman and Docker are both installed, build 1 runs under podman, as root, and build 2 under Docker, as you, and the archives would record each. With one of them, both builds run as the same user, and the script says so.
  • The archives’ headers. Every file in each platform’s archive has to be root’s, with mode 0755 or 0644, as tar -tv lists it, whichever user either build ran as.

It prints each file’s SHA-256, says DIFFERS beside any file whose two builds differ, and exits 1 when one does or when an archive’s headers aren’t those. Both builds run on this machine, in the same image and on its processor, so to compare two machines, run it on both and diff the printouts, which list the files in the same order on every machine. CI’s repro job runs it under the runner’s podman and Docker, on every push and pull request that CI runs on, so the runner needs cgroups v2, with the pids and memory controllers delegated to its user for podman. It needs podman or Docker, git and curl, and no mise.

What makes the bytes the same:

  • One container. release.sh runs GoReleaser, writes install.sh and the formulas, and adds install.sh to SHA256SUMS inside one container image, with no network, release_image at the top of release.sh: Debian’s buildpack-deps:trixie-scm, pinned by its index’s digest, which scripts/bump.sh release-image moves. So git, which writes the source tarball, and awk, tar and gzip are the same on every builder. The image and the code that runs in the container, release.sh’s build, are the built commit’s copies, so a tag builds the same bytes from any checkout, even one whose pin has moved since. It uses podman when it’s installed and Docker otherwise, and DEVVM_RELEASE_RUNTIME names one. The container runs this machine’s processor, linux/arm64 or linux/amd64.
  • Go and GoReleaser from the commit’s mise.lock. release.sh reads the URL and SHA-256 of the linux-arm64 or linux-x64 download of each from the built commit’s mise.lock, so a tag builds with its own pins. It keeps each download in ${XDG_CACHE_HOME:-~/.cache}/devvm-release, named by its SHA-256, and checks every copy against mise.lock before the build uses it. A copy that doesn’t match stops the build and is deleted from the cache, so the next run downloads it again. A Go toolchain cross-compiles to the same bytes on either processor.
  • Go’s modules as go.sum pins them. The modules the commit’s go.mod needs are downloaded before the build, with this checkout’s Go, and Go checks each against the commit’s go.sum, so every builder builds from the same module files, whichever Go downloaded them. They come from Go’s module proxy, proxy.golang.org, so rebuilding an old tag needs the proxy to still serve its modules, which it does for good unless a module is taken down, for legal reasons for example.
  • The same environment inside. The build runs with umask 022, TZ=UTC, LC_ALL=C.UTF-8, CGO_ENABLED=0, GOTOOLCHAIN=local, -mod=readonly, and no git configuration but safe.directory. Go’s caches, HOME and the tools go in a folder of the container’s own, because Docker Desktop’s shared folders lose files that Go’s parallel module downloads rename, and -trimpath keeps their paths out of the binaries.
  • Only the tag built from. The build’s repository holds the commit and, for a tag, v<version>, and no other tags, because Go stamps the binary with a version from the tags it finds, and every machine holds different ones.
  • Fixed archive headers. .goreleaser.yaml sets each archive file’s owner and group to root, its mode (0755 for the binary, 0644 for the rest) and its time to the commit’s (builds_info and each file’s info), in place of GoReleaser’s defaults, which copy them from the files on disk, and mod_timestamp sets the binary’s own time to the commit’s. Without them, a build under Docker on a Mac records your user and group, and a build under podman records root, so the archives differ.

The signature, SHA256SUMS.minisig, is made outside the container, after the build, so it never changes the bytes of the other files.

What runs on your machine, outside the containers, is this checkout’s release.sh: the tag’s checks, the downloads, the checks on what the build wrote, and the signature. It limits what the commit’s code, in the build’s container, can reach and leave behind:

  • Downloads only from their publishers. Each mise.lock URL has to start with https://dl.google.com/go/ for Go, or https://github.com/goreleaser/goreleaser/releases/download/ for GoReleaser, and it goes to curl as --url’s value, so a lock can’t pass curl an option. It can’t hold .., or a %, which curl would decode, so that %2e%2e would be ... curl follows redirects over HTTPS only, and gives up after 30 seconds connecting, after 15 minutes, or past 1 GiB. A lock with two entries for a tool, or two downloads of one for this platform, is refused. The tests’ lock files use file:// URLs, which release.sh allows only from the folder that DEVVM_RELEASE_TEST_FILE_URLS names, and only when that folder exists and isn’t /, so the variable set by mistake reads no other file of yours, and each download is still checked against mise.lock.
  • A repository of the build’s own. release.sh fetches the commit and the tag into a new repository, which has no hooks, none of this checkout’s other branches, tags or objects, and no files it shares with this one, as a local clone’s hardlinks would be. Its origin is devvm’s repository on GitHub, which GoReleaser reads and nothing fetches from.
  • No network for the build. The Go modules are downloaded first, in a container of their own, which is the only one with the network. Everything it runs is this checkout’s, never the commit’s: its release_image, its release.sh, and the Go that its mise.lock pins, so the commit can’t choose an old Go with a known flaw for the one container with the network. It gets only the commit’s go.mod and go.sum, read-only, and a commit whose go.mod needs a newer Go than this checkout’s is refused before anything runs, so build it from a checkout at least as new. Go downloads the modules from its module proxy alone, proxy.golang.org, and checks each against go.sum, or against Go’s checksum database for one that go.sum lacks, and downloading runs none of the modules’ code. So every module path that the commit’s go.mod names is looked up on Google’s proxy and checksum database, even a private one, which fails there. The build’s container then runs with --network none and reads the modules read-only, as a module proxy’s files, so the commit’s code can’t reach your network or the services on your machine, such as the ones that Docker Desktop and podman machine forward to the Mac’s localhost.
  • No capabilities and no new privileges. Every container runs with --cap-drop ALL and --security-opt no-new-privileges. So root in the container can’t give a file another owner or ignore a file’s mode, and a setuid file in the commit’s image gives no privileges, even under a rootful runtime, where root in the container would otherwise be root on your machine.
  • Bounded processes and memory. Every container runs with --pids-limit 8192 and --memory 8g, so a build that forks without end or keeps allocating stops at those limits rather than using up your machine’s, which matters most under rootful Docker on Linux, whose containers share your kernel and have no limit of their own. Rootless podman supports them only on cgroups v2, with the pids and memory controllers delegated to your user, as systemd does by default. Disk space has no limit that both runtimes support, so while a build runs, it can fill the disk that holds your temporary folder or the runtime’s storage, until the time limit stops it.
  • The right user. The container runs as root under a rootless runtime, rootless podman or Docker’s rootless mode, which maps root to you, and as you under a rootful one, Docker or Docker Desktop, so the files it writes are yours either way. The runtime’s info says which, never its name, so podman behind a docker command runs as podman does, and a runtime that doesn’t answer, such as Docker Desktop when it isn’t running, stops the build before it starts.
  • Only your own files back. The build writes its files to a folder of their own, mounted at /out, which the container can’t swap for a link, because a mount point can’t be renamed. Before release.sh copies, signs or keeps any of them, it checks that the folder is still the one it made, not a link to another, that everything in it is a file or a folder, never a link, that each is yours and is neither setuid, setgid, sticky nor writable by anyone, and that they come to 2 GiB at most, which a release is far under. Then it copies the files to dist/ rather than moving them, so each copy is yours, with mode 0755 or 0644. So neither minisign, publish.sh nor gh follows a link that the container made, and no file the container wrote keeps its owner or its mode. release.sh runs with umask 022 on your machine too, so the signature it adds to dist/ is 0644 as well, even under a umask such as Ubuntu’s 0002, which would leave it writable by your group.
  • A time limit, and no container left behind. release.sh names each container for its run alone and removes it from your machine once it has run for two hours, or for DEVVM_RELEASE_TIMEOUT seconds, whatever its image does. It removes it too as soon as release.sh stops early. Ctrl+C, a closed terminal and kill stop it at once, and after kill -9 a watchdog that outlives release.sh removes the container and the build’s temporary folder within a few seconds. The container’s first process is bash, so the image’s own entrypoint never runs.

The docs sites

The docs have two sites, and the Docs workflow (.github/workflows/docs.yml) deploys both. devvm.dev shows the docs of the latest release, so what users read matches the devvm they install. next.devvm.dev shows the docs on main, for the next release, which is what someone trying a prerelease reads. A pull request that touches the docs gets their lints and a build, and it deploys nothing, so a pull request from a fork never reaches either site or its keys.

  • devvm.dev is GitHub Pages, in the repo’s github-pages environment, which accepts deployments from main and from v* tags, and only admins can create a v* tag. When a release is published, and it isn’t a prerelease, the workflow builds the docs in that release’s tag and deploys them. A release event runs the workflow file that the tag has, so a release whose tag predates this workflow doesn’t deploy on its own. Pushes to main never change devvm.dev.
  • To deploy a release’s docs by hand, for a release that didn’t deploy on its own or to put devvm.dev back on a release, run the Docs workflow from main in the repo’s Actions tab, or with gh workflow run docs.yml --repo devvmhq/devvm -f site=devvm.dev -f ref=v0.1.0. The site is devvm.dev unless you choose another one, and the ref is the release’s tag, which has to look like v0.1.0, so a prerelease’s tag is refused. Without a ref, the workflow deploys the latest release, as gh release view names it.
  • next.devvm.dev is Cloudflare Pages, serving the files on the main branch of the repo devvmhq/docs-next, and Cloudflare builds nothing. On each push to main that touches the docs, the workflow lints and builds main’s docs for next.devvm.dev, then replaces everything in devvmhq/docs-next but its README.md with the build, and commits it as Build from devvm <short sha>. When the build is the same as the last one, it commits nothing. gh workflow run docs.yml --repo devvmhq/devvm -f site=next.devvm.dev runs it by hand. Nobody edits devvmhq/docs-next by hand, because the next build replaces it.
  • Every build draws the diagrams first, with mise run docs:diagrams, so each of the workflow’s jobs installs Node through mise. A release whose tag predates the drawing script, docs/render-diagrams.mjs, loads Mermaid in its pages instead, so the release job draws them only when the tag has that script.
  • The deploy key that pushes to devvmhq/docs-next is the secret DOCS_NEXT_DEPLOY_KEY in the docs-next environment, which only main can deploy from. It’s an ed25519 key with write access to devvmhq/docs-next and to nothing else. The workflow checks that repo out with it only after the site is built, so the build never sees the key. To rotate it, make a new key, add its public half to devvmhq/docs-next as a deploy key with write access, put its private half in the secret, then delete the old deploy key.
  • The next build is hugo -s docs --minify --config hugo.yaml,next.yaml, which reads docs/next.yaml over docs/hugo.yaml. It sets the site’s address to https://next.devvm.dev/ and puts a banner on every page that says these docs are for the next devvm and links to devvm.dev. It also sets noindex, so Hextra gives every page a noindex, nofollow robots meta tag, and docs/layouts/robots.txt disallows everything, so search engines don’t index the site. devvm.dev’s build, hugo -s docs --minify, never reads docs/next.yaml, so it has no banner, its pages say index, follow, and its robots.txt allows everything.
Last updated on