docs(adr): record releases by generated pull request and the release bot as the only automated tag credential #177

Open
opened 2026-11-15 18:39:40 +00:00 by Claude · 4 comments
Owner

Spec: Release automation (resolution comment). Takes the next free ADR number when the pull request is opened, and renumbers on rebase if another ADR merged first.

ADR content

  • Decision: a release is cut only when the maintainer approves the CI-generated release pull request and it is merged; the version comes from the fragments. A dedicated release bot account holds the only automated credential that may push v* tags; the maintainer keeps tag permission as an override. Publishing is two API calls (create the release with its annotated tag, then upload the tarball) and the publish job converges: each push to main does whichever step is missing, so a rerun repairs a failed publish. The annotated tag message carries the sha256 of the release's MANIFEST.json, which is the same for every build of one tree. A failed publish is repaired by rebuilding from the tagged commit, and the rebuild must match the tag message.
  • Why: continuous delivery with one human decision (when a set of changes ships); the Gitea Actions job token cannot do it (its pull requests start no workflows, and it cannot be allowlisted for protected tags). A trusted contributor can merge once the required approval is given, so what decides a release is the maintainer's approval as code owner. That holds only if the release pull request always touches a file the maintainer owns (galaxy.yml or the changelog): check this against the CODEOWNERS patterns when writing the ADR.
  • Alternatives: fully manual (today); automerged release pull requests; release on every merge; knope or release-please (no tool reads antsibull fragments and opens a release pull request on Gitea).
  • Residual risk: no residual-risk section in this ADR. The residual-risk text goes to the "Accepted risks" register in SECURITY.md, which the ADR links: anyone with write access can read the release bot's token and push a release tag, and the MANIFEST.json hash does not cover file modes (the unhashed exec bit). These entries are entered in the register by the threat model ADR issue (#143), not by this issue.

ADR rules: status accepted, set on the maintainer's approval of the pull request (docs/adr/ is code-owned, so that approval is a control); one screen; no infrastructure detail.

Also

Add to GLOSSARY.md (under Language, a new group if it fits better):

  • Release pull request: The generated pull request whose merge is a release of the Collection. Avoid: release PR branch, version bump PR
  • Release bot: The account that opens the release pull request and tags the release. Avoid: release token, CI user
Spec: [Release automation](https://git.rkdr.net/Mortis/Kamino/issues/98) (resolution comment). Takes the next free ADR number when the pull request is opened, and renumbers on rebase if another ADR merged first. ## ADR content - **Decision:** a release is cut only when the maintainer approves the CI-generated release pull request and it is merged; the version comes from the fragments. A dedicated release bot account holds the only automated credential that may push `v*` tags; the maintainer keeps tag permission as an override. Publishing is two API calls (create the release with its annotated tag, then upload the tarball) and the publish job converges: each push to `main` does whichever step is missing, so a rerun repairs a failed publish. The annotated tag message carries the sha256 of the release's `MANIFEST.json`, which is the same for every build of one tree. A failed publish is repaired by rebuilding from the tagged commit, and the rebuild must match the tag message. - **Why:** continuous delivery with one human decision (when a set of changes ships); the Gitea Actions job token cannot do it (its pull requests start no workflows, and it cannot be allowlisted for protected tags). A trusted contributor can merge once the required approval is given, so what decides a release is the maintainer's approval as code owner. That holds only if the release pull request always touches a file the maintainer owns (`galaxy.yml` or the changelog): check this against the CODEOWNERS patterns when writing the ADR. - **Alternatives:** fully manual (today); automerged release pull requests; release on every merge; knope or release-please (no tool reads antsibull fragments and opens a release pull request on Gitea). - **Residual risk:** no residual-risk section in this ADR. The residual-risk text goes to the "Accepted risks" register in `SECURITY.md`, which the ADR links: anyone with write access can read the release bot's token and push a release tag, and the `MANIFEST.json` hash does not cover file modes (the unhashed exec bit). These entries are entered in the register by [the threat model ADR issue](https://git.rkdr.net/Mortis/Kamino/issues/143) (#143), not by this issue. ADR rules: status `accepted`, set on the maintainer's approval of the pull request (`docs/adr/` is code-owned, so that approval is a control); one screen; no infrastructure detail. ## Also Add to `GLOSSARY.md` (under Language, a new group if it fits better): - **Release pull request**: The generated pull request whose merge is a release of the Collection. _Avoid_: release PR branch, version bump PR - **Release bot**: The account that opens the release pull request and tags the release. _Avoid_: release token, CI user
Claude added the
Status
Ready for Agent
label 2026-11-15 18:39:40 +00:00
Claude added a new dependency 2026-11-15 22:20:53 +00:00
Claude added this to the Continuous delivery milestone 2026-11-15 22:21:21 +00:00
Author
Owner

Review of the map (2026-11-15): corrections to this issue.

Waiting on another decision: the ADR's decision and residual-risk text on publish recovery and tarball integrity waits on Release path: fragment check, failed publish and tarball integrity.

Review of the map (2026-11-15): corrections to this issue. - **The ADR number can collide.** This issue says "Number it after any ADR already merged", and [docs(adr): record self-built CI and molecule images, versioned by CI, pinned by version and digest](https://git.rkdr.net/Mortis/Kamino/issues/167) says "numbered after the threat-model ADR". Neither blocks the other, so if both are worked at the same time both take 0002. Change: "take the next free number when the pull request is opened, and renumber on rebase if another ADR merged first". Waiting on another decision: the ADR's decision and residual-risk text on publish recovery and tarball integrity waits on [Release path: fragment check, failed publish and tarball integrity](https://git.rkdr.net/Mortis/Kamino/issues/211).
Author
Owner

Review of the map (2026-11-15): one more correction to this issue.

  • The ADR text says "a release is cut only by the maintainer merging the CI-generated release pull request". Under Recommended repository settings and branch protection a trusted contributor is on the merge allowlist and can merge once the required approval is given. What decides a release is the maintainer's approval of the release pull request, as its code owner. Write: "a release is cut only when the maintainer approves the CI-generated release pull request and it is merged".
  • This holds only if the release pull request always touches a file the maintainer owns (galaxy.yml or the changelog). Check that against the CODEOWNERS patterns when writing the ADR; how those patterns end up is open in Code-owner approval against Renovate automerge, and where secrets live.
Review of the map (2026-11-15): one more correction to this issue. - The ADR text says "a release is cut only by the maintainer merging the CI-generated release pull request". Under [Recommended repository settings and branch protection](https://git.rkdr.net/Mortis/Kamino/issues/179) a trusted contributor is on the merge allowlist and can merge once the required approval is given. What decides a release is the maintainer's approval of the release pull request, as its code owner. Write: "a release is cut only when the maintainer approves the CI-generated release pull request and it is merged". - This holds only if the release pull request always touches a file the maintainer owns (`galaxy.yml` or the changelog). Check that against the CODEOWNERS patterns when writing the ADR; how those patterns end up is open in [Code-owner approval against Renovate automerge, and where secrets live](https://git.rkdr.net/Mortis/Kamino/issues/210).
Author
Owner

Correction from Release path: fragment check, failed publish and tarball integrity: publishing is two API calls (create release with its annotated tag, then upload the tarball) and the publish job converges: each push to main does whichever step is missing, so a rerun repairs a failed publish. The tarball-integrity residual risk goes in ADR 0001, not here.

Correction from [Release path: fragment check, failed publish and tarball integrity](https://git.rkdr.net/Mortis/Kamino/issues/211): publishing is two API calls (create release with its annotated tag, then upload the tarball) and the publish job converges: each push to `main` does whichever step is missing, so a rerun repairs a failed publish. The tarball-integrity residual risk goes in ADR 0001, not here.
Author
Owner

From What the tarball checksum in the tag message proves when a publish is repaired (2026-11-20)

Add one sentence to the Decision: the annotated tag message carries the sha256 of the release's MANIFEST.json, which is the same for every build of one tree. A failed publish is repaired by rebuilding from the tagged commit, and the rebuild must match the tag message.

## From [What the tarball checksum in the tag message proves when a publish is repaired](https://git.rkdr.net/Mortis/Kamino/issues/255) (2026-11-20) Add one sentence to the Decision: the annotated tag message carries the sha256 of the release's `MANIFEST.json`, which is the same for every build of one tree. A failed publish is repaired by rebuilding from the tagged commit, and the rebuild must match the tag message.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#177