docs(release): the release process through CI and the co-signer, and the bridge's end

- maintaining.md's Releasing: the maintainer's part is git tag -s and
  scripts/publish.sh, then approving the Release workflow's run and,
  while the bridge lasts, publish.sh --sign-legacy, with what the
  default mode and --sign-legacy check and ask; Publishing from this
  machine, --local, which stays until GitHub is set up and the first
  release through CI is out, and goes when the bridge ends at the
  latest; The release script, its own heading, with --check-tag; the
  prerelease and tap rules as the co-signer and --local follow them;
  the scripts' tests.
- The bridge from the old release key, a heading of its own: each
  release through CI carries the old key's signature, which the
  co-signer waits for; it ends with a release after at least two
  releases through CI and a few weeks of 0.1 and 0.2's daily check,
  which takes out legacy.go's fallback, check_legacy and minisign_key,
  still carries SHA256SUMS.minisig itself, and has a What to do step
  for 0.1 and 0.2 users (devvm upgrade --to it, or the install
  script); then legacy_key, --sign-legacy, --local and release.sh's
  old-key signing go.
- cosigner.md: releases go through it once GitHub is set up, and the
  bridge's signature comes from publish.sh --sign-legacy; only a run a
  tag's push started counts, init's latest older than a release it
  published is an alert, and a release older than one it published
  isn't made GitHub's latest.
- Approve only a run for the tag you just pushed, as approving gives
  CI's key to that tag's code (maintaining.md's Releasing).
- structure.md's scripts row.
- The 0.2.0 release page: Releases through CI and the co-signer, and
  the co-signer's section's build failures and latest check; the
  changelog's internal line. Users act on nothing until the bridge
  ends, so no What to do line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
w3cjandClaude Opus 5.5 committed 2026-11-30 21:36:37 -07:00
1 parent 7874354a15
commit a56552dd4f
5 files changed
+46 -18

No files matched your search

+2 -1
View File
@@ -263,6 +263,7 @@ These changes are on `main` and go out in the next release.
- mise is 2026.11.14 in base and on this machine, the nix layer has Nix 2.36.0, and the docker layer has buildx 0.39.1 and its model plugin 1.2.10 ([details](https://next.devvm.dev/docs/releases/0.2.0/#pins-since-020-rc1)).
- A release now builds to the same bytes on any machine, in one pinned container, so two builders can check each other's archives ([details](https://next.devvm.dev/docs/releases/0.2.0/#reproducible-release-builds)).
- devvm upgrade and the install script can check a release against two of three new release keys once those keys are made, and the install script refuses a release's files signed for another version ([details](https://next.devvm.dev/docs/releases/0.2.0/#releases-signed-by-two-of-three-keys)).
- A co-signer, a machine of the maintainer's, can now rebuild each release CI hands over and sign and publish it only when both builds match, though releases don't go through it yet ([details](https://next.devvm.dev/docs/releases/0.2.0/#a-co-signer-for-releases)).
- A co-signer, a machine of the maintainer's, can now rebuild each release CI hands over and sign and publish it only when both builds match ([details](https://next.devvm.dev/docs/releases/0.2.0/#a-co-signer-for-releases)).
- Releases can now be built and signed by GitHub's CI and published by the co-signer, each with both signatures, a GitHub attestation and the old key's signature, which devvm 0.1 and 0.2 check ([details](https://next.devvm.dev/docs/releases/0.2.0/#releases-through-ci-and-the-co-signer)).
</details>
+4 -4
View File
@@ -6,13 +6,13 @@ weight: 3
The co-signer, `devvm-cosign`, is the second of the two builders that sign each devvm release and each published base. It runs on a Linux machine of the maintainer's, and a systemd timer starts it every hour. CI builds each release and hands its files and its signature over as a workflow artifact, because CI's token can only read the repo. Each run, the co-signer downloads what CI handed over, rebuilds it with its own copy of devvm, and signs the manifest only when its build matches CI's byte for byte. Then it makes the GitHub release itself, uploads CI's files and both signatures, and publishes the release once two of the three keys signed it, then updates the Homebrew tap. CI can't make or publish a release, so only the co-signer, and the maintainer by hand, can, and the co-signer raises an alert for any release published since its state began that it didn't make, whatever its tag. Its code is `cmd/devvm-cosign` and `internal/cosign`, and its systemd units and install script are in `packaging/cosign`.
devvm doesn't use the co-signer yet. Releases are published with `scripts/publish.sh` until CI's release workflow hands them over, as [Releasing](maintaining.md#releasing) describes.
Releases go through CI and the co-signer once GitHub is set up for them, as [Setting up GitHub for releases](github-setup.md) lists, and until then `scripts/publish.sh --local` publishes them from the maintainer's machine, as [Releasing](maintaining.md#releasing) describes.
## What CI hands over
CI's release workflow, `.github/workflows/release.yml` by default (`release_workflow` in the config), runs for each pushed release tag, and uploads one artifact named `release`. The artifact holds `SHA256SUMS`, CI's signature of it, `SHA256SUMS.ci.minisig`, and every file `SHA256SUMS` lists, and nothing else, side by side, with no folders. The base workflow, `.github/workflows/base.yml` by default, uploads one artifact named `base` in the same way, with `base-index.json`, `base-index.json.ci.minisig` and the files the index lists.
The co-signer reads the workflow's successful runs of this repo's own, never a fork's, through the Actions API. For a release, it takes each tag's newest run, and for a base, the newest run on `main`. What a run hands over isn't trusted for being CI's: CI's key has to have signed the manifest, and the co-signer's own build has to match it.
The co-signer reads the workflow's successful runs of this repo's own, never a fork's, through the Actions API. For a release, it takes each tag's newest run that the tag's push started, and for a base, the newest run on `main`. What a run hands over isn't trusted for being CI's: CI's key has to have signed the manifest, and the co-signer's own build has to match it.
## What a run does
@@ -25,11 +25,11 @@ For each release CI handed over that the co-signer hasn't published, oldest vers
5. **On a match, it signs.** Every file that `SHA256SUMS` lists has to have the same SHA-256 in both builds, and the two `SHA256SUMS` have to be the same bytes. The co-signer renders the tap's formulas itself, from the tag's template and the signed `SHA256SUMS`, as `release.sh`'s `formula` function does, and its build's formulas have to be the same bytes, so neither builder's container decides what Homebrew installs. It keeps the formulas and the release notes, the tag's `CHANGELOG.md` entry for the version, in `kept/<version>/`, and records their SHA-256s and the version as signed in its state. Then it signs `SHA256SUMS` with its own key and the trusted comment `devvm-release <version>`.
6. **On a mismatch, it signs nothing.** It writes a report to `/var/lib/devvm-cosign/reports/<tag>-<time>.txt`, with each file that differs and both builds' SHA-256s, files nothing publicly, and records the `SHA256SUMS` as refused, so it isn't built or downloaded again. Every run fails until you clear it, as [Refusals and alerts](#refusals-and-alerts) says. A build that fails rather than differs, such as one cut short by a full disk or a download that failed, is built again at the next run, but the third failure in a row refuses it in the same way, with a report that holds the last failure. A build that keeps failing would otherwise take every run's one build, and hold up each newer release and base behind it. A build stopped with its run, at its time limit or by `systemctl stop`, isn't counted.
7. **It makes the release.** The co-signer downloads CI's artifact again, checked as before, with the same `SHA256SUMS`. It makes a draft release of the tag, titled `devvm <version>`, with the notes it kept, as a prerelease for a version such as `0.3.0-rc.1`. It uploads `SHA256SUMS`, both signatures and CI's files from the stage, hashing each file as it's sent, so a file that changed on disk after its check is deleted again rather than published. An asset it didn't upload, such as a half-finished upload's, is deleted, and one with the bytes it should have, by size and GitHub's digest, is kept, so a run that stops can run again.
8. **It checks the draft, then publishes.** The draft's signatures have to pass `Keys.Check`, so two of CI's, its own and the recovery key's. While releases bridge from the old release key, it waits until you upload `SHA256SUMS.minisig` to the draft and checks it with that key and the trusted comment `devvm <version>`, because devvm 0.1 and 0.2 check only that key, so while the bridge lasts, that key alone still signs a release for them. Each run fails while it waits, so you hear that the draft is waiting for you. Then it reads the draft again: its tag, title and notes have to be the ones it wrote, and its assets exactly the ones it uploaded, by GitHub's ID, size and digest, with nothing added. The tag has to name the same tag object its rebuild checked, so a tag deleted or pushed again while the draft waited isn't published. Only then does it publish the release, as GitHub's latest release unless it's a prerelease.
8. **It checks the draft, then publishes.** The draft's signatures have to pass `Keys.Check`, so two of CI's, its own and the recovery key's. While releases bridge from the old release key, it waits until you upload `SHA256SUMS.minisig` to the draft, with `scripts/publish.sh --sign-legacy`, and checks it with that key and the trusted comment `devvm <version>`, because devvm 0.1 and 0.2 check only that key, so while the bridge lasts, that key alone still signs a release for them. Each run fails while it waits, so you hear that the draft is waiting for you. Then it reads the draft again: its tag, title and notes have to be the ones it wrote, and its assets exactly the ones it uploaded, by GitHub's ID, size and digest, with nothing added. The tag has to name the same tag object its rebuild checked, so a tag deleted or pushed again while the draft waited isn't published. Only then does it publish the release, as GitHub's latest release unless it's a prerelease or older than a release it published, which happens when the old key signs a newer release's draft first.
9. **It checks the release again.** When the published release differs from what it checked, the co-signer raises an alert and stops there, without updating the tap. devvm and the install script refuse a file that doesn't match `SHA256SUMS`, and Homebrew one that doesn't match its formula, but compare the files by hand. With immutable releases on, the fix is a newer release.
10. **Then the tap.** It commits the formulas it kept, each checked against the SHA-256 its state recorded, to the tap's `Formula/devvm.rb` and `Formula/devvm-rc.rb`, with GitHub's contents API, as `scripts/publish.sh` does: `devvm.rb` only for a release, not a prerelease, and each only when the tap's formula is for an older version. A tap formula for a version newer than any the co-signer signed isn't one it wrote, so that's an alert. A run that stopped after publishing finishes the tap on the next run, without building again.
Before any of that, the co-signer looks at each published release it hasn't finished. Its own draft, published without it seeing the answer, such as when GitHub's answer to the publish was lost, is checked as a published release: its `SHA256SUMS` has to be the one it signed, both signatures and every file have to check out, downloaded, and its title and notes have to be its own. Only then does the co-signer finish the tap, and otherwise it raises an alert. `init` records the highest release ID GitHub showed, and the drafts there were then, and GitHub's IDs only go up, so any other release published since, whatever its tag or version, is an alert too. Each run also reads GitHub's latest release, the one `/releases/latest/download/` serves to the install script, wherever the list puts it. `init` records which release that was, and the latest has to stay that one or become one the co-signer published: an older release made the latest again, such as one with a known flaw, is an alert, by `latest:<tag>#<ID>`, and so is one of the co-signer's own releases that's older than another it published.
Before any of that, the co-signer looks at each published release it hasn't finished. Its own draft, published without it seeing the answer, such as when GitHub's answer to the publish was lost, is checked as a published release: its `SHA256SUMS` has to be the one it signed, both signatures and every file have to check out, downloaded, and its title and notes have to be its own. Only then does the co-signer finish the tap, and otherwise it raises an alert. `init` records the highest release ID GitHub showed, and the drafts there were then, and GitHub's IDs only go up, so any other release published since, whatever its tag or version, is an alert too. Each run also reads GitHub's latest release, the one `/releases/latest/download/` serves to the install script, wherever the list puts it. `init` records which release that was, and the latest has to stay that one or become one the co-signer published: an older release made the latest again, such as one with a known flaw, is an alert, by `latest:<tag>#<ID>`, and so is the one `init` saw, or one of the co-signer's own, once it's older than a release the co-signer published.
Each step that fails is logged, and the run goes on to the next release, then exits 1. A run that stops at any step can run again safely, and since an Ed25519 signature of the same bytes and comment is always the same, a signature made again is the one the first run would have made.
+34 -11
View File
@@ -4,7 +4,7 @@ explainer: Bump pinned versions, fix known vulnerabilities, release devvm and ru
weight: 2
---
For maintainers: version bumps and releases. Run the scripts with mise, which puts the pinned minisign on `PATH`: `mise exec -- scripts/release.sh`. The release itself builds in a container, so you also need podman or Docker.
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
@@ -105,13 +105,22 @@ Until a fix ships, users can still build base, because devvm's fallback to the r
## Releasing
- **Once, GitHub:** the release environment, the rulesets, immutable releases and the co-signer's GitHub App, as [Setting up GitHub for releases](github-setup.md) lists them in order. Until that's done, releases go out with `scripts/publish.sh --local`, as [Publishing from this machine](#publishing-from-this-machine) describes.
- **Once, the keys:** the three release keys, as [Release keys](#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 with `git tag -s v<version>` and run `mise exec -- scripts/publish.sh`, which asks for the minisign password once and asks once more before it publishes anything. The secret key never leaves this machine, and only minisign reads it, so no CI job and no GitHub secret ever has it.
- **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:
```sh
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](structure.md#freezing-a-releases-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`. `scripts/publish.sh` marks a prerelease's GitHub release as a prerelease, passing `--prerelease` to `gh release create` and `gh release edit`, 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, it 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 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.
- **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.
@@ -126,11 +135,21 @@ Until a fix ships, users can still build base, because devvm's fallback to the r
- **`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](docs.md#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.
- **Before it builds,** `scripts/publish.sh` 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.
- **`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](github-setup.md#1-the-release-keys) 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 it 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.
- `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](#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`'s. 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](#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` runs it first.
- **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](#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](#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:
| File | What |
@@ -148,7 +167,7 @@ Until a fix ships, users can still build base, because devvm's fallback to the r
- `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](#cis-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` without `--dry-run` on its own. The script's tests (`testdata/script/publish.txtar`) run it against a local bare repo as `origin`, a local bare tap and a fake `gh`.
- 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
@@ -169,22 +188,26 @@ The co-signer, `devvm-cosign`, holds the `cosign` keys. CI's token can only read
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](cosigner.md#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](#the-bridge-from-the-old-release-key), and a release signed by the release keys but not by the old key is refused. `scripts/publish.sh` builds and signs each release with the old key, as before. 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.
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](#the-bridge-from-the-old-release-key), 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](#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](github-setup.md#1-the-release-keys), 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.
`release.sh` signs each release with the old key alone for now, in `SHA256SUMS.minisig`, so devvm upgrade and the install script check every release so far through the bridge.
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](cosigner.md#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](github-setup.md)). 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.
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](github-setup.md#1-the-release-keys).
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.
+1 -1
View File
@@ -109,7 +109,7 @@ Each package owns these concerns, and a package's `doc.go`, where it has one, ma
| `internal/memnet` | the network in memory for [tests in a synctest bubble](tests.md#time-and-lifecycles): connections (`Pipe`) that close their writing side alone, hold a buffer's worth and have deadlines, and listeners by address (`Network`), for tests only, and the standard library only, so the proxy's tests use it too |
| `testdata` | the CLI tests (`script/*.txtar`), the [golden fixtures](testing.md#golden-fixtures) (`golden/<os>/`), a lock to test with (`mise.lock`), each package's [coverage baseline](tests.md#coverage) on each system (`coverage/<os>.txt`), each release's [state fixture](#released-state) (`v<release>/<os>/`), and the lines that break each forbidigo rule (`lint/`, [Go lint rules](_index.md#go-lint-rules)) |
| `tests/e2e`, `tests/e2e-mise.lock` | the [end-to-end tests](tests.md#end-to-end-tests) on real VMs, in Go with the tag `e2e` and a file for each section. `TestE2E` is the run, `sandbox_test.go` has the sandbox, its slot's paths and lock and `e2eUbuntuRelease`, and `slots_test.go` runs the slots. The lock file holds the shared tools' versions that every section but `tools` uses (`scripts/bump.sh e2e-tools`) |
| `scripts`, `packaging`, `.goreleaser.yaml`, `VERSION`, `CHANGELOG.md` | `bump.sh` updates the pins. `release.sh` runs the signed tag's checks, then GoReleaser in its pinned container, then minisign, `repro-check.sh` builds a release twice and compares the bytes, and `publish.sh` makes the release itself, with its checks, `release.sh`, one yes, then the pushes, `gh release` and the tap. The `test` and `coverage` tasks run `test.sh`, which runs `coverage.sh` to check each package's coverage against its baseline. `packaging/` holds the Homebrew formula and `key.go`, which embeds its folder, so devvm upgrade's release keys are those in `keys/` (`release-ci.pub`, `release-cosign.pub` and `release-recovery.pub`) and its old release key is `minisign.pub`'s, and a build without a file has no such key ([release keys](maintaining.md#release-keys)). Only the scripts read `VERSION` ([releasing](maintaining.md#releasing)) |
| `scripts`, `packaging`, `.goreleaser.yaml`, `VERSION`, `CHANGELOG.md` | `bump.sh` updates the pins. `release.sh` runs the signed tag's checks, then GoReleaser in its pinned container, then minisign, and CI's build and signature (`--ci`, `--ci-sign`), `repro-check.sh` builds a release twice and compares the bytes, and `publish.sh` checks the tag and pushes it for CI and the co-signer, signs their draft with the old key while the bridge lasts (`--sign-legacy`), or makes the release itself (`--local`), with its checks, `release.sh`, one yes, then the pushes, `gh release` and the tap. The `test` and `coverage` tasks run `test.sh`, which runs `coverage.sh` to check each package's coverage against its baseline. `packaging/` holds the Homebrew formula and `key.go`, which embeds its folder, so devvm upgrade's release keys are those in `keys/` (`release-ci.pub`, `release-cosign.pub` and `release-recovery.pub`) and its old release key is `minisign.pub`'s, and a build without a file has no such key ([release keys](maintaining.md#release-keys)). Only the scripts read `VERSION` ([releasing](maintaining.md#releasing)) |
| `install.sh` | `curl \| bash`: it installs the host's archive, with the binary, the README, the changelog and the license, checked, into `~/.local/lib/devvm/<version>`, then runs doctor's fixes, asking first. Tests source it (`DEVVM_INSTALL_TEST`) |
### The checks on owners
+5 -1
View File
@@ -176,7 +176,11 @@ They still accept the old key's signature, in `SHA256SUMS.minisig`, while releas
### A co-signer for releases
Two builders that build the same bytes can check each other only if the second one really rebuilds each release and refuses one that differs, and only if nothing else can publish. devvm now has that second builder, `devvm-cosign`, a program of its own that a systemd timer runs hourly on a Linux machine of the maintainer's. CI can only read the repo, so it hands each release's files and its signature over as a workflow artifact. The co-signer checks CI's signature and every file against `SHA256SUMS`, checks the tag's SSH signature against the signers its own config pins, rebuilds the tag with its own pinned copy of `scripts/release.sh`, and signs `SHA256SUMS` only when both builds match, writing a report when they don't. Then it makes the GitHub release itself, and once two of the three release keys signed it, publishes it and commits to the tap the Homebrew formulas it renders from the signed `SHA256SUMS` and the tag's template, through a GitHub App's token. Any release published since its state began that it didn't make is an alert, whatever its tag. A refused build and an alert fail every run, and run a notify command of the maintainer's, until the maintainer clears them with `devvm-cosign retry` or `ack`. It never signs an older version than one it signed, nor two manifests for one version, and a failed upload or publish is safe to run again. Its keys are root's and reach it only as systemd's credentials, and the podman service its builds run in sees neither them, nor its state, nor its processes, starts empty for each run, and lives for one build, though it still runs as the same user. It handles a published base the same way, re-signing an unchanged base without a rebuild, though never one built from an Ubuntu snapshot more than 60 days old, and it can't rebuild a base yet. Releases don't go through it until CI's release workflow hands them over, so nothing changes for you ([The co-signer](../contributing/cosigner.md)).
Two builders that build the same bytes can check each other only if the second one really rebuilds each release and refuses one that differs, and only if nothing else can publish. devvm now has that second builder, `devvm-cosign`, a program of its own that a systemd timer runs hourly on a Linux machine of the maintainer's. CI can only read the repo, so it hands each release's files and its signature over as a workflow artifact. The co-signer checks CI's signature and every file against `SHA256SUMS`, checks the tag's SSH signature against the signers its own config pins, rebuilds the tag with its own pinned copy of `scripts/release.sh`, and signs `SHA256SUMS` only when both builds match, writing a report when they don't. Then it makes the GitHub release itself, and once two of the three release keys signed it, publishes it and commits to the tap the Homebrew formulas it renders from the signed `SHA256SUMS` and the tag's template, through a GitHub App's token. Any release published since its state began that it didn't make is an alert, whatever its tag. A build that fails three runs in a row is refused as a mismatch is, so it can't hold up the releases behind it, and an older release made GitHub's latest is an alert too. A refused build and an alert fail every run, and run a notify command of the maintainer's, until the maintainer clears them with `devvm-cosign retry` or `ack`. It never signs an older version than one it signed, nor two manifests for one version, and a failed upload or publish is safe to run again. Its keys are root's and reach it only as systemd's credentials, and the podman service its builds run in sees neither them, nor its state, nor its processes, starts empty for each run, and lives for one build, though it still runs as the same user. It handles a published base the same way, re-signing an unchanged base without a rebuild, though never one built from an Ubuntu snapshot more than 60 days old, and it can't rebuild a base yet. Nothing changes for you ([The co-signer](../contributing/cosigner.md)).
### Releases through CI and the co-signer
Every release so far was built, signed and published from the maintainer's machine, so that one machine decided what every user installed. Now the maintainer's part of a release is signing its tag and pushing it, with `scripts/publish.sh`. GitHub's CI then builds the release in its Release workflow, once the maintainer approves the run in a protected environment. The workflow checks the tag's SSH signature against signers kept in that environment, never a list in the tagged commit, builds the release in its pinned container, signs `SHA256SUMS` with CI's release key, adds a GitHub artifact attestation of every file, and hands the build to the co-signer. Its token can only read the repo, so CI can't publish anything. The co-signer rebuilds the release, signs it only when its build matches CI's byte for byte, makes the draft release, and publishes it with the tap's formulas. Each release published this way carries CI's signature and the co-signer's, which devvm upgrade and the install script check, and the old release key's signature too, which the maintainer adds by hand with `scripts/publish.sh --sign-legacy`, because devvm 0.1 and 0.2 check only that key. Releases go this way once the maintainer has set up GitHub for it, and until then they're built and published from the maintainer's machine as before, with `scripts/publish.sh --local`. Nothing changes for you until the old key's bridge ends, and that release's notes will say what to do ([CI's release workflow](../contributing/maintaining.md#cis-release-workflow), [the bridge](../contributing/maintaining.md#the-bridge-from-the-old-release-key)).
## Fixes