docs(adr): let the agent push release tags on explicit approval

Why: the maintainer decided the agent pushes release tags itself. A
pushed tag is an immutable release (an irreversible publish), so each
push still needs the maintainer's explicit yes in the conversation; the
approval, not who types the command, is the control.

Implementation Notes:
- ADR-0033 Decision: after --apply the agent shows the exact tags and
  the printed push line, and on an explicit yes runs exactly that
  `git push origin <tag>...` (never --tags, never other refs). The
  maintainer-only and free Propose-tier variants are recorded as
  rejected options.
- ADR-0033: --apply requires origin/main's first-parent history, and a
  tag on a later landing of its version is an error.
- AGENTS.md, README.md and gates.md state the same rule; exit 2 still
  means stop and report, never hand-fix, move or delete a tag.

Refs: #223
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNugst7K9Bd2FTR4Mi
This commit is contained in:
Defame1297andClaude Opus 5.5 committed 2026-11-27 18:35:12 +00:00
1 parent 03bacd6e5a
commit 0a52c8597d
4 files changed
+34 -19

No files matched your search

@@ -37,8 +37,9 @@ Two facts limit where enforcement can live:
contiguous run carrying that version. That is the merge or squash commit where the version first
landed on `main`, never a feature-branch commit. An `apm.yml` edit that leaves `version:` alone
does not start a new run.
- **Immutability.** Tags are never moved, overwritten or silently re-cut. A tag that is lightweight
or that peels to no landing of its version is reported as an error for a human to resolve. Every
- **Immutability.** Tags are never moved, overwritten or silently re-cut. A tag that is lightweight,
that peels to no landing of its version, or that peels to a later landing than the version's
first is reported as an error for a human to resolve. Every
reachable `<plugin>-v*` tag is checked this way, not only those of the wanted runs, and an
invalid one never decides where the wanted runs start, so it cannot hide the versions before it.
- **A version is released once, at its first landing.** When a version comes back (a reverted
@@ -50,9 +51,10 @@ Two facts limit where enforcement can live:
history and cuts the tags after merge. Without arguments it is a dry run: it prints a
`plugin version commit status` table and exits 1 if any tag is missing. `--apply` creates the
missing tags locally, and only when no error exists anywhere (all or nothing) and the commit read
is on `origin/main`; it never falls back to the local `main`. It then prints the
exact `git push origin <tag>…` line, naming each tag explicitly and never using `--tags`. The
script never fetches and never pushes. No hook gates any of this.
is on `origin/main`'s first-parent history; a commit of a merged feature branch is an ancestor of
`origin/main` but not on that line, so it is refused. It never falls back to the local `main`. It
then prints the exact `git push origin <tag>…` line, naming each tag explicitly and never using
`--tags`. The script never fetches and never pushes. No hook gates any of this.
- **Which versions are wanted.** If a plugin already has a valid `<plugin>-v*` tag reachable from
`main`, the script wants every version run from the newest such tag onward, including a reverted
version's run, which then reports `RELEASED` as above. If it has none, the script wants every run
@@ -67,13 +69,15 @@ Two facts limit where enforcement can live:
`scripts/tag-plugin-releases.sh --ref 32fbe39fb8923854ca8e743a0d2cad81720c736c --plugin git --apply`,
which tags git alone; without `--plugin git` that `--ref` would tag every plugin's version at
that commit. After it, the "from the newest tag onward" rule covers git like every other plugin.
- **Pushing a release tag is a maintainer-only action. It is not a Propose-tier push under
ADR-0032.** ADR-0032's Propose tier ("branch, commit, push, open a PR, comment") covers pushes
that propose a change for review: a human still approves the change before it merges. A tag push
has no review step behind it. It publishes a release that consumers pin, and because tags are
immutable it cannot be quietly taken back. An agent may run the dry run, and may run `--apply`
locally once a version bump has merged. It then shows the maintainer the push command the
script printed and waits; the push itself is always the maintainer's.
- **The agent pushes release tags, each push gated on the maintainer's explicit approval. It is
not a free Propose-tier push under ADR-0032.** ADR-0032's Propose tier ("branch, commit, push,
open a PR, comment") covers pushes that propose a change for review: a human still approves the
change before it merges. A tag push has no review step behind it. It publishes a release that
consumers pin, and because tags are immutable it cannot be quietly taken back: it is an
irreversible publish. So after `--apply`, the agent shows the maintainer the exact tags and the
push command the script printed and asks for approval in the conversation. On an explicit yes it
runs exactly that `git push origin <tag>…` itself: the named tags only, never `--tags`, never
any other ref. Without an explicit yes in the current conversation it does not push.
- **Agents cut release tags only with the script.** Cutting one by hand or with Gitea's
`create_tag` (consequence 4) is a maintainer path.
- **Wiring elsewhere:**
@@ -113,13 +117,22 @@ person pushing usually cannot act on, is noise people learn to ignore.
skill, used by consumers with their own tagging schemes. This is holocron's release policy, and it
belongs in holocron's own docs and script.
**The maintainer pushes release tags by hand (rejected).** An earlier draft of this ADR made the
tag push maintainer-only. The control that matters is the maintainer's explicit approval of the
exact tags, not who types the command, and an agent running exactly the approved line keeps that
control while removing a manual step.
**The agent pushes release tags as a free Propose-tier push (rejected).** A tag push publishes an
immutable release with no review behind it, so it cannot share the Propose tier's no-approval
rule; each push needs the maintainer's explicit yes.
**A review-held checklist item alone (rejected).** Review happens before merge, but the tag can
only be cut after merge, once the target commit exists on `main`. A checklist in review cannot
check something that does not exist yet.
## Consequences
**1. An untagged window is accepted.** Between a merge and the maintainer's next tagging run, the
**1. An untagged window is accepted.** Between a merge and the next approved tagging run, the
new version has no tag. Consumers' pins lag behind, but nothing breaks. Lateness also heals itself:
targets are computed from history rather than taken from the checkout, so a run made days later
cuts the same tags on the same commits.
@@ -146,6 +159,6 @@ rewrites it. **It is untested.**
`git cat-file -t <tag>` reports `tag` after fetching. That confirms it is annotated; the script
reports a lightweight tag as an error.
**5. Enforcement is by convention for now.** Nothing fails when a maintainer forgets to tag. A
**5. Enforcement is by convention for now.** Nothing fails when a merged version goes untagged. A
`post-merge:` assertion that the verify stage checks on version-bump PRs is the natural next step
and is left as future work.