Skip to content

The coordinated release

When several people work on one repository, each with their own agents, a release cut by one session alone surprises everyone else: their merged work goes out without them knowing, and nobody checks that their work in flight still fits. ADR 0057 makes a release a short, recorded agreement. Everyone with a part in it is asked, anyone can hold it, and a person signs before it is published.

Someone proposes a version. kj opens a GitHub issue that lists what goes out, by author, and what stays out, by owner of each open pull request, and mentions all of them. Each of them answers from their own session, and their agent checks the candidate commit first. After 4 hours, silence counts as no objection, and the maintainer’s approval can close that wait earlier; a hold always blocks. When the release is ready, a person of the signer roster approves it with their phone, and only then is the tag created. CI publishes nothing that is not approved.

  • The authors of what goes out: everyone with commits since the last tag. Merge commits do not count, since they name who merged, not who wrote.
  • The owners of the work in flight: the author of every open pull request, so that they can check the candidate does not break what they are building.

Bots and authors without a GitHub account are listed in the issue but not asked: nobody can answer for them.

Terminal window
kj release propose 5.22.0

It opens the issue Release 5.22.0 with the label release: the candidate commit (the current HEAD), the base tag, the deadline (4 hours from now, in UTC), what goes out and what stays out. The last line of the issue is a block that the next commands read; do not edit it by hand.

Each participant, from their own session:

Terminal window
kj release ack 4242 ok
kj release ack 4242 hold --why "the migration in #4230 must go first"
kj release ack 4242 include --include 4230

Every answer runs the compatibility check first: the full suite on the candidate commit, and the suite on the participant’s own commits rebased onto it. Both run in temporary worktrees that are always removed, so your tree and your branch are never touched. The result travels with the answer.

  • ok with a failing check is posted, but it counts as a hold: an ok that did not pass its own check is not an ok.
  • An answer counts only from a participant, and only for the candidate the issue names.
  • Your latest answer wins: you can hold and later say ok.
Terminal window
kj release status 4242

It says who confirmed, who holds and why, who has not answered and until when. It exits 1 while the release is not ready. A release is ready when nobody holds it and everyone answered, or the 4 hours have passed.

Terminal window
kj release approve 4242

This is a human act: kj refuses it in an agent’s session. At the critical security level, the default (ADR 0060), you confirm it at your terminal and no phone is asked: the npm environment’s “Review deployments” is the one human approval of the publish. At max, the paranoid mode, it also asks for your signature on your phone, with a passkey or a key of the signer roster. Before approving it checks that nobody holds the release; after that it reads the issue again and stops if someone held it meanwhile. You do not have to wait for the 4 hours: approving before the deadline closes the wait, and the approval on the issue names who had not answered. A hold blocks it at any time. Then it posts the approval on the issue, tags the candidate as v5.22.0 and pushes the tag.

The tag starts the release workflow. Before publishing, it runs:

Terminal window
kj release verify v5.22.0

It passes only when the tag is on main, there is exactly one release issue for that version, the tag points to its candidate, the release is still ready (a hold posted after the approval also stops it), and the approval is valid: at critical, posted by someone with write access to the repository; at max, signed by someone of the roster. Anything else stops the publish and says why. To withdraw a proposal and open another, close the old issue as not planned: verify no longer counts it.

Nothing gets in the way: you are the only participant, you answer, and you approve.

The approval of the npm-publish environment on the run, if your repository has one, stays as an extra layer. The coordinated release decides whether a version should go out; the environment decides whether this run may use the publishing credentials.

Karajan Code™ · AGPL-3.0