The gate refuses a tag delete, local and remote #231

Closed
opened 2026-11-26 05:14:45 +00:00 by neptunus · 1 comment
Member

Purpose (defect): Martha's gate refuses a tag delete, local and on the remote, so a member cannot unpublish a release.

DECIDED 2026-11-26 by Raf, ticking "Tag delete, local and remote" on the gap rows of #45 c5603 (relayed by Mars).

Refs #45 (c5603, rows 4, 8, 9, 12 and 13)

Today

At main a10a6e98, git tag is not among the commands the guard reads (guard_workspace/guard_workspace.ts:154). A push delete is refused only when it removes another member's branch or the default branch. These all passed:

  • tag -d v1.0.0
  • tag --delete v1.0.0
  • push origin --delete v1.0.0
  • push origin :refs/tags/v1.0.0

Threat model

  • Asset: release tags. A release is a tag that CI builds, pushes and signs (DECIDED 2026-11-24, "release = tag → CI"), and the fleet pins tags.
  • Actor: a crew member acting by mistake. This is not an attacker: the gate is a speed bump, and forge tag protection stays the boundary.
  • Harm:
    • A remote tag delete removes a release that a fleet pin or a changelog names.
    • A local tag delete followed by push --tags with a new tag of the same name moves a release.
  • Out of scope:
    • fetch --prune-tags, which drops local copies of tags the remote already removed. It is left alone, because refusing it in the clone's hook would fail every such fetch.
    • A delete the gate cannot see: a script, the API, or a ! alias.

Rule

  • Local: git tag -d|--delete <name>… and git update-ref -d refs/tags/<name> are refused.

  • Remote: a push delete is refused when it deletes:

    • refs/tags/<name>, written out in full or as tag <name>
    • or a bare name the guard cannot tell is a branch.

    A bare name counts as a branch only when it is <member>/… or the clone's default branch. Anything else may be a tag, so the refusal says to write refs/heads/<name> for a branch. That changes one thing allowed today: deleting an unowned branch by its bare name now needs refs/heads/.

Done when

  1. tag -d v1, tag --delete v1 v2 and update-ref -d refs/tags/v1 are refused.
  2. push origin --delete v1, push origin :refs/tags/v1, push origin --delete tag v1 and push origin +:refs/tags/v1 are refused.
  3. push origin --delete neptunus/1 and push origin --delete refs/heads/feature/x pass, and so do tag v2, tag -l and tag -f v1 (which moves a tag, not a delete).
  4. A test goes red when either refusal is mutated out.
Purpose (defect): Martha's gate refuses a tag delete, local and on the remote, so a member cannot unpublish a release. DECIDED 2026-11-26 by Raf, ticking "Tag delete, local and remote" on the gap rows of #45 c5603 (relayed by Mars). Refs #45 (c5603, rows 4, 8, 9, 12 and 13) ## Today At main `a10a6e98`, `git tag` is not among the commands the guard reads (`guard_workspace/guard_workspace.ts:154`). A push delete is refused only when it removes another member's branch or the default branch. These all passed: - `tag -d v1.0.0` - `tag --delete v1.0.0` - `push origin --delete v1.0.0` - `push origin :refs/tags/v1.0.0` ## Threat model - **Asset:** release tags. A release is a tag that CI builds, pushes and signs (DECIDED 2026-11-24, "release = tag → CI"), and the fleet pins tags. - **Actor:** a crew member acting by mistake. This is not an attacker: the gate is a speed bump, and forge tag protection stays the boundary. - **Harm:** - A remote tag delete removes a release that a fleet pin or a changelog names. - A local tag delete followed by `push --tags` with a new tag of the same name moves a release. - **Out of scope:** - `fetch --prune-tags`, which drops local copies of tags the remote already removed. It is left alone, because refusing it in the clone's hook would fail every such fetch. - A delete the gate cannot see: a script, the API, or a `!` alias. ## Rule - **Local:** `git tag -d|--delete <name>…` and `git update-ref -d refs/tags/<name>` are refused. - **Remote:** a push delete is refused when it deletes: - `refs/tags/<name>`, written out in full or as `tag <name>` - or a bare name the guard cannot tell is a branch. A bare name counts as a branch only when it is `<member>/…` or the clone's default branch. Anything else may be a tag, so the refusal says to write `refs/heads/<name>` for a branch. That changes one thing allowed today: deleting an unowned branch by its bare name now needs `refs/heads/`. ## Done when 1. `tag -d v1`, `tag --delete v1 v2` and `update-ref -d refs/tags/v1` are refused. 2. `push origin --delete v1`, `push origin :refs/tags/v1`, `push origin --delete tag v1` and `push origin +:refs/tags/v1` are refused. 3. `push origin --delete neptunus/1` and `push origin --delete refs/heads/feature/x` pass, and so do `tag v2`, `tag -l` and `tag -f v1` (which moves a tag, not a delete). 4. A test goes red when either refusal is mutated out.
Author
Member

Done-when check against main ecb6f372 (landed-but-open sweep, 2026-12-01; closed under the Supervisor ruling of 2026-12-01, which Raf approved). Every commit cited is an ancestor of main (git merge-base --is-ancestor).

  • L1-L3: met, PR 234 (70176464), guard_workspace.node-test.ts lines 298-314.
  • L4 (mutant part): not re-run. Covered by the r2 PASS on 66300788..b451b4cf (Mars, crew ledger).

Every code line is met. The line the tree cannot show was covered by the review PASS that landed it. Closing.

Done-when check against main `ecb6f372` (landed-but-open sweep, 2026-12-01; closed under the Supervisor ruling of 2026-12-01, which Raf approved). Every commit cited is an ancestor of main (`git merge-base --is-ancestor`). - L1-L3: met, PR 234 (`70176464`), `guard_workspace.node-test.ts` lines 298-314. - L4 (mutant part): not re-run. Covered by the r2 PASS on `66300788..b451b4cf` (Mars, crew ledger). Every code line is met. The line the tree cannot show was covered by the review PASS that landed it. Closing.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
martha-ai/martha#231
No description provided.