---
title: Release refs and the workflow guard
description: Keep agents from changing a repository's workflows and from creating, moving or deleting its release tags and branches through Stamp, name the agents that may, see when a release agent used the release-tag exception, and decide which workflows agents run without approval.
llms_section: "Admin"
llms_order: 66
llms_summary: "Read when an owner or admin protects a repository's workflows, their runs or release refs from agents, or when an agent's push is refused WORKFLOW_PATH_RESTRICTED, WORKFLOW_PATH_BEHIND_DEFAULT or RELEASE_REF_RESTRICTED."
llms_full: true
---

# Release refs and the workflow guard

Every agent of a server pushes through the same GitHub App, and that App can change workflows. Without protection, any agent could change a workflow that runs with the repository's secrets, or push a tag that starts a release. Stamp has two opt-in protections per repository. A repository with neither works as before. Which workflows agents may run and rerun without a person's approval is the last section, [Workflows agents run without approval](#workflows-agents-run-without-approval).

Each protection is one rule of the repository, not of a Raft server. If several servers cover a repository, they all see the same rule, and any of them can change it. A change applies on all of them at once. A server that starts covering the repository is held to the rule from then on, and its exemptions without a ref pattern end then (they had no effect before, and do not start to). One that stops covering it loses its exempt list and its exemptions (each ended exemption is recorded), and the rule is never weakened by it: it keeps every pattern and an enforcing mode, and no other server's entry or exemption is widened. The rule stays even when no server covers the repository any more, so a server changing its GitHub App, which stops covering its repositories until they are listed again, never turns a protection off. A server stops covering a repository only when GitHub shows that its installation no longer includes it, or that the installation is gone; a GitHub error or an incomplete listing never ends it.

They are not a substitute for GitHub's own protection. Keeping secrets in GitHub Environments with branch and tag rules is what nothing can get around; these close the paths that go through Stamp.

## The workflow guard

![Repository rules: the workflow guard and release-ref protection](/shots/en/repository-rules.png)

Why a push is guarded, not only a merge: GitHub runs a branch's own workflow files. A workflow changed on any pushed branch runs, as changed, on that branch's `push` and `pull_request` events, with the repository's Actions secrets (all but those an Environment's protection rules keep from that branch). So the change has to be stopped before it reaches GitHub at all, not only before it reaches the default branch.

While it is on, an agent that is not exempt cannot change anything under `.github/workflows/` or `.github/actions/`, on any branch or tag, by `git push` or by `stamp api`. A push is refused with `WORKFLOW_PATH_RESTRICTED` and nothing is received. Stamp checks two things:

- every new commit the push brings must leave those directories unchanged;
- the pushed ref's workflow files must equal the default branch's, or the ref's own previous ones. This stops an agent from pointing a new branch or tag at an older commit whose workflows a person has since changed.

A release is a tag too, and every change to a published release (creating, publishing, editing, unpublishing, deleting) runs the `release` workflows from its tag's commit's own files. So an agent's `stamp release create`, `stamp release edit`, `stamp release delete` or `stamp api` write to `releases` about a release that is published before or after the write is refused `WORKFLOW_PATH_RESTRICTED`, and nothing is sent to GitHub, unless each tag commit involved carries exactly the default branch's workflow files. For an existing tag that is the tag's commit; for a new tag it is `--target`. Leave `--target` out (or name the default branch) to tag the tip of the default branch. Another branch means that branch's tip, and a commit must be named by its full SHA. Stamp then sends the checked commit as the release's target, so the tag GitHub makes is exactly that commit. A draft that stays a draft is checked only when the write names a target, which is then checked and sent the same way. The release's fields must each be sent once, spelt as GitHub spells them, with no space at either end, and the tag named without `refs/tags/`.

An agent may still merge the default branch into its branch after a person changed the workflows there.

Merging is guarded too. An agent's `stamp pr merge`, `stamp pr merge --auto` and `stamp pr queue` of a pull request that changes `.github/workflows/` or `.github/actions/` are refused `WORKFLOW_PATH_RESTRICTED` (whoever wrote the change: a person's branch, another agent's, a fork's), and auto-merge and the merge queue check again when they merge. Until a person approves the content (below), the agent's `stamp pr view` shows `MERGE_APPROVAL_REQUIRED` instead of `READY`, with the request to submit. A person's own view, and an exempt agent's, still shows `READY`.

A branch cut from an older default branch, with commits of its own, is the common case of the second check: its own commits leave the workflows alone, but a person has changed the default branch's workflows since, so the branch would run the older ones. When the branch's workflow files are exactly those of the commit where it left the default branch (its merge base), Stamp refuses the push with `WORKFLOW_PATH_BEHIND_DEFAULT` instead, naming the default branch and the first workflow file that differs. Nothing was received, and no approval is needed or offered: rebase the branch onto the latest default branch (or merge the default branch into it) and push again. Any other mismatch, such as another branch's workflow or one even older than the merge base, any tag, and a push that only points a branch at a commit already on GitHub (a release or hotfix branch on an older commit: a deliberate choice of its workflows) with no new commit of its own, is refused `WORKFLOW_PATH_RESTRICTED` as above.

The second check compares with the default branch as GitHub has it at the time of the push. When Stamp cannot read GitHub's newest commit in time, it compares with the last default branch commit it read. Only when Stamp cannot read the default branch at all is a push refused `WORKFLOW_PATH_RESTRICTED` with "Stamp could not read REPOSITORY's default branch just now": nothing was received and no request is prepared, so push again.

## Protected release refs

You list patterns such as `refs/tags/v*`, `refs/tags/computer-v*` or `refs/heads/release/*`. An agent that is not exempt cannot create, move or delete a ref that matches. A push is refused with `RELEASE_REF_RESTRICTED`, and merging a pull request into a protected branch is refused too. `*` stays within one path segment and `**` crosses segments, as in GitHub Actions' tag filters.

A GitHub release creates its tag when it is published, so releases are held to the same patterns: `stamp release create` (and `stamp api` on `releases`) with a tag that matches is refused `RELEASE_REF_RESTRICTED` before GitHub is asked, whether the release is new, a draft or edited, and an edit that does not name its tag is refused while any tag pattern is protected (publishing a draft creates it). `stamp release edit` always sends the tag. A release that already exists is held to its current tag too, which Stamp reads from GitHub first (nothing is sent if it cannot): editing it (even onto another tag), deleting it, and uploading, replacing, renaming or deleting its assets are refused when its tag is protected. Deleting the tag itself is a push. An exempt agent's release goes through, and the use is recorded like a write through `stamp api`.

## Approve a workflow change

When the workflow guard refuses an agent's push or merge (except `WORKFLOW_PATH_BEHIND_DEFAULT`, which a rebase resolves), Stamp prepares a request for the **content** of the workflow files the change touches: each file's path and its exact content after the change (its git blob), or that the change deletes it. It is sent to no one: only the agent sees it, and the refusal names it with the command that submits it. If a person must approve it now, the agent runs `stamp request submit ID --reason TEXT`; only then does Stamp send the link to the server's owners and admins by Raft DM, with the agent's reason. An agent should not submit a change that is still under review elsewhere or can land another way. An unsubmitted request lapses after a day; the same content refused again, at a push or at a merge, finds the same request.

The request page shows the repository, the push or pull request it came from, each workflow file it covers with the git blob id of its approved content (or that it is deleted), and the diff of those files that Stamp recorded when it prepared the request (against the default branch for a push, the merge base for a pull request; at most 64 KiB, marked when cut). If Stamp could not read the diff, the page says so: read the change on GitHub, or decline. Read the change before you approve: those files run with the repository's secrets. Approve it with "**Allow this workflow content**". You need the same rights as for changing the protection: owner or admin of the agent's server, and admin or maintainer of the repository on GitHub. The agent that asked can never approve it.

What the approval allows: for **7 days**, that agent's pushes and merges in that repository (direct merge, auto-merge and the merge queue) pass the workflow guard whenever their workflow change is exactly the content the approval names. So the agent pushes again, and later merges its pull request, without asking twice; a rebase that keeps that content, or more commits that leave the workflow files alone, need nothing new. Any other content of a workflow file (one more edit) is refused and prepares a new request. One approval must cover the whole change, file for file, and approvals do not add up across pushes either: a push is checked with everything its branch changed in the workflow files since it left the default branch (what its pull request will carry), a merge with its pull request's changes, and that whole set needs one approval. Every other file the approval names must have its approved content where the change takes effect too: at a push in the pushed commit, which the branch's own workflows run, whatever the default branch has (a branch behind the default branch rebases first, which brings that content when the default branch has it); at a merge on the base branch, since a file the pull request does not change lands with the base's copy. So part of an approved set does not pass on its own (Stamp's merge queue checks it again as it builds the pull request's batch, and GitHub's own merge queue does not take such a pull request: see below), and the refusal names the request and the files that are missing. A workflow file whose content is the default branch's needs no approval, so rebasing onto a default branch whose workflows changed needs nothing new. Contents approved in two different requests are refused together and prepare a request for the whole set: nobody was shown that combination. If Stamp cannot read the default branch at a push, the push is refused; each push reads it again, so one made once it can be read is checked as usual. Only the workflow files themselves are guarded: a file they call outside `.github/workflows/` and `.github/actions/` (a script, or a symlink's target) is not. A merge also needs the base branch not to have changed those files since the pull request's branch left it, so what lands is exactly what was approved: otherwise the merge is refused, with no request, until the branch is brought up to date with the base. When the 7 days are over nothing is allowed any more; nothing stays exempt, and each use is recorded on the request. The person who approved it, or an owner or admin of the server, can end it sooner: **Revoke approval** on the request page (or closing the request with `POST /v1/requests/ID/close`), with a reason. From then on no push or merge passes under it.

A merge is checked at exactly the head and base it names (`--head`, `--base`): if the pull request's head is anything else when Stamp reads it, the merge is refused `PR_HEAD_MOVED`, so a branch moved between the check and the merge never lands unchecked content. The base side is read from the base branch's current tip on GitHub. In Stamp's own merge queue, a request queued under an approval is withdrawn if the approval ends before its batch forms, and it is checked against the approval again as its batch is built: if, since it joined the queue, the base branch changed a file of the approval, or a workflow file the pull request changes too (which git would merge into content nobody approved), it fails alone with `batch_workflow_approval_stale`, as a direct merge would be refused; bring the base branch in and queue it again, and the merge is checked again. When only a pull request ahead of it in the batch made the change, it waits for that one's outcome instead. The batch then lands only on the base it was built and tested on. GitHub's own merge queue ("Existing GitHub merge queue") builds its merge group itself, so nothing there could hold a pull request to its approval: Stamp does not queue such a pull request on a branch whose queue is GitHub's (`batch_workflow_content_github_queue`), nor hand one over that was waiting from before. A person merges it on GitHub, or the branch moves to Stamp's own queue. If GitHub's list of the pull request's files names one workflow file twice with two different contents, Stamp cannot tell which would land: the merge is refused `WORKFLOW_PATH_RESTRICTED` (HTTP 403), with no request, and merging again refuses the same way. Push a commit that leaves the file with one content, or a person merges it on GitHub.

It does not replace GitHub's own protection: secrets kept in GitHub Environments with deployment branch rules are still released only to the branches those rules allow, whatever Stamp approved.

A request prepared by an earlier release of Stamp is for one exact push (the ref, the commit it moves from and the one it moves to) and keeps working as it did: the agent pushes that same commit to that ref again, from the same base, within 24 hours of the approval, and it is let through once.

## Allow one release ref change

When protected release refs refuse an agent's push, Stamp prepares a request for exactly that update: the repository, the ref, the commit it moves from and the commit it moves to. It is submitted the same way (`stamp request submit ID --reason TEXT`). The request page shows the ref, both commits and the release pattern it matches; approve it with "**Allow this push once**", with the same rights as above. After approval, the agent pushes the same commit to the same ref again, from the same base. Stamp lets that one push through, within 24 hours of the approval, and the request then reads "Used". Another commit, ref or base is refused again and prepares its own request. Nothing stays exempt. A submitted request waits a day for a decision.

It makes no difference which server turned the protection on, or which server's Stamp ruleset refused the push.

## Who may change them

A person who is an owner or admin of any server covering the repository, and an admin or maintainer of the repository on GitHub. Turning a protection off or changing its mode applies on every server, and a removed pattern is removed on every server. A pattern you add protects the repository at once, from every agent: an exemption covers the patterns it was granted, so an agent already on the exempt list is held to the new pattern too, until it is granted again (`--exempt-agent @HANDLE` again, or take it off the list and add it back on the rules page). Turning a protection off also ends every exemption from it on every server, so turning it on again leaves no one exempt. GitHub's role is what counts: such a person can edit the workflows on GitHub anyway.

The rules page saves only what it showed you. If what it would show of the rule has changed since you opened it (an entry or exemption of a server you are signed in to, or the servers you are signed in to in the same browser), saving is refused as a conflict (`REF_POLICY_VERSION_CONFLICT`), nothing is written, and the page reads the rule again for you to save on it. So a save never removes an entry of a server you were not signed in to when you opened the page.

```
stamp repo guard workflows --enable [--exempt-agent @HANDLE] -R OWNER/REPO
stamp repo guard release-refs --add 'refs/tags/v*' [--exempt-agent @HANDLE] -R OWNER/REPO
stamp repo guard workflows --enable --unexempt-agent AGENT_ID -R OWNER/REPO
stamp repo guard list -R OWNER/REPO
```

## Trying a protection first (evaluate mode)

The workflow guard and protected release refs can run in evaluate mode before you enforce them:

```
stamp repo guard workflows --mode evaluate -R OWNER/REPO
stamp repo guard release-refs --add 'refs/tags/v*' --mode evaluate -R OWNER/REPO
stamp repo guard log -R OWNER/REPO
```

In evaluate mode the protection checks every push exactly as it would when enforced, but refuses nothing and asks for no approval. Each push it would have refused is recorded, with the agent, the ref and the first workflow file or the tag pattern it matched, and `stamp repo guard log` shows them (to owners and admins of the server, for 30 days). A push by an agent of another server covering the repository shows there as "an agent of another server", without its name, id or server. Its record's `id` (in the API and `--json`) is then a stand-in that does not reveal who pushed; it stays the same from one read to the next, but may change over time. The rules page names the agent, and shows the record's own id, only while you are signed in to that server too in the same browser. If the check itself fails, the push goes through and the log says so. Switch to enforcing with `--mode enforce`. Turning a protection to evaluate mode loosens it, so it takes the same person as any other change. The mode belongs to the repository's rule, so it applies on every server. When servers differ, with one enforcing and another evaluating, a write that makes the rule enforce everywhere empties the evaluating server's exempt list: nothing on that list had taken effect, and that server sets it again if it still wants it. Trying a rule in evaluate mode and going back keeps every list.

The same protections can be written as Stamp rulesets (`stamp ruleset`). A ruleset is the repository's too: an owner or admin of any server covering the repository, who is also an admin or maintainer of it on GitHub, can change or delete it. Its bypass actors are agents of the server that created it, and only that server changes them. An admin agent may only tighten a ruleset, never loosen or delete one.

## The exemption list

A rule has one exempt list, not one per server. Each entry is a server and an agent id, usually a server's release agent, and an agent is exempt when an entry names both its server and its id: the same id on another server is another agent.

- **See it.** Each server sees its own part of the list: its entries, each with its server. Another server's part is shown only where you hold that server too: the rules page lists the entries of the servers you are signed in to in the same browser, and only counts the others ("1 other server you aren't signed in to also holds it"), never naming them. `stamp repo guard list` and the API (`GET /v1/server/repository-ref-policies`) show your server's part alone, whoever asks, an agent or a person, and one line counting the other servers that share the rule (`otherServers` in the API). Nothing else of theirs is named or counted there: an entry or exemption one of them adds, removes or lets expire is not shown. The rule's time and version are the rule's, though, so such a change can still move them. The rule itself, its mode and patterns, is shown on every covering server, whichever server holds it: it binds every server's agents.
- **Change it.** An owner or admin of any covering server who holds the GitHub role can add or remove an entry of their own server, by its handle or id. On the rules page they can also add or remove an entry of another server they are signed in to in the same browser; an agent is added only on a server that covers the repository. You can remove an entry whatever became of its agent: name it by its id (`--unexempt-agent AGENT_ID` for your own server's), or by its server and id on the rules page, or `{"server": "...", "agent": "..."}` in `exemptAgents`, `addExemptAgents`, `removeExemptAgents` or `exempt_agents`. A plain handle or id always means your own server. `stamp repo guard`, the API and an admin-ops `policy` step hold no other server: a write never names another server's entries (`exemptAgents` replaces your server's part alone, and `--exempt-server` takes only your own server), and an entry naming another server, by its id or slug, a server Stamp does not know, or a plain id or handle that is not an agent of your server (a typo, or an agent that has not signed in to Stamp yet), is refused with `REF_POLICY_EXEMPT_SERVER_NOT_HELD`, the same words whatever it names; a handle written `@handle` that no agent of your server has is `WORKFLOW_DISPATCH_AGENT_UNKNOWN`. The rules page does the same for the servers you are not signed in to. What belongs to the rule still applies on every covering server, whoever writes it: its mode, its patterns, and clearing it (which clears it on every server and revokes every exemption from it). And when servers differ in mode, one enforcing and one evaluating, a write that leaves the rule enforcing empties the evaluating server's list and ends that server's agents' exemptions that have no ref pattern (see evaluate mode above). Stamp reports each entry added (or granted again) as a loosening and each entry removed as a tightening, and leaves an audit record on every server the write changes. Every server covering the repository also keeps an audit record of each exemption another server grants, freezes or ends: what it covers and until when, never its agent or its server. That record names each of the server's agents added or removed. It names you, as that server knows you, only when you are signed in to that server in the same browser; otherwise it says the change came from another server. That server's rules page and Settings › Access name who last changed its part of the rule, and who ended an exemption there, the same way.
- **What an entry covers.** An entry covers the patterns the rule had when it was granted, and only those the rule still has: a pattern removed from the rule leaves every entry too, and a pattern added later covers no entry until it is granted again (`--exempt-agent` naming an agent already on the list, `addExemptAgents` on the API, or taking it off the list and adding it back on the rules page), which Stamp reports as a loosening. Keeping an entry on the list, as a save of the rules page does, grants it nothing new. An older entry may cover only some of the rule's patterns. `stamp repo guard list` prints what an entry covers when that is not all of the rule, and the API names it as `only_patterns` (`onlyPatterns` on `/v1`). No write of another server, and no write of the mode alone, widens an entry.
- **Limits.** At most 32 entries per server. An entry of a server in evaluate mode exempts no one from the rule where another server enforces it.

## Exemptions that end

An agent can also be exempt through an exemption of its own, instead of being on the list. Each one is for exactly one agent, one repository and one protection (the workflow guard or the release refs), optionally only for refs that match a pattern such as `refs/tags/v*`, and it lasts a set time or until it is revoked. It is never server-wide, and it only covers your own server's agent. One with a ref pattern covers the refs it names; one without covers the rule's patterns when it was granted, as an entry does (a pattern added later holds its agent; `stamp repo guard list` and the API's `patterns` show what it covers), and needs your server to cover the repository while that protection is on.

- **See them.** Settings › Access lists every exemption of the server, active, expired and revoked, with who granted it and from which request, and when it ends. `stamp repo guard list` prints them with their ids, and the API (`GET /v1/server/repository-ref-policies`) returns them as `exemptions`. Another server's temporary exemptions on a repository your server covers are neither listed nor counted there; the rules page lists them for the servers you are signed in to in the same browser.
- **Revoke one.** An owner or admin of the server, or the person who granted it, revokes it from Settings › Access or with `stamp repo guard revoke-exemption ID`. The agent's next push is guarded again, and so is its next merge. A pull request the agent already put in Stamp's merge queue on the strength of the exemption is taken out of the queue before its batch forms, and the agent is told why. An agent can never revoke one.
- **Every use is recorded.** A push that the protection would have refused, let through because of an exemption, records the exemption on its receipt: `stamp receipt get RECEIPT` names the exemption, who granted it and the workflow files the push changed (or the release pattern it matched), and `--json` carries the same as `refPolicyExemptions`. The push's acceptance line says so too. A push that changes nothing protected records nothing. A merge, or a write through `stamp api`, let through because of an exemption is recorded in Stamp's logs and audit trail, with the exemption it used.
- **Other servers.** If another server in Stamp, of your organization or another, protects the same repository, `stamp repo guard` (its `log` included), the API and admin-ops name none of its agents, exemptions or who granted them, nor the server itself: they only count the servers that share the rule, and show a push of such a server's agent as one by an agent of another server. The rules page names them only for a server you are signed in to in the same browser.

An agent named on a protection's list is exempt as before. While both the list and an exemption name the same agent, revoking the exemption does not guard the agent until its name is also taken off the list. Taking it off the list also ends an exemption with no ref pattern, which came from that entry; one with a ref pattern stays until it ends or is revoked. Settings › Access stays per server: it lists the exemptions of your own server.

## Release tags on a commit already on the default branch

A release agent often tags a commit that was already released as a candidate, for example `computer-v1.0.60` on the commit of the published rc. If a person changed the workflows on the default branch since, the workflow guard would refuse the tag, because the tagged commit's workflows are older than the default branch's.

Stamp lets that push through when all of these hold:

- the push **creates** a tag (`refs/tags/...`);
- the tagged commit (an annotated tag counts as its commit) is already on the default branch as GitHub has it at the time of the push;
- the repository's release-refs rule protects this tag, and your own server exempts the agent for it. Being exempt on `computer-v*` does not cover a `server-v*` tag.

The push still brings no workflow change of its own, and every other check applies. Each use is recorded on the push's receipt: `stamp receipt get RECEIPT` shows the tag, its commit, the rule, the agent and server, and the workflow files that differ from the default branch (`--json` carries the same as `refPolicyException`). The push's acceptance line says so too.

Moving or deleting a tag, pushing the same commit to a branch, and tagging a commit that is not on the default branch are decided exactly as before.

## Workflows agents run without approval

Agents run workflows too: `stamp workflow run` (a `workflow_dispatch` run) and `stamp run rerun`. An agent that may write a repository (its server's GitHub App covers it, and the repository's agent access lets the agent use it) runs and reruns its workflows as a GitHub user with write access can, with no approval, on every server. It starts a run, and reruns a run no pull request or merge queue started, as the server's App, or as a person through that person's act-as grant when the grant allows workflow runs (GitHub then checks that person's own permission); on a repository the App does not cover, or does not let the agent use, such a run through an act-as grant still needs an approved workflow grant. A rerun of an open pull request's or the merge queue's run follows the pull request's identity, as any pull request write does. Protect deploys with GitHub environments (required reviewers), or with a Stamp rule with `approval: required` (below). The [workflow guard](#the-workflow-guard) still keeps agents from changing the workflows themselves.

**Require approval** of one workflow: the agents' runs of it then need an approved workflow grant (`stamp request workflow`, or the request a refused run prepares), as every run did before. It is part of the workflow's dispatch rule, like its ref allowlist, and the repository's: whichever server sets it, it binds every server's agents. Grants approved before keep working for it. An owner or admin of a covering server who is an admin or maintainer of the repository on GitHub sets it, or with one tap from the review list in Stamp's settings:

```
stamp workflow refs approval .github/workflows/deploy.yml required [--exempt-agent @HANDLE]... [--approver @HANDLE]... -R OWNER/REPO
stamp workflow refs approval .github/workflows/deploy.yml required --no-approvers -R OWNER/REPO
stamp workflow refs approval .github/workflows/deploy.yml none -R OWNER/REPO
stamp workflow refs list -R OWNER/REPO
```

`--exempt-agent` lists the agents of your server that skip it (a release agent, say); removing the approval (`none`) is a loosening, done by the same person, and clears it on every server, with its approvers.

**Who approves.** A request for a run of a workflow that needs approval is approved by an owner or admin of the agent's server, a person or an agent alike: an agent counts when Raft gives it the owner or admin role on that server at the moment it approves. `--approver` names more approvers for this one workflow: people or agents of your server (repeatable, replacing your server's list; `--no-approvers` names none). Whoever can set the rule can also see and change its approvers on the web, in Settings › Workflows, on the **Workflows that need approval** card; other members of the server see the list there but can't change it. A CLI agent (`stamp agent login`) is a person's software on no Raft server and is never named: name its person, or a Raft agent. A named approver approves your server's agents' requests for this workflow, for this run or for the workflow on any ref, never another workflow and never a request for the whole repository (`stamp request workflow`), and only while it is on your server (for an agent, as Raft says at the moment it approves). A name stays on the rule until someone who writes the rule removes it: a principal who leaves the server approves nothing while gone, and approves again if Raft adds them back. Naming an approver loosens the rule and removing one tightens it; both take the same person as the rule itself, each name is recorded in the audit with who named or removed it, and an agent never names one. Nobody approves a request they filed, a person or an agent; a person approving a request of their own agent is two principals, as before. An agent reads what it would approve, every input of the run, with `stamp request get ID`, and approves or declines with `stamp request approve ID --reason TEXT` or `stamp request decline ID --reason TEXT`, with the same choices a person has on the request page (how far, how long); Stamp tells each approver of a new request, people on Raft as before and agents through their Stamp notices right after the request is sent, and the request page says who approved it and whether that was an agent. Whoever approved, the run itself still goes through your server's GitHub App, the ref allowlist, the workflow guard and the run budget.

**Undoing an approval.** A workflow grant is revoked by whoever approved it, a person or an agent, and by an owner or admin of the server, a person or an agent whose Raft role there is owner or admin: `stamp workflow disallow OWNER/REPO --agent @HANDLE` (an agent that is neither revokes only the grants it gave), or Revoke on the request page. An agent's `stamp workflow disallow` asks Raft for its role first, so while Raft does not answer it is refused (`503 GRANT_REVOKER_ROLE_UNREAD`), even for the grants it gave; `POST /v1/grants/{id}/revoke` still revokes a grant the agent gave, with no Raft read.

A workflow GitHub runs with no file in the repository (a Pages deploy, Copilot, CodeQL) is named exactly as GitHub reports it, for example `dynamic/pages/pages-build-deployment` (`stamp workflow list -R OWNER/REPO` shows the paths). Its runs could be rerun only with a grant before; now they are open like any other workflow's, so require approval for it if they should not be.

Approval protects that workflow's own runs, nothing that runs it. A reusable workflow (`on: workflow_call`) runs inside the workflow that calls it, and a `workflow_run` workflow runs after the workflow it follows: protecting the callee or the follower does not stop an agent from starting an unprotected caller, or the workflow whose run triggers it. Protect the caller, and every workflow whose run triggers a protected one, as well.

**Which to protect.** `stamp workflow open-review [-R OWNER/REPO]` (and the review list in Stamp's settings) lists the workflows of a server's repositories that use a secret other than `GITHUB_TOKEN` (`secrets.NAME` anywhere in the file, `secrets: inherit`) or an `environment:`, and have neither a ref allowlist nor approval required. It reads each repository's default branch with the server's App and lists what it could not read, with why. One read answers everyone on the server for ten minutes (it says when it was made); an owner or admin can read it again sooner from Stamp's settings. It changes nothing, and it does not follow a reusable workflow or a `workflow_run` trigger to the workflow that starts it.

What holds whatever a server allows:

- the workflow's **ref allowlist** (`stamp workflow refs set`): it is started only on a ref the list allows, and rerun only when the run is of an allowed ref's current tip;
- the **run budget**: each agent starts or reruns at most 30 runs an hour in one repository (`429 WORKFLOW_RUN_BUDGET`), a guard against a loop;
- a pull request's or the merge queue's run is rerun freely, as before;
- **GitHub's own protection**: a deploy job in a GitHub Environment with required reviewers and deployment branch rules waits for those reviewers whoever started it.

An owner or admin may keep a whole server on the old rule, where every such run needs a workflow grant, in the server's settings (`grant`), and set it back to `open`; an agent never can.
