From a56552dd4f9dfce88568d48e8dd9ea3116adc42e Mon Sep 17 00:00:00 2001 From: w3cj Date: Mon, 30 Nov 2026 03:35:25 -0700 Subject: [PATCH] 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 --- CHANGELOG.md | 3 +- docs/content/docs/contributing/cosigner.md | 8 ++-- docs/content/docs/contributing/maintaining.md | 45 ++++++++++++++----- docs/content/docs/contributing/structure.md | 2 +- docs/content/docs/releases/0.2.0.md | 6 ++- 5 files changed, 46 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 301d5f90..d3b392cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)). diff --git a/docs/content/docs/contributing/cosigner.md b/docs/content/docs/contributing/cosigner.md index 0c2d1313..8ee851ec 100644 --- a/docs/content/docs/contributing/cosigner.md +++ b/docs/content/docs/contributing/cosigner.md @@ -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//`, 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 `. 6. **On a mismatch, it signs nothing.** It writes a report to `/var/lib/devvm-cosign/reports/-