feat(delivery): decide how agent release-tag pushes are gated #237

Open
opened 2026-11-27 21:19:45 +00:00 by Claude · 0 comments
Owner

Problem

ADR-0033 says release tags are pushed only on the maintainer's explicit yes. Only instructions enforce that.

The delivery guard (plugins/delivery/.apm/hooks/guard.py, the git() rule around lines 1720-1781) has no push handling. An agent can run git push origin <plugin>-v…, git push --tags or git push --follow-tags and nothing mechanical stops it. A pushed tag is shared state that consumers and apm outdated pick up immediately, and deleting it does not undo a consumer that already resolved it.

ADR-0032 (docs/adr/0032-credentials-not-hooks-are-the-agent-safety-boundary.md) puts the safety boundary in credentials, not hooks. Adding a guard deny would cut against that ADR, so the question is which mechanism fits.

Proposal

Decide which of these holds the "explicit yes" for tag pushes, and record the choice:

  • Credential scope: consistent with ADR-0032. For example, the agent's push credential can't create refs/tags/* (Gitea protected tags with an allowlist that excludes the agent identity), and the maintainer pushes, or approves through a separate credential.
  • Guard deny: guard.py denies git push with refs/tags/* refspecs, tag-shaped refspecs, --tags, or --follow-tags for agents. This is defence in depth, but it is a hook-held boundary, which ADR-0032 says is not the safety boundary.
  • Both, with ADR-0032 or ADR-0033 amended to say why tags are an exception.

Acceptance criteria

  • A decision on the mechanism, with its reasoning against ADR-0032, is recorded (ADR amendment or new ADR).
  • The chosen mechanism is in place, and an agent-identity tag push is shown to be refused.
  • ADR-0033's "how it is held" text matches the mechanism.

Notes

  • Follow-up from #223 / PR #234; ADR-0033 (docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md).

Assisted-by: Claude Code

## Problem ADR-0033 says release tags are pushed only on the maintainer's explicit yes. Only instructions enforce that. The delivery guard (`plugins/delivery/.apm/hooks/guard.py`, the `git()` rule around lines 1720-1781) has no `push` handling. An agent can run `git push origin <plugin>-v…`, `git push --tags` or `git push --follow-tags` and nothing mechanical stops it. A pushed tag is shared state that consumers and `apm outdated` pick up immediately, and deleting it does not undo a consumer that already resolved it. ADR-0032 (`docs/adr/0032-credentials-not-hooks-are-the-agent-safety-boundary.md`) puts the safety boundary in credentials, not hooks. Adding a guard deny would cut against that ADR, so the question is which mechanism fits. ## Proposal Decide which of these holds the "explicit yes" for tag pushes, and record the choice: - **Credential scope:** consistent with ADR-0032. For example, the agent's push credential can't create `refs/tags/*` (Gitea protected tags with an allowlist that excludes the agent identity), and the maintainer pushes, or approves through a separate credential. - **Guard deny:** `guard.py` denies `git push` with `refs/tags/*` refspecs, tag-shaped refspecs, `--tags`, or `--follow-tags` for agents. This is defence in depth, but it is a hook-held boundary, which ADR-0032 says is not the safety boundary. - **Both**, with ADR-0032 or ADR-0033 amended to say why tags are an exception. ## Acceptance criteria - [ ] A decision on the mechanism, with its reasoning against ADR-0032, is recorded (ADR amendment or new ADR). - [ ] The chosen mechanism is in place, and an agent-identity tag push is shown to be refused. - [ ] ADR-0033's "how it is held" text matches the mechanism. ## Notes - Follow-up from #223 / PR #234; ADR-0033 (`docs/adr/0033-plugin-releases-are-tagged-plugin-v-version.md`). Assisted-by: Claude Code
Claude added the Kind/Security
Priority
Medium
3
Status/Needs Triage
labels 2026-11-27 21:19:45 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mortis/Holocron#237