75 KiB
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
--checkprints 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,--checksays the pin is newer andbump.shleaves it as it is.- With no tools named,
bump.shapplies 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-toolsalways applies one, because users get the shared tools' new majors as well, andassets/shared-tools/mise.tomlholds 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 lockfor Go and the dev tools,go getandgo mod tidyfor the modules,go getandhugo mod tidyindocs/for Hextra,npm install --ignore-scriptsindocs/and thenmise run docs:diagramsfor pele, and actionlint and zizmor for the workflows. If one of those fails, the pins are already edited, andbump.shsays so. - It needs
curlandjq,misefor Go, the dev tools, the end-to-end lock and pele,goto apply the modules and Hextra, andghfor the actions. bump.shsendsGH_TOKEN, or elseGITHUB_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 a403. A fetch that fails names its URL.- Every Monday the Pins workflow (
.github/workflows/pins.yml) runsscripts/bump.sh --checkwith 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 thate2e-toolswaits for, and closes it once none is left. It never bumps anything, so you runscripts/bump.sh, then the--fromtier 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:
| Group | Tools | What they move |
|---|---|---|
images |
docker, nix, direnv, nix-direnv, mise, git-lfs, rustup, crane, omb, eza, tealdeer |
the 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-tools |
cursor, only when named |
Cursor's CLI in assets/shared-tools/mise.toml, the one shared tool pinned for users |
e2e |
e2e-tools, e2e-from, e2e-curl, e2e-ubuntu, e2e-lima |
the end-to-end tests' own pins |
go |
go, go-minor only when named, go-mods, deadcode |
Go, its modules and the deadcode task |
dev-tools |
dev-tools |
mise.toml's tools except Go, with their mise.lock entries |
ci |
ci-mise, actions |
the mise the workflows install, and their actions |
release |
release-image |
the container that every release is built in |
docs |
hextra, pele only when named |
the docs site's theme, and pele, which draws its diagrams |
gomoves Go to its newest patch release of the minor thatgo.modnames, fromgo.dev/dl. It edits thegolines ofgo.modanddocs/go.mod,mise.toml'sgo, and itsmise.lockentries.--checkreports a newer minor on thego-minorline, andscripts/bump.sh go-minormoves the same files to it.go-modsmovesgo.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, withgo getandgo mod tidy. The indirect ones move asgo mod tidyneeds them. A module's next major has a new path, so--checkreports it and you move it by hand.deadcodemoves the deadcode task's version inmise.tomlto golang.org/x/tools' newest release.dev-toolsmoves each ofmise.toml's tools except Go to mise's newest version of it, edits its line and runsmise lock, somise.lockkeeps 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, whichmise latestprints nothing for.dev-toolsmoves a Go tool pinned to a pseudo-version to its newest commit's, from the Go module proxy's@latestfor 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-misemoves theversionthat the workflows give jdx/mise-action to base's mise, as the run leaves it, soscripts/bump.sh mise ci-misemoves both.actionsmoves each workflow'suses:to its newest release's tag, as the tag's commit fromgh 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 asactions/cache/restore, moves with its repo's releases.release-imagemovesrelease_imageinscripts/release.sh, the container that every release is built in, to the digest of Docker Hub's newest index ofbuildpack-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 alinux/amd64and alinux/arm64image, 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'srepo-inforepository lists each image's packages), and runscripts/repro-check.shafter it (Reproducible releases).hextramoves the docs site's theme indocs/go.mod, and it reminds you to compare the copies of Hextra's files indocs/layouts/with the new release's.pelemoves pele only when named, because the diagrams need a look on the built site. It runsnpm installindocs/with the exact version and no install scripts, which writesdocs/package.jsonanddocs/package-lock.json, and then draws the diagrams again withmise 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).cursormoves 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 rune2e-tools.- A hold keeps a pin below a version, and
--checkshows 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 inbump.sh'sholds, which keeps Node, the one inmise.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# pinlines.TestBumpCoversPinsininternal/structurefinds the pins inassets/,mise.toml, bothgo.modfiles, the workflows,tests/e2e-mise.lock,tests/e2e's consts,scripts/release.sh's container,docs/hugo.yamlanddocs/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 thatinstall.shinstalls, which is the newest release checked against itsSHA256SUMS, and the Homebrew formula, whose URLs and checksumsrelease.shfills 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).
dockermoves Docker's packages (assets/layers/docker.sh), read from its repository for base's Ubuntu release, and its signing key. Packages added toassets/layers/base.shorassets/features/need no pin of their own: they change base's key, whose first build records them. misemoves 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.TestMisePinsfails 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.lockis 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 owncore:tools, because mise's registry can move a tool to another backend in any release (versions). A new shared tool gets its alias there, andTestToolBackendsNamedfails when a tool that isn't acore:tool has none, or when its alias isn't the backend thattests/e2e-mise.lockresolved. - When opencode's major version changes, or a bump of
e2e-toolsmoves opencode to a version that adds migrations, refreshinternal/vm/testdata/opencode-<version>.sql, the schema of opencode's database thatTestOpencodeCleanSchemacleans. Print it withsqlite3 ~/.local/share/opencode/opencode.db .schemain a VM with that opencode, afteropencode auth listhas made the database, and copy only the schema, never rows. You can also make the file from the release'spackages/core/src/database/schema.gen.tsin opencode's repo: unwrap its SQL and add themigrationtable's line at the end, and it matches.schemaline 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 intoopencodeLogins(internal/vm/agents.go) and the design note's opencode's database in history exports. e2e-tools,e2e-from,e2e-curlande2e-ubuntumove the end-to-end tests' own pins, which keep their cached images valid between runs.e2e-toolsresolvestests/e2e-mise.lockagain, with devvm's pinned host mise, for both architectures' glibc and musl VMs.e2e-frommoves the digests ofnode:24,alpine:3andubuntu:26.04intests/e2e/from_test.goto Docker Hub's.e2e-curlmovescurlImageintests/e2e/transparent_test.go, the curl image that the network checks run in containers, to curlimages/curl's newest release, by its digest.e2e-ubuntumovese2eUbuntuReleaseintests/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: bumpe2e-ubuntubefore that. Rune2e-toolsafter any change toassets/shared-tools/mise.toml, because the end-to-end tests refuse a lock resolved from another one (end-to-end tests).mise run testcatches it first:TestE2ELockPinschecks the lock's first line againstmise.tomland that it locks each of its tools, andTestE2EUbuntuPinschecks thate2eUbuntuReleaseis a dated release of base's Ubuntu release, whiche2e-ubuntulists, and thatscripts/bump.shandtests/e2ename 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-toolscounts a version that is newer than the one intests/e2e-mise.lockas unpublished on a platform when its lock entry has no download with a checksum there, or whenmise lockstops with a404for 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), bute2e-toolsonly waits, and its next run tries the newest version again. While a tool waits,e2e-toolscan't resolve the lock again after a change toassets/shared-tools/mise.tomleither. --checkreports 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.--checkstill reports the other shared tools. Whenmise lockstopped on the404,--checkholds that tool back, at the lock's version or left out when the lock has none, and runsmise lockagain, so another tool's failure still stops the run. Applyinge2e-toolsprints mise's output before it stops. A404counts as unpublished only when it's the only errormise lockprinted, apart from the version and--verboselines 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 ofmise lock, with mise's output, such as a checksum that doesn't match, even beside a404, or a network error.- While a tool waits, a plain
scripts/bump.shstops ate2e-toolsbefore it edits anything, so bump the other pins by name, withscripts/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 inassets/shared-tools/mise.toml, not more waiting. e2e-limamoves the Lima release that CI's end-to-end workflow installs,LIMA_VERSIONin.github/workflows/e2e.yml, to Lima's newest release, andLIMA_SHA256to itsLinux-x86_64tarball's line in that release'sSHA256SUMS. Lima's release notes print the SHA-256 ofSHA256SUMSitself, soe2e-limachecks the downloaded file against that value first and edits nothing when they differ.assets/layers/ubuntu-cloud.gpgis Ubuntu's cloud image signing key (fingerprintD2EB44626FDDC30B513D5BB71A5D6C4C7DB87C81), from keyserver.ubuntu.com. If Ubuntu changes it, pinning a new image (a first build of base, ordevvm rebuild base) stops withubuntu_bad_signature: fetch the new key, check its fingerprint against Ubuntu's announcement, and replace the file (gpg --export FPR).assets/layers/ubuntu-archive.gpgis Ubuntu's archive signing key, "Ubuntu Archive Automatic Signing Key (2018)" (fingerprintF6ECB3762474EDA9D21B7022871920D1991BC93C), fetched from keyserver.ubuntu.com by that fingerprint, checked against the fingerprint that Ubuntu's security team lists, and exported withgpg --export-options export-minimal --export FPR. devvm checks theInReleasefiles of a first build of base against it (ubuntu.ArchiveKeyring). If Ubuntu signs the archive with a new key, that build stops withpackages_refused: fetch the new key, check its fingerprint the same way, and replace the file. The key must be RSA, becauseinternal/ubuntu/pgp.gochecks only RSA signatures. Moving base to a new Ubuntu release (ubuntu.Series,ubuntu.Version) also movesubuntu.Released, the day Ubuntu released it, which is the date of that release's ownInRelease(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.shchanges 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), thendevvm 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
vulnjob runsmise run vulnon 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, andlintandteststill report. - The Vulnerabilities workflow (
.github/workflows/vuln.yml) runs every Monday, and you can start it by hand from the Actions tab. It scansmain's code for both systems, then downloads the archives of the latest release and of the newest release, prerelease or not, and checks thatSHA256SUMSlists each archive and matches it. Then it scans each platform's binary withgovulncheck -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:
- 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 underdata/devvm/logs/runs/. - Run
mise run e2e -- --only imageson 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. - Fix devvm for the new release, such as a change to
assets/layers/base.shor to the Lima template. Then run--newest-baseagain until it passes. - Bump
e2e-ubuntuto 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(commitpackaging/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 withgpg.format ssh) thatgit tag -vverifies on this machine. Commit its fingerprint inpackaging/release-signer, one per line (#comments): the GPG fingerprint (gpg --fingerprint, no spaces), or the SSH key'sSHA256:…(ssh-keygen -lf KEY.pub).release.shrefuses 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
mainthat someone could notice adds its line to the## Unreleasedsection at the bottom ofCHANGELOG.md, in the group of the people who notice it, and its full story as a section of the next release's page inreleases/, 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## Unreleasedsection at the bottom, and commit it onmain. 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 lastsApprove 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-legacyadds 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 itsgenerate.shagainst 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:VERSIONholds0.2.0-rc.1,CHANGELOG.mdgets an entry## 0.2.0-rc.1, and the tag isv0.2.0-rc.1. The word is lowercase letters, such asrc,betaoralpha, andrelease.shrefuses any other form ofVERSION. The co-signer, orscripts/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 onlyFormula/devvm-rc.rb, the formula that follows prereleases, in a commit titleddevvm-rc <version>, so the formuladevvmstays on the last release. At the end,--localprints how to check the prerelease withbrew upgrade devvm-rcorbrew install devvmhq/tap/devvm-rc, and the prerelease's install script line. -
The tap's two formulas are
devvm, the newest release's, anddevvm-rc, the newest prerelease's or release's, whichever is newer.devvm-rconly moves forward: each publish, a release's or a prerelease's, pointsFormula/devvm-rc.rbat the version it publishes, unless the tap'sdevvm-rcalready names a newer one. So a release movesdevvm-rcusers 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, leavesdevvm-rcwhere it is. The co-signer and--localfollow 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--tofor 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 updateor 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 allowsdetailsandsummaryand 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/Nin place of/issues/Nfor a pull request, because a bare#57links only in GitHub's view of the release's notes, and not inCHANGELOG.mdor anywhere else the entry is read.gh api repos/devvmhq/devvm/issues/N --jq .pull_requesttells 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 withgit log v<last release>..mainand its messages, andgit log -GonCHANGELOG.mdnames 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-portfor ANO_PROXYentry's port, so check a new one against the built page. lychee checks the docs' links offline, so it doesn't check these. TestChangelogShapekeeps the shape, ininternal/cli/docgen/changelog_test.go, whichmise run lint:docsandmise run testrun. 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, itsdetailslink to areleases/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 asreleases/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 tagv<version>has to passscripts/release.sh --check-tag, which runsrelease.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 inpackaging/release-signer. Its commit has to hold the release keys inpackaging/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.mdhas to have an entry for the version, which the co-signer makes the release's notes from. The tag's commit has to bemain's HEAD,origin'smainhas to be an ancestor of it, and iforiginalready 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 asksPush main and v<version> to origin? [y/N]on the terminal. It pushesmain, then the tag, and prints what comes next.--dry-runstops before the question. It needs git alone, and it builds and publishes nothing. -
scripts/publish.sh --sign-legacyadds the old release key's signature to the co-signer's draft, while releases bridge from that key. It needsgh, logged in, and minisign. It readsVERSION's GitHub release, which has to be a draft holdingSHA256SUMS,SHA256SUMS.ci.minisigandSHA256SUMS.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 holdsSHA256SUMS.minisigalready. It downloads those three files, andscripts/release.sh --sign-legacy DIRchecks both signatures with this checkout'spackaging/keys, refusing when it has no release keys, and the trusted commentdevvm-release <version>, so the old key signs only what both builders built and signed. Then it signsSHA256SUMSwith the old key,DEVVM_MINISIGN_KEYor~/.minisign/devvm.key, asSHA256SUMS.minisigwith the trusted commentdevvm <version>, which minisign asks the password for, and checks it withpackaging/minisign.pub. It printsSHA256SUMS, asksUpload SHA256SUMS.minisig to devvm <version>'s draft release? [y/N], and uploads it withgh release upload.--dry-runsigns 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 --localchecks what it needs and stops with nothing done when a check fails. The tagv<version>has to passrelease.sh's own checks, so it exists, is signed, and is signed by a key inpackaging/release-signer. The tag's commit has to bemain's HEAD, andorigin'smainhas to be an ancestor of it, so that the push is a fast-forward. Iforiginalready has the tag, it has to be the same tag. The working tree has to be clean,ghhas 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 thegh release editcommand that fixes the mark. The tap's checkout, a clone ofdevvmhq/homebrew-tap, has to exist, be clean and be onmain, for a prerelease too, and itsoriginhas to have no commits that itsmainlacks. The checkout isDEVVM_TAP_DIR, or../homebrew-tapnext to this repo by default. - Then it builds and shows the release. It runs
scripts/release.sh, which buildsdist/and signsSHA256SUMS, 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 theCHANGELOG.mdentry for the version, and the tap's changes as agit diffof each formula it writes:Formula/devvm.rbfor a release, andFormula/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 asksPublish devvm <version>? [y/N]on the terminal, and any answer but y stops it with nothing published.--dry-runstops before the question, so it pushes and publishes nothing and makes no commit in the tap, and--helpdescribes the script. - Then it publishes, in this order. It pushes
mainand then the tag toorigin. It makes the GitHub releasedevvmhq/devvmv<version>withgh release create --verify-tag, titleddevvm <version>, with the release notes and the archives, the source tarball,SHA256SUMS,SHA256SUMS.minisigandinstall.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 copiesdist/devvm.rbto the tap'sFormula/devvm.rbanddist/devvm-rc.rbto itsFormula/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 ordevvm-rc <version>for a prerelease, with the tap's own commit signing, and pushes the tap. It usesghfor 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, orbrew trust --formula devvmhq/tap/devvmand thenbrew install devvmhq/tap/devvm, withdevvm-rcin place ofdevvmfor a prerelease, and the install script'scurlline. - When a step fails, it says which steps it published and which it didn't. Fix what failed and run
scripts/publish.sh --localagain, because every step skips what's already done: a pushedmainor tag, a published release whoseSHA256SUMSmatches 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, whoseSHA256SUMSdoesn'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>, thegh release createabove (orgh release upload --clobberto a draft, thengh release edit v<version> --draft=false), each with--prereleasefor a prerelease, and then copy the formulas the printout listed,dist/devvm.rbanddist/devvm-rc.rb, to the tap'sFormula/, commit them and push it.
The release script
-
scripts/release.shchecks the tag withgit tag -vand its signer against this checkout'spackaging/release-signer, then buildsdist/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 onegoreleaser 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, writesinstall.shand adds its checksum toSHA256SUMS. Then, outside the container, it signsSHA256SUMSwith~/.minisign/devvm.key(orDEVVM_MINISIGN_KEY) and verifies it withpackaging/minisign.pub. Nothing is published, because publishing isscripts/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--checkand--tag, though a snapshot, such as--head's, skips the check (Release keys).packaging/keysmust 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'sinstall.shmust have no key in itsrelease_<role>_keylines. When it holds all three, each must be a minisign public key, a different one, not the old release key, not markedPLACEHOLDERin its comment, and the same as the commit'sinstall.shhas in itsrelease_<role>_keyline.scripts/release.sh --checkruns only the tag's checks and the build's preconditions, prints the tag's commit and builds nothing, andscripts/publish.sh --localruns it first.scripts/release.sh --check-tagruns the tag's and the keys' checks alone, needing no container runtime or signing key, andscripts/publish.shruns it. -
dist/then holds:File What devvm-<version>-<os>-<arch>.tar.gzthe binary, its files ( assets/) embedded, withREADME.md,CHANGELOG.mdandLICENSE, fordarwinandlinux,arm64andamd64devvm-<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 signatureinstall.shthe install script, set to this release and to packaging/minisign.pub's keydevvm-rc.rbthe Homebrew formula devvm-rc, which follows prereleases, set to each platform's archive, its URL and its checksum fromSHA256SUMSdevvm.rbfor a release, not a prerelease, the Homebrew formula devvm, set the same way -
scripts/release.sh --headbuilds from HEAD's commit instead, for testing, with the version in that commit'sVERSION, a release's or a prerelease's, andscripts/release.sh --commit COMMITdoes the same for any other commit. It's unsigned unlessDEVVM_MINISIGN_KEYnames a test key;DEVVM_MINISIGN_PUBnames its public key in place ofpackaging/minisign.pub. A build signed with a test key never replaces adist/whoseSHA256SUMSverifies with this checkout'spackaging/minisign.pub, the release key, and stops before it builds anything, so move the release'sdist/first, or setDEVVM_RELEASE_DIST.DEVVM_RELEASE_URLpoints the formula at a test location. A commit withoutinstall.shis refused. -
scripts/release.sh --tag TAGbuilds the tagTAGas 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 itsSHA256SUMSwith the published one. An unsigned build, such as this one, never replaces adist/that holdsSHA256SUMS.minisig, and stops before it builds anything, so move the signed build'sdist/first, or setDEVVM_RELEASE_DISTto a folder that doesn't exist yet for the unsigned one. -
scripts/release.sh --formula-from DIRwrites only the formulas, forVERSION's release once it's published, and builds nothing:dist/devvm-rc.rb, anddist/devvm.rbtoo whenVERSIONisn't a prerelease. Download the release'sSHA256SUMSandSHA256SUMS.minisigintoDIRfirst. The script checks the signature againstpackaging/minisign.pub, and that its trusted comment isdevvm <version>forVERSION's version, so it refuses another release's files. Then it fills in the formulas the same way a build does, from thatSHA256SUMS. -
scripts/release.sh --ci TAG DIRand--ci-sign TAG DIRare CI's release workflow's build and signature, as CI's release workflow describes. -
To try
dist/install.shon such a build, copydist/toDIR/releases/download/v<version>/, then in a throwawayHOMEwithDEVVM_PREFIXunder it:DEVVM_INSTALL_TEST=1 source dist/install.sh, setrepo_url=file://DIRandprotos='=https,file'(it downloads over HTTPS only), and runmain --no-deps. Without--no-depsit 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 readVERSION. 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.shfills in each formula's class,DevvmorDevvmRc, and the other formula, which it conflicts with by its full name,devvmhq/tap/devvm-rcordevvmhq/tap/devvm, because both install thedevvmcommand. It also fills in each archive's URL and its checksum, which it reads from theSHA256SUMSit just wrote, on every line that isn't a comment. Both generated formulas passbrew audit --strict --onlineandbrew style. -
Publishing is the maintainer's call, so an agent asks first and never runs
scripts/publish.sh, in any mode, without--dry-runon its own. The script's tests run it against a local bare repo asoriginand a fakegh:testdata/script/publish_tag.txtarthe default and--sign-legacy, andtestdata/script/publish.txtar--local, with a local bare tap.testdata/script/release_ci.txtarruns CI's--ciand--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:
| Role | Who holds the key | Its signature |
|---|---|---|
ci |
GitHub's CI, which builds the release | SHA256SUMS.ci.minisig |
cosign |
the co-signer, a machine of the maintainer's that builds the same bytes again | SHA256SUMS.cosign.minisig |
recovery |
the maintainer, offline, to sign in place of a lost key | SHA256SUMS.recovery.minisig |
- The names keep
.minisiglast, as minisign's own-xdefault does, so tools and readers take each file for a minisign signature, andSHA256SUMS.*.minisiglists 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 isSHA256SUMS.minisig, the old release key's, which devvm 0.1 and 0.2 read. - The trusted comment is
devvm-release <version>, such asdevvm-release 0.3.0. minisign's global signature covers it, and devvm compares it with the version it asked for exactly, so aSHA256SUMSsigned 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.NewKeysrefuses two roles with the same key or the same key ID, so two signatures are always two signers'.TestReleaseKeyschecks that the keys inpackaging/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-basehas 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, whichcheckSumscalls when two of the release keys' signatures don't check out, withSource.Key,packaging.MinisignKeyandDEVVM_RELEASE_KEY. - The install script:
minisign_key,check_legacyand the lines ofdownload_signaturesandcheck_signaturethat 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:
- It checks the tag with
scripts/release.sh --ci TAG DIR, against the signers inRELEASE_TAG_SIGNERS, written to an allowed signers file for git, and never against the tagged commit'spackaging/release-signer, because CI runs the workflow andrelease.shfrom 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 onmain. The commit has to hold the three release keys inpackaging/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. - It builds the release as
scripts/release.sh --tagdoes, with the same signers as git's allowed signers, under the runner's podman, then copiesSHA256SUMSand exactly the files it lists, each checked against its SHA-256, intoDIR. The formulas aren't among them, because the co-signer renders them itself. - It signs
SHA256SUMSwithscripts/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 isdevvm-release <version>, and the signature has to check out with the tag'spackaging/keys/release-ci.pub, which can't be markedPLACEHOLDER. The signature isSHA256SUMS.ci.minisig. - It adds an attestation, GitHub's signed record of which workflow run built each file
SHA256SUMSlists, whichgh attestation verify FILE --repo devvmhq/devvmchecks. devvm doesn't check attestations, and they're a public audit trail. - It hands the build over as the artifact
release, which holdsSHA256SUMS,SHA256SUMS.ci.minisigand 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 -tvlists 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.shruns GoReleaser, writesinstall.shand the formulas, and addsinstall.shtoSHA256SUMSinside one container image, with no network,release_imageat the top ofrelease.sh: Debian'sbuildpack-deps:trixie-scm, pinned by its index's digest, whichscripts/bump.sh release-imagemoves. 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, andDEVVM_RELEASE_RUNTIMEnames one. The container runs this machine's processor,linux/arm64orlinux/amd64. - Go and GoReleaser from the commit's
mise.lock.release.shreads the URL and SHA-256 of thelinux-arm64orlinux-x64download of each from the built commit'smise.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 againstmise.lockbefore 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.sumpins them. The modules the commit'sgo.modneeds are downloaded before the build, with this checkout's Go, and Go checks each against the commit'sgo.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 butsafe.directory. Go's caches,HOMEand 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-trimpathkeeps 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.yamlsets each archive file's owner and group toroot, its mode (0755 for the binary, 0644 for the rest) and its time to the commit's (builds_infoand each file'sinfo), in place of GoReleaser's defaults, which copy them from the files on disk, andmod_timestampsets 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.lockURL has to start withhttps://dl.google.com/go/for Go, orhttps://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%2ewould 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 usefile://URLs, whichrelease.shallows only from the folder thatDEVVM_RELEASE_TEST_FILE_URLSnames, 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 againstmise.lock. - A repository of the build's own.
release.shfetches 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. Itsoriginis 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, itsrelease.sh, and the Go that itsmise.lockpins, 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'sgo.modandgo.sum, read-only, and a commit whosego.modneeds 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 againstgo.sum, or against Go's checksum database for one thatgo.sumlacks, and downloading runs none of the modules' code. So every module path that the commit'sgo.modnames 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 noneand 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'slocalhost. - No capabilities and no new privileges. Every container runs with
--cap-drop ALLand--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 8192and--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 thepidsandmemorycontrollers 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
dockercommand 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. Beforerelease.shcopies, 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 todist/rather than moving them, so each copy is yours, with mode 0755 or 0644. So neither minisign,publish.shnorghfollows a link that the container made, and no file the container wrote keeps its owner or its mode.release.shruns with umask 022 on your machine too, so the signature it adds todist/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.shnames each container for its run alone and removes it from your machine once it has run for two hours, or forDEVVM_RELEASE_TIMEOUTseconds, whatever its image does. It removes it too as soon asrelease.shstops early. Ctrl+C, a closed terminal andkillstop it at once, and afterkill -9a watchdog that outlivesrelease.shremoves the container and the build's temporary folder within a few seconds. The container's first process isbash, 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-pagesenvironment, which accepts deployments frommainand fromv*tags, and only admins can create av*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 tomainnever 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
mainin the repo's Actions tab, or withgh workflow run docs.yml --repo devvmhq/devvm -f site=devvm.dev -f ref=v0.1.0. The site isdevvm.devunless you choose another one, and the ref is the release's tag, which has to look likev0.1.0, so a prerelease's tag is refused. Without a ref, the workflow deploys the latest release, asgh release viewnames it. - next.devvm.dev is Cloudflare Pages, serving the files on the
mainbranch of the repodevvmhq/docs-next, and Cloudflare builds nothing. On each push tomainthat touches the docs, the workflow lints and buildsmain's docs for next.devvm.dev, then replaces everything indevvmhq/docs-nextbut itsREADME.mdwith the build, and commits it asBuild 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.devruns it by hand. Nobody editsdevvmhq/docs-nextby 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-nextis the secretDOCS_NEXT_DEPLOY_KEYin thedocs-nextenvironment, which onlymaincan deploy from. It's an ed25519 key with write access todevvmhq/docs-nextand 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 todevvmhq/docs-nextas 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 readsdocs/next.yamloverdocs/hugo.yaml. It sets the site's address tohttps://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 setsnoindex, so Hextra gives every page anoindex, nofollowrobots meta tag, anddocs/layouts/robots.txtdisallows everything, so search engines don't index the site. devvm.dev's build,hugo -s docs --minify, never readsdocs/next.yaml, so it has no banner, its pages sayindex, follow, and itsrobots.txtallows everything.