Releasing brygge
How a brygge release is cut: .github/workflows/release.yml, specified by RFC 012. Who does what is set
by GOVERNANCE.md (“Cutting a release”):
- the owner authorizes each release by giving the architect an explicit go-ahead;
- the architect prepares the release and pushes its tag;
- the implementer never tags or publishes.
One-time setup (the owner; needs repository-admin and crates.io-owner rights)
(Released tags are protected by a governance rule rather than a GitHub ruleset, and there is no per-release approval click: both by owner ruling for v0, RFC 012 D-2 as amended 2026-09-24.)
Do these once, before the first automated release. Each is reversible in the same settings page.
-
Create the
releaseenvironment. GitHub → the repository → Settings → Environments → New environment → name itrelease.- Required reviewers: none. The per-release approval gate was removed for v0 after 0.1.1; the owner’s go-ahead before the tag is the authorization.
- Deployment branches and tags: Selected branches and tags. Add the tag rule
*.*.*and the branchmain;mainis needed for re-runs dispatched from the Actions tab. This setting is part of the security design: a dispatch runs the release tools of the commit it was dispatched from, and this rule means that commit can only bemainor a release tag. - Add no secrets of its own for this step — crates.io trusted publishing needs none. RFC 016 (below) adds the workflow’s first stored secret, the AUR SSH key, to this same environment.
-
Trust the workflow on crates.io. For each of the six crates (
brygge-ir,brygge-decode-cvs,brygge-decode-git,brygge-decode-hg,brygge-decode-svn,brygge): crates.io → the crate → Settings → Trusted Publishing → Add → GitHub, with:- repository owner
prikk-vcs; - repository
brygge; - workflow filename
release.yml; - environment
release.
With this in place, the workflow gets a crates.io token that lasts minutes, and no crates.io token is stored anywhere.
- repository owner
-
Account safety: two-factor authentication on the GitHub and crates.io accounts that hold these rights.
-
AUR (RFC 016;
bryggeandbrygge-bin, published by theaurjob after each release):- Generate a key pair for this purpose only:
ssh-keygen -t ed25519 -C "brygge release workflow" -f aur_brygge. - Add the public key (
aur_brygge.pub) to thenabbisenAUR account: My Account → SSH Public Key. - Add the private key (
aur_brygge) as the secretAUR_SSH_PRIVATE_KEYin the GitHubreleaseenvironment (the same one crates.io trusted publishing uses). - Delete the local private key file afterwards — it lives only in the secret.
- If the key is ever suspected leaked: remove it from the AUR account first, then replace the secret.
Its blast radius is every package the
nabbisenAUR account maintains (RFC 016 OQ-1, RR-aur-key).
- Generate a key pair for this purpose only:
Cutting a release
- The preparation:
- the architect assembles the cut commit: the version bump in
Cargo.toml(the workspace version and the workspace dependency versions);CHANGELOG.md:[Unreleased]→[X.Y.Z] — <date>, headed by the release notes; status lines, where they name a version; - the dev team runs the deep mutation depth (
BRYGGE_MUTATION_DEPTH=deep cargo test --workspace --release --locked -- --test-threads=4, built first and then run under the same memory capmutation.ymluses; the pinned thread count matters, because the cap covers the whole test process) locally, for every parser crate, and records the iterations, the time, and any finding in the cut request (RFC 014). This is a recorded step of the prep, not a new CI gate —mutation.ymlalready runs the same depth on every push that touches a parser orverify’s own checks; - the dev team runs the real corpus (review 111 N-2; the method, review 127 F-2), on the release
commit, when a decoder,
brygge-ir’s reader, writer or content store, or the CLI’s decode path changed since the previous release:tools/fixtures.sh fetch(fetches whatever is missing, then verifies everything with no further network), then, in one session on the same machine,python3 -I tools/bench/release-corpus.py <binary> fixtures/corpus tools/corpus/real.toml eza fish-shell tortoisehg-thgrun twice — once withfixtures/previous-release/<version>/brygge(the previous release’s real published binary, never a local rebuild), once with the new release build. Each run prints, per repository, the artifact’s size. Across releases an artifact’s bytes, and so possibly its size, differ by the version it records (in its provenance, and in every derived mark); that the history is the same is proved by the cross-version--against-sourcecheck, not by bytes. A timing session needsuptimeunder 16 (half the threads) at its start, or the figures are recorded as “load-confounded”, with no comparison drawn. Each run also prints the decode’s time and peak RSS, andverify’s time and peak RSS, withos.wait4giving each child’s ownru_maxrss(neverRUSAGE_CHILDREN’s running total across two calls — the review 099 lesson). Both rows go intools/bench/README.md’s per-release table, so the previous release’s row is re-measured on this machine too and machine drift between cycles cannot fake a regression.brygge-bench real(fetching aside) stays the RFC 014 D-4 shape-and- correctness run; it is not this step. A time comparison takes the median of three runs per binary (review 154): a single pair’s run-to-run spread on one machine can exceed 10% with nothing changed, so one run of each is not enough to tell a real regression from noise. When none of those changed, state so in the cut request and reuse the previous release’s row rather than re-measuring (stated, not silently copied); - the dev team runs the cross-version
--against-sourcecheck (review 111 N-2), on the release commit, when the IR model, a decoder’s derivation, or--against-sourcechanged since the previous release:tools/fixtures.sh fetchfor the previous release’s real published binary (fixtures/previous-release/<version>/brygge, never a local rebuild), then decode one Git repository (with--infer-renames) and one CVS repository with that binary, decode the same two with the new release build, and runverify --against-sourcewith the new build against the previous build’s artifacts. This is the level-3 confirmation of the level-2 proof V-1/V-2 already committed undercrates/brygge/tests/data/. Record the result in the cut request.
- the architect assembles the cut commit: the version bump in
- The implementer commits and pushes it, and reports its CI result (all four platforms green).
- The architect asks the owner for the go-ahead, immediately before the tag, and records it. Then
the architect pushes the annotated tag:
git tag -a X.Y.Z -m "brygge X.Y.Z", thengit push origin X.Y.Z. Pushing the tag is the act that publishes. release.ymlruns.verifyre-checks the tag and runs the full gates on it, and the binaries are built. Nothing is published unless all of that passes.- Then the workflow:
- publishes the crates that are not yet on crates.io, in dependency order;
- installs
bryggefrom crates.io and smoke-tests it; - checks the published crates are byte-identical to the tag;
- creates the GitHub release, with the binaries, their checksums and their provenance attestations;
- renders, builds and lints
bryggeandbrygge-binin a pinned Arch Linux container, verifying each binary’s attestation first, and pushes both to the AUR (RFC 016).
- The architect checks the run, verifies the release page and the AUR packages, and records the release.
A failed attempt. If the run fails before publish to crates.io (the tag was wrong, a gate
failed), nothing was published. The architect may then delete the tag and re-create it on the fixed
commit, with the owner’s go-ahead (git push --delete origin X.Y.Z). Once any crate of a version is
published, its tag is never moved or deleted (GOVERNANCE.md).
If only the aur job fails, the crates and the GitHub release are already published and stay
published: the run still fails (never a quiet green), but outcome reports it distinctly, as “released;
AUR not updated”. The architect re-runs aur alone: Run workflow with the same tag and aur_only: true, after fixing the cause. The same path, with a pkgrel input, is RFC 016 D-3’s packaging-only fix
(a PKGBUILD change with no new brygge release); dry_run: true stops before git push, to prove the job
without touching the AUR.
Never push a placeholder to an AUR package name. A deleted package cannot be pushed to again until a Package Maintainer restores it, and an orphaned one until its adoption is granted (2026-10-28 → 2026-11-02, which delayed 0.5.0’s and 0.6.0’s packages).
A packaging-only fix is a dispatch with aur_only: true, the same tag, and pkgrel raised. The brygge
version does not change.
Re-running.
- Actions → Release → Run workflow with the same
tag. It is safe: crates already published are skipped. - It stops without changing anything if the GitHub release already exists (
aur_onlyis the exception: it never touches crates.io or the GitHub release, only theaurjob). - A release of an older tag is never marked “Latest”: only a version higher than every release already on
GitHub is (
tools/release-latest.sh). - The inputs
binaries: falseandnoteare for releases whose binaries cannot or should not be built; 0.1.0 is the only such release so far.
Checking a downloaded binary.
sha256sum -c brygge-<target>.tar.gz.sha256, thengh attestation verify brygge-<target>.tar.gz --repo prikk-vcs/brygge.- Or install from source with
cargo install --locked brygge.
Manual fallback (only when the workflow cannot run)
The architect executes it, confirming each step with the owner immediately before it:
- From a clean checkout of the tag,
cargo publish -p <crate> --lockedfor each crate not yet published, in dependency order. cargo install --locked brygge --version X.Y.Z, then a smoke test.tools/check-published.sh X.Y.Z.gh release create X.Y.Z --verify-tag --notes-file <(tools/release-notes.sh X.Y.Z).
A first publication of several new crates can hit crates.io’s new-crate rate limit (HTTP 429). Wait for the time it states, then continue with the remaining crates. Versions can be yanked, never deleted.