Review and merge
Agents open the pull requests. You review them in Stamp, approve, and merge only what passed.
Note
To approve or merge in Stamp you need your GitHub account connected (Settings → "Connect GitHub", see Set up your team). Your approvals and merges are made on GitHub under your own name. A review you submit on GitHub itself needs no connection: see Reviewing without connecting.
Where pull requests show up
The top bar has Needs you (the home page), Pull requests, Approvals, Repositories, Agents and Insights.
Needs you lists what waits on you: pull requests whose review is requested from you, approval requests, your own pull requests that need you, idle agent pull requests, and items an agent handed back. "Show" switches between "Waiting on you", "Handed off" and "All"; "Group by" groups by reason, by repository or not at all; "Kind" and "Repository" narrow the list, and the arrows button flips the order. From a row you can mark it read or done, stop its notifications, or hand it to an agent (next section). Select several rows and choose Close N PRs to close the selected open and draft pull requests at once with your own GitHub account, optionally with a reason posted first as your comment on each; other selected items are skipped, and a pull request that could not be closed stays selected with the reason.


Pull requests lists the pull requests agents opened through Stamp, grouped by your review relationship:
- "Needs your review"
- "Waiting for reviewers"
- "Approved"
- "Changes requested"
- "Drafts"
- "Merging & recently merged"
- "Closed & other"
- "Status unavailable"
Filter by section or repository, or search. A search finds pull requests by the words in their title, description, comments and reviews, or head branch, as the search box at the top does: a word finds a name by its parts too (fill-page finds the branch edgar/riffle-fill-page, server-v0.1 finds server-v0.1.506), and the last word you type also finds the longer words it starts (serv finds server). A number (1234 or #1234) finds that pull request; the list keeps its order, newest first, so older matches come as you scroll. Each row shows the title, repository and number, its labels, the verdict and who moves next, checks and approvals, lines added and removed, when you last read it and when it was updated, and your part in it ("Yours", "Review requested", "You reviewed").
You can also filter by label, as on GitHub: the pull requests carrying any of the labels you pick, or those with no label, or both. Labels differ per repository: with one repository picked, its pull requests' labels are listed with how many carry each, and how many carry none. Stamp keeps a pull request's labels as GitHub reports them (a label added or removed shows within moments); a pull request Stamp has not read since it started keeping labels shows none: no label filter lists it and the label counts leave it out, until it changes on GitHub or is read again.
A row shows what Stamp read of its pull request only once Stamp has confirmed that your own GitHub account can read the repository, as the pull request page does. The page checks this for you when it loads, with one request to GitHub per repository (at most 20 each time the page loads) made with your account, and Stamp remembers each answer for five minutes. Until it is confirmed, and for a repository your GitHub account cannot read, the row shows only its repository, number and who opened it. It is in no section and no state, and a search finds it by its number but never by anything Stamp read of it (its title, description or comments); the page confirms the repositories a search could not look in, then searches again.
The search box at the top (Search Stamp) follows the same rule: it finds pull requests and comments only in repositories Stamp has confirmed your own GitHub account can read. When you open it, Stamp confirms your servers' repositories in the background with your account and runs the search again. Until then, and for a repository your GitHub account cannot read, none of its pull requests or comments is found, not even by its number; the repository itself is still found by its name. In the results, what matched a pull request is highlighted: the words of its title or, when its title did not match, a line under it showing the head branch, the commit, or the part of its description or of a comment that matched. When you search for a version or a branch name (server-v0.1., v0.1.506, edgar/riffle-fill-page), the pull requests whose title or head branch holds it come first, newest first, and those that only mention it in their description or comments come after them.
Each repository page also has a "Pull requests" tab and an "Issues" tab. Both lists can be narrowed by state, by who opened a row (an agent or a person), by which agent and by label (any of the labels you pick, or no label), over the whole list, not only the rows already loaded; each lists the repository's labels with how many rows carry each, and how many carry none. The Issues tab's search runs GitHub's issue search of that repository with your own GitHub account, in GitHub's search syntax (for example crash label:bug), newest update first; it cannot look in another repository, so repo:, org:, user: and owner: are refused, and so are OR, AND, NOT and parentheses. GitHub allows each account about 30 searches a minute; past that the page says when to search again. An issue counts as an agent's only when an agent opened it through Stamp (stamp issue create) after Stamp started recording that; issues opened on GitHub, by a person, or before then count as opened by a person.
On stamp.build, you can also replace github.com with github.stamp.build in a GitHub repository, pull request, issue, or file/tree link (for example, https://github.stamp.build/<owner>/<repo>/pull/123) to redirect to that page in Stamp.
Hand an item to an agent


In Needs you, a pull request that waits on you can be handed to an agent instead: select it (or several) and choose Hand to agent.


- Which agents. The agents of every server you are signed in to in this browser, whatever server the item is on, ranked for the item's repository: first by how many pull requests they opened through Stamp there merged in the last 30 days, then by how recently they did something there through Stamp. The first one that can take it is recommended, unless you handed this repository's items to another agent before. An agent that cannot take it is listed last with why: its server's GitHub App does not cover the repository, or the repository allows named agents only and it is not one of them.
- Any of your servers. You can hand an item to an agent of any server you are signed in to in this browser, not only the one you are on now. A hand-off uses no GitHub access, so it never asks you to sign in again.
- What the agent gets. One notification on its own server, sent as you on that server: "you handed you this: "your note"" and the pull request's link. Your note is plain text, at most 500 characters. When the agent is on another server than the item, only the link and your note are sent, nothing else of the item.
- Your list. The item leaves "Waiting on you" and its counts, and is listed under Handed off while it is with the agent, with the newest thing its pull request did since (closed, merged, a comment, a push), as Stamp stored it. Once the pull request closes or merges, whoever did it, the item is handled; it stays under Handed off for 7 days after that, then the hand-off ends and the item leaves. If the pull request is reopened before then, it is with the agent again; reopened later, it is back on your list.
- Take back. Take an item back from Handed off at any time, from any of your servers. It is on your list again, and the agent gets a short notice that it no longer waits on it.
- Handed back. The agent can give it back with a question (
stamp pr hand-back, Agent pull requests). It is back on your list, unread, with the agent's question. If you are no longer a member of the agent's server, or of the server you handed it from, its hand-back does not reach you: it only ends the hand-off, and the item is back on your list as it was.


Hand new ones automatically: rules
When every item you hand is an idle agent pull request (an agent's pull request that has gone quiet, listed for a server's owners and admins), the hand-off can also add a rule: Hand new ones like these to the recommended agent, or to the agent you picked. A rule covers one repository, on the server the items are on, and only idle agent pull requests; you get one rule for each repository you handed. A new rule for a repository replaces your old one there.
- When it applies. When a new idle agent pull request of that repository appears in your list, the rule hands it at once, as if you had: the same notification, but saying your rule handed it, with no note. It shows under Handed off marked "by a rule". "The recommended agent" is decided each time, ranked as above among the agents of that server.
- When it does not. Your rule hands nothing, and never to anyone else, unless all of these still hold: you are signed in to that server in a browser (a CLI sign-in does not count; Stamp keeps a browser sign-in for a while, so if it has ended, sign in again) as an owner or admin, with nothing left to do there first (the terms, connecting GitHub, the server's GitHub App); for an agent on another server, the same holds for you there and you are still a member; the agent is still there and can take the repository; the pull request is still open; and it is not already with an agent from any server you are signed in to. (When the same pull request becomes idle on two of your servers at the same moment, both rules can hand it; this is rare and accepted.)
- Taken back. Once an item a rule handed is taken back (or the agent hands it back), none of your rules hands that pull request again while Stamp keeps that record: at least 30 days after it ended, until your next hand-off on that server after that.
- Several people. Rules are per person. If several owners or admins have a rule for the repository, each one's rule hands the same pull request for that person: its agent gets one notification per person (and per agent, when the rules name different agents).
- Managing rules. While you have a rule, the page says so, with how many items your rules handed to which agent today (the UTC day). Open Rules there to see each rule, the agent it hands to (for the recommended agent, who that is now), who added it and how many it handed today, and to remove one. Removing a rule leaves what it handed with its agents.


The pull request page


The page has four tabs:
- "Conversation": description and comments on the left, pull request state on the right ("Status", "Checks", reviewers).
- "Commits": the commits on the branch.
- "Checks": every check on the current head, which ones are required, and each job's log.
- "Files": the diff.
The status line


Under the title, one line states whether the pull request can merge now and why, matching what the agent sees:
| The line says | In plain words |
|---|---|
| needs an approval at this head: its author agent's with review evidence (…), or another reviewer's | Nobody has approved the current code yet. The line names who can approve this pull request (see Who can approve). |
| approvals are for another head or base | Earlier approvals belong to an older commit. Approve again. |
| required checks still running | CI has not finished. |
| waiting for CI to start: … | A required check has no run yet. For 10 minutes after a push, or after the pull request is opened or reopened, Stamp waits for CI to start. A check that reports only after a review, such as stamp/approval or atlantis/apply, is not waited for here: until someone approves, the line says the pull request needs an approval. |
| … required checks did not run (…) | No run started in that time. For checks GitHub Actions runs, close and reopen the pull request to start them: GitHub may have lost the event that starts CI. Approvals stay; set auto-merge again if you had set it. If no run starts a few minutes later, push a new commit (the new head may need approving again). A check another App reports, such as atlantis/apply, is only named: reopening does not start it. A pass from a run started by hand (workflow_dispatch) does not count, as on GitHub. |
| a required check failed | CI failed. Open Checks to see which job failed. |
| conflicts with the base | The branch conflicts with the target branch; the agent must resolve it. |
| behind the base | The target branch moved ahead. Choose "Update branch" to bring in new commits. |
| changes requested | A reviewer asked for changes. |
| GitHub is not letting this merge yet | A GitHub branch rule is still blocking the merge. The line lists any reported reasons alongside "See why on GitHub". |
| approved; lands through the merge queue | Approved; merges through the merge queue rather than directly. |
| can land now | Ready to merge. |
| already merged | Merged. |
The line also shows "Approved by" with each approver and the exact head and base commits evaluated.
What the page tells you first
The browser API's answer for the page (GET /api/web/github/OWNER/REPO/pull/N and its live read) carries a status block beside the verdict, for the top of the page. Everything in it is drawn from what Stamp already stored; it adds no GitHub read.
- What it waits on, and on whom. Each thing that keeps the pull request from landing (a failing, running or never-run required check, a missing or stale approval, requested changes, a code owner, a conflict, being behind, a draft, a base pull request it is stacked on, a GitHub block, or a question an agent handed back to you), in the order someone has to move: you, the author or the agent you handed it to, CI, another pull request, or nobody. Each lists only the buttons you can use now, decided by the same checks as the page's own buttons: approve, request changes or review, rerun the failed checks, update the branch, mark ready, or hand it to an agent from Needs you and take it back. A failing check says when it failed and, when an agent approved this head itself, whether it passed at that approval.
- What changed since you last looked. The page tells Stamp which head you are looking at while it is open (at most once a minute). When you come back after more than 30 minutes away, it compares against what you saw last time: the pushes made through Stamp since then and by whom (with a link to just the new changes when they add to what you saw, none when the branch was rewritten or moved outside Stamp), the head's CI then and now with the checks that newly fail, new comments (with replies in threads you wrote in and mentions of you), and approvals, reviews and hand-offs since. Refreshing or switching tabs in the middle of a review keeps the same comparison. The first time you open a pull request there is nothing to compare. Each new comment is marked new in the conversation, by the same rule as the count.
- Whether an agent's own approval holds up. When the author agent approved this head itself with review evidence, Stamp compares what the evidence says passed with the head's checks as Stamp read them: consistent; a mismatch (a check the evidence says passed is failing, still running or missing); out of date (a check failed after the approval, or the approval was carried from an earlier head); or unreadable (Stamp cannot read this head's checks or the evidence, or the approval was recorded on a server where you cannot read it, in which case nothing of its evidence is shown). It also shows who reviewed, the findings and how they were resolved, the reverse check, and a link to the evidence.
Mentions in what agents write
An agent's @mention notifies only people of its own Stamp server. In the descriptions, comments, issues and reviews an agent writes through Stamp, @handle of a server member becomes `@raft:handle` (@their-github-login) (the login when they connected GitHub in Stamp), a member's GitHub login stays as written, and any other @name becomes `@name`, which GitHub shows as text and does not notify. Code is left as written, in Markdown and in HTML alike. An agent that does mean a GitHub account or team writes @github:name.
Mention an agent in a comment
To ask an agent to look at something, mention it as @raft:handle in a comment. In a comment box on a pull request or issue page (a comment, a reply, a review and its line comments, an edit, the description and the close reason), type @ and pick the agent: the list holds the agents of every Stamp server you are signed in to in this browser, never people or GitHub accounts.
A pick inserts @raft:handle. It inserts @raft:handle@server (the server's slug, or its id, as in --as @handle@server) when the agent is on another server than the page's, or when agents on two of your servers share the handle; only then does the list show the server. You can type that form yourself too.
The list greys out an agent the comment would not reach, with why, and does not insert it:
- its server's GitHub App does not cover this repository (the agent could not read it);
- the repository's agent access leaves it out (on the repository's Settings › Agent access, when the server limits which agents use it);
- you have not connected the GitHub account you comment with on that agent's server, so that server cannot tell the comment is yours.
What reaches GitHub: when you post through Stamp, only your @raft:handle and @raft:handle@server tokens are rewritten, to a code span (`@raft:handle`) as an agent's are, so GitHub never notifies an account named "raft". Your other @name mentions are left as you wrote them: unlike an agent, a person mentions GitHub accounts on purpose.
On github.com itself, write the mention in backticks, `@raft:handle`: GitHub reads a bare @raft:handle as a mention of the GitHub user "raft" and notifies that account. The code span still reaches the agent.
Who is told: the agent gets a notification (in Raft, or in its Stamp inbox and webhook for a CLI agent) naming who mentioned it, the pull request or issue, an excerpt and a link to the comment. The agent is told only when:
- the comment is on a repository the agent's server's GitHub App covers;
handleis one agent of that server (a person's handle is never notified), and, for@raft:handle@server, that server is the one named;- the comment's author is a person of that server (their GitHub account connected in Stamp) or one of the server's agents writing through Stamp. A comment from anyone else, on a public repository for example, wakes no agent. An edit counts only when the comment's author made it: editing someone else's comment (ticking a task box in it, say) never notifies;
- it is not the agent's own comment, and the agent may use the repository (when the server limits which agents use it, an agent that is not allowed is not told).
When you post through Stamp, the agents of the servers you are signed in to in this browser are told right away, once GitHub has taken the comment; agents of any other server that covers the repository are told when GitHub reports the comment to Stamp, a little later. A comment written on github.com is told that way too. Either way an agent hears of one comment once: editing the comment, or adding the mention later, does not notify it again. The agent reads the comment from GitHub, so it is there when it looks.
A mention in a pull request's description is told only when you save the description through Stamp, and only to agents of the servers you are signed in to in this browser: GitHub does not report descriptions to Stamp the way it reports comments, so no other server learns of it. Each agent is told once per pull request, and only of mentions the edit added. A mention in a code tour comment notifies no one: tour comments stay in Stamp.
A code span holding exactly `@raft:handle` (or `@raft:handle@server`) counts; mentions in quoted text, code blocks, HTML (an HTML comment included), links and web addresses do not.
A bare @raft:handle is read by every Stamp server that covers the repository: each notifies its own agent with that handle, under the same rules, so when agents on two covering servers share the handle, both are told. Name the server, @raft:handle@server, to tell only one.
Approve
Who can approve
A pull request merges only with an approval on its exact current head commit, from either:
- one of its author agents, carrying review evidence (
stamp pr approve --evidence-file), when the repository allows self-approval (on by default). Its author agents are the agent that opened it through Stamp and every agent that pushed to its branch through Stamp, however many agents pushed: each of them whose push reached GitHub and is a commit of this pull request may self-approve it with evidence, and none of them can approve it without; - another reviewer: a person's approval on GitHub, or the approval of an agent that neither opened it nor pushed to it, recorded by Stamp.
An agent that wrote a commit of the pull request cannot approve it either: Stamp refuses the approval (SELF_APPROVAL_NOT_ALLOWED) when the agent's commit email is the author or committer email of any commit at the head, even if another agent opened or pushed it, and such an approval never counts toward a merge. An agent's commit emails are the address it bound and its default @agents.stamp.build address, compared case-insensitively; GitHub's noreply addresses are not matched. An author agent (the one that opened it, or any agent that pushed to it through Stamp) still self-approves with review evidence as before. A pull request opened or pushed on GitHub rather than through Stamp has no such author agent: Stamp cannot record a commit email as its author, so an agent that wrote its commits cannot self-approve it, even with evidence; another agent or a person approves it, and next time the agent pushes through Stamp and opens it with stamp pr create.
The status line states which approvals this pull request accepts. Every new push requires a fresh approval. So does moving the pull request onto another base: an agent's approval counts only on the base it was given on, or on a later commit of that base, unless the change at the new base is identical line for line, in which case Stamp carries the approval over and says so.
An agent's approval also counts only while the agent is on the Raft server it approved from. Once Stamp hears from Raft that the agent was deleted, taken off Stamp's agent list there, or removed from the server, every approval it gave before that stops counting (one it gave just after, within 5 minutes, does not count either), and stamp/approval is decided again on the pull requests it had approved. If the agent is let back, it approves again, and that approval counts. A CLI agent's approvals (stamp agent login) stop counting the same way once the person running it is removed from the server (Raft reports some role changes, such as becoming a guest, as a removal too); once the person is back, a CLI agent they sign in again approves again.
The Approve button
"Approve" is in the button row under the status line:
- Records your approval on GitHub under your name for the exact head shown on the page.
- Refuses if new commits arrived since you loaded the page; reload and review the new head.
- Applies only to that head; a later push requires a new approval.
Approving on GitHub instead
An approval doesn't have to start in Stamp. A review you submit on github.com, or with gh pr review --approve on your own computer, counts the same way when it is on the current head, whether or not you connected GitHub to Stamp, because Stamp reads the pull request's reviews from GitHub with its App. It also sets stamp/approval on that head. Your GitHub credentials stay with you; only the Approve and Merge buttons in Stamp need your GitHub account connected. Stamp counts a review only from a reviewer with write access to the repository, as GitHub does for a branch rule. Code owners are the exception: an owner's approval counts only if they have connected GitHub in Stamp.
Reviewing without connecting
You can review without ever connecting GitHub to Stamp, so that Stamp holds no token of yours: review on github.com or with gh pr review, and merge there or leave it to auto-merge.
With write, maintain or admin access to the repository, your approval of the current head counts for:
- the status line,
stamp pr merge, auto-merge and the merge queue; - the
stamp/approvalstatus; - GitHub's own branch rules, such as a required number of approvals or GitHub's
CODEOWNERS.
It does not count:
- as an owner's approval in
.stamp/CODEOWNERS: Stamp matches owners through their connection; - on any other head: a new push needs a new approval;
- on your own pull request.
Read-only roles (read and triage) never count, connected or not: their approval approves nothing, and their request for changes blocks nothing.
Reviewing file by file
In "Files changed":
- Tick "Viewed" on a file to fold it. Marks are stored in your browser and reset if the file changes again.
- Comment on any line: "Comment" posts immediately; "Add to review" batches it with your pending review comments.
- Choose "Finish review", pick "Comment", "Approve", or "Request changes", then "Submit review". "Approve" counts the same as the top button; "Request changes" blocks merging until resolved.
Merge
Pick a method and choose "Merge":
- "Squash and merge"
- "Create a merge commit"
- "Rebase and merge"
The button highlights when the status line says "can land now". If pressed earlier, GitHub reports why it cannot merge yet (for example, "Not mergeable yet: required checks are still running"). If the repository disallows the selected method, pick another and merge again.
Merges run on GitHub under your account at the exact head shown on the page.
Auto-merge
Agents (usually the author agent) set auto-merge from the CLI rather than this page.
When active, a line under the status line shows who set it and what it is waiting on. Auto-merge follows new pushes and merges automatically once required checks pass and the current head is approved (see Who can approve). Once auto-merge is on, clicking "Approve" is all you need to do.


Key rules:
- Each new push requires a new approval before merging.
- Auto-merge expires after 14 days; the agent must re-enable it if needed.
- Auto-merge ends when the agent that set it leaves the Raft server (deleted, taken off Stamp's agent list, or removed), or, for a CLI agent, when the person running it is removed from the server (Raft reports some role changes, such as becoming a guest, as a removal too). Stamp cancels it and leaves one comment on the pull request; the pull request stays open, and an agent still on the server can set auto-merge again.
- By default, only the author agent can set auto-merge. Repositories can also allow an approving agent to set it under Settings → "Reviews" → "Auto-merge" ("Let an agent that approved a pull request set it to merge automatically", off by default).
Self-approval with review evidence
By default, the agent that opened a pull request, and every agent that pushed to its branch through Stamp, may approve it itself if the approval includes structured review evidence. Several agents working on one pull request do not block each other: each may self-approve, and one self-approval of the current head is enough. An agent of another Raft server that pushed through its own server's Stamp self-approves there, not on yours.
This is the default path for an agent: it reviews its own change and self-approves it with the evidence (stamp pr create --evidence-file does it when opening the pull request). Another reviewer is needed only when Stamp refuses the self-approval, which then names who may approve, or when a code owner rule applies.
On the pull request page:
- A status note indicates whether the author agent may self-approve the current head.
- In "Approved by", self-approval appears as "Self-approved · with review evidence" with a "Review evidence" link.
- An approval recorded on another Raft server (a trusted server or a member of your federation) shows its "Review evidence" link too, when you are a member of that server, are signed in to it in this browser, and may read the repository there (its GitHub App covers the repository and your GitHub can read it). Otherwise it shows no link, and opening its evidence address answers "not found", the same as for an approval that does not exist.


The evidence shows the reviewer (the author agent itself, a subagent, another agent or a person), target head and base, "Findings" and resolutions, passing "Checks", "Reverse verification" (which test failed when a safeguard was reverted), "Other gates", and the full "Report". Earlier evidence, including approvals marked "no longer counts", appears under "Review evidence history".


Like any approval, self-approval applies only to that exact head commit.
Turning it off or limiting it
On the repository page, open Settings → "Reviews" → "Self-approval":
- "Allow self-approval with review evidence": turn off to require another reviewer's approval.
- "Excluded paths": one pattern per line. Pull requests touching matching paths cannot be self-approved.
- "Allowed agents": "Every agent on this server (default)" or "Only the agents I choose".
Only server owners and admins can view or change these settings. To set them once for every repository of a GitHub account, and to see where a repository's value comes from, see Review defaults.
The stamp/approval status
Stamp publishes approvals as the stamp/approval commit status on the pull request's head: success once a non-author approval of that exact head counts, whether an agent's recorded by Stamp or a person's GitHub review, connected or not. Before that, a head an agent approved or unapproved, or one already showing the status, is pending, and any other head has no status: a person's review that does not approve it writes none. A branch rule requiring stamp/approval is met by the success alone. Another GitHub App that merges only when every check passes (GitHub's mergeable state "clean") never merges while that status is pending.
If GitHub's rate limit stops Stamp from writing the status, the approval still stands and nobody needs to approve again: Stamp writes the status for the pull request's head once the limit resets, checking again at most every few minutes to an hour for up to three hours after the approval. After that, the next push, review or approval of the pull request writes it.
To stop it for one repository, open Settings → "Reviews" → "stamp/approval status" and turn on "Don't post the stamp/approval status on this repository's pull requests":
- Stamp still records approvals, and Stamp's own merges (
stamp pr merge, auto-merge, the merge queue) still require them; only the GitHub status stops. - GitHub no longer shows a
stamp/approvalcheck on the repository's pull requests, so apps that need every check to pass can merge.stamp/codeownersis not affected. - When you turn it on, each open pull request whose head shows
stamp/approvalpending gets one final success, "Not required", since GitHub cannot delete a status. Up to 100 open pull requests are settled per change; saving "off" again settles any still pending. - Turning it back off has Stamp decide the open pull requests' heads that show a
stamp/approvalagain, and new heads get the status as before. - While a branch rule (a ruleset or classic branch protection) of the default branch requires
stamp/approval, turning posting off is refused for people and agents alike (APPROVAL_STATUS_REQUIRED_BY_RULE): it would mark unapproved pull requests as passing a merge gate a person set. Remove thestamp/approvalrequirement from the branch rule first. If Stamp cannot read the branch rules, turning it off is refused too (APPROVAL_STATUS_RULES_UNREADABLE), including when the branch is protected and the server's GitHub App cannot see its classic protection (an App without the administration: read permission; a branch protected only by rulesets, which GitHub reports as having no classic protection, is not refused for that); turning it back on is always allowed. The page shows a warning while such a rule exists. - With several Stamp servers covering one repository, each server's switch only covers its own pull requests: turning it off settles a pending head only when every open pull request at that head is that server's, and leaves the others pending (
skippedin the answer). In the same way, a person's review writes the firststamp/approvalof a head only when every open pull request at that head is one server's, and never while that server's switch is off. A pull request opened on GitHub in such a repository (no Stamp opened it) is decided by a covering server whose switch is on: the first, in Stamp's order, on which an agent's approval of the head stands (see Code owners).
Who can change it: a server owner or admin, or an agent with the server's admin role. Every change is in the page's history with who made it, and when an agent changes it, Stamp sends a direct message to the server's owners and admins naming the agent, the repository and the effect.
From the command line:
stamp repo settings -R OWNER/REPO # read (add --json for the API's answer)
stamp repo settings -R OWNER/REPO --approval-status off # stop posting stamp/approval
stamp repo settings -R OWNER/REPO --approval-status on # post it againThe API is GET and PUT /v1/repositories/OWNER/REPO/approval-status with {"post": true|false}; the answer carries requiredByBranchRule (null when it could not be read) and a warning while it is true. A refused {"post": false} is 409 APPROVAL_STATUS_REQUIRED_BY_RULE or 503 APPROVAL_STATUS_RULES_UNREADABLE, and changes nothing.
Hold merges while the base is red
A repository can hold direct merges into a branch while that branch's own CI is failing, so agents stop piling new merges onto a broken base. It is off by default and set per base branch.
When it is on for a branch:
- The branch counts as red when the latest completed post-merge run of one of the named workflows on it failed (
failureortimed_out). These are the post-merge runs Stamp records for the branch (push, schedule andworkflow_dispatchruns, the same runs the repository page's post-merge status shows, see Post-merge CI); a run that was cancelled or skipped is passed over for the newest one before it that finished. A rerun is a later attempt of the same run, so rerunning the failed jobs and having them pass lifts the hold with no fix merged. stamp pr merge, "Merge" on the pull request page andPUT /v1/repositories/OWNER/REPO/pulls/N/mergeare refused with409 MERGE_HELD_BASE_RED. The refusal names the red run (its URL), the jobs that failed, and what to do: fix the branch, wait for someone's fix, rerun the failed jobs (stamp run rerun RUN_ID -R OWNER/REPO --failed), or mark the pull request as the fix. The answer also carriesrunUrl,failedJobs,branch,labelandrerunas fields.- Auto-merge is not cancelled: it waits (
MERGE_HELD_BASE_RED), tells the agent that set it once, with the red run, and merges once the branch is green again or the label is added, with no new event on the pull request needed. When Stamp records a passing run of a held workflow on the branch right after a failed one, it checks the waiting auto-merges of the repository again within about half a minute; while the hold lasts, a held auto-merge is also looked at again every few minutes for up to an hour, and after that by the auto-merge sweep.stamp pr viewshows such an auto-merge as waiting onMERGE_HELD_BASE_RED(orMERGE_HOLD_UNAVAILABLEwhen Stamp could not read the hold) with what to do next, not as waiting onREADY. - A cap (
--max-hold 30m, from 1 minute to 168 hours; none unless set) limits how long one red episode holds merges. The episode starts with the first failing run of a held workflow after its last passing one (failures of the setting's workflows that overlap are one episode; its start is the earliest of their completions), as the runs Stamp recorded show it. When the cap passes by those runs, Stamp checks GitHub's own list of the workflows' runs over the episode before it releases anything: a passing run it had not recorded means the branch turned green in between, so the episode started later and the release moves with it. Once the cap has passed and GitHub's runs confirm it, the hold no longer holds: merges go through until the branch turns green and a new red episode starts (--merge-hold showsaysreleased). Until that check is done, merges stay held (releaseConfirming); if it cannot read GitHub, or GitHub's list misses a run Stamp recorded, it tries again later and keeps holding. Each later run recorded while the branch stays red is checked the same way (merges wait the few seconds that takes): a passing run Stamp missed before it starts a new episode, held to its own cap. If the release can never be confirmed (GitHub never lists the runs Stamp recorded), the hold keeps holding: an owner or admin releases the branch by turning its hold off (--merge-hold BRANCH --off), and setting it again starts over. While it holds, the refusal, the auto-merge notice,stamp pr viewandstamp pr merge --auto --statussay when the hold releases and how long is left (the refusal'sreleaseAt,remainingSecondsandheldSincefields), and held auto-merges are checked again at the release. The release compares Stamp's clock with the completion times GitHub gives the runs, so a clock difference between the two moves it by as much. - Who is told when the branch turns red. Stamp uses what its post-merge check found: the newly failing checks and the pull request it names for the failure (only when it names exactly one: several candidates, or commits pushed without a pull request, name none). That pull request is only suspected at first: Stamp asks GitHub once to re-run the red run's failed jobs on the same commit, with the server's GitHub App (which needs the Actions write permission; when someone already re-ran the run, that later attempt counts and Stamp asks nothing). The rerun is a new attempt of the held workflow's own run: GitHub re-runs the failed jobs and the jobs that need them, under the workflow's own concurrency settings, so it may wait for another run of the branch, and one cancelled there attributes nothing. A held workflow should therefore only test: a job in it that deploys would run again with the rerun. The pull request's author is told, an agent with a Raft event and a person in their Stamp inbox, and so is the setting's on-call (
--on-call @handle: one agent or person of the server), once per red episode: the notices give the run and its failing jobs and say the pull request is suspected and being re-run to confirm, never that it broke the branch. If the rerun is still red, the pull request is attributed, and its author and the on-call are told so. If it passes, the failure counts as flaky and nothing is attributed. - At the cap, if the branch is still red and one pull request is attributed (one the post-merge check named alone counts only once its rerun was still red when the cap passed), Stamp opens a revert pull request of it with the server's GitHub App (GitHub's own revert, titled
Revert "…"), labelled with the setting's label so the hold never holds it. Stamp does not merge it: the pull request's author and the on-call are told with its link and decide. Stamp opens one revert per red episode, however often the cap is checked, and never a second revert of the same pull request. If someone already has an open revert of it (GitHub's revert title or branch), Stamp opens none: the notice links that one and who opened it, and Stamp neither labels it nor reads its changes, so check it is the revert before merging it. If GitHub's answer to Stamp's revert was lost and more than one pull request from that revert branch was then opened as Stamp's App, Stamp adopts none and opens no other: the notice names them, and the on-call keeps the revert and closes the rest. A pull request that landed through Stamp's merge queue shows on GitHub as closed, not merged, and GitHub cannot revert it: the notice says so, and the revert is yours to open (git revertof what it landed, labelled). When the revert cannot be opened (GitHub refuses it, for example on a merge conflict, or the pull request cannot be reverted), Stamp also comments on that pull request, once per red episode, that it needs a manual revert and why (or, when an earlier attempt's answer was lost, that a revert Stamp opened may exist and should be looked for first), and the notice to its author and the on-call links that comment when it could post it. If no single pull request was named, Stamp opens nothing and tells the on-call only; the hold is released all the same. Stamp also opens no revert when the run the post-merge check named the pull request for did not stay red (a pull request the probe named keeps its revert here): a rerun of that run, or a later run of the same workflow, passed, and the branch is red only because a later run failed (a rerun of an earlier commit's run can pass after a later commit's run failed; the branch never turned green, so the episode and its cap go on). That pull request is not what keeps the branch red, so only the on-call is told, with what is red now (each red workflow's latest run and its failed jobs; the notice does not name that pull request), and--merge-hold showand the log sayfirstRunPassed; that is also how a rerun of the named pull request's failed jobs that passed ends. Nor does Stamp open a revert, whoever named the pull request (the post-merge check or the probe), when every job that failed in the episode's first red run passed in the newest run of that workflow on the branch Stamp recorded since (a later run, or a rerun): it was fixed forward. Only the on-call is told, with the run that passed those jobs and what is red now (each red workflow's latest run and its failed jobs); the earlier notices keep naming the pull request, and--merge-hold showand the log showfailedJobsPassedIn(that run). A job that was cancelled, skipped or not run in that run does not count as passed, and a run Stamp has not recorded is not read: then the revert opens as before. Nor does Stamp open a revert when that rerun had not concluded when the cap passed (one that turns red later opens none either), or when GitHub refused it (the App lacks the Actions write permission on the repository, or the run is too old to re-run): only the on-call is told, with why.--merge-hold showand the log show the rerun (rerun:asked,runAttempt, andconclusion:pending,refused, or the attempt's conclusion such asfailureorsuccess). Stamp records the revert as a pull request opened through Stamp by the agent that opened the reverted one through Stamp: it shows in that agent's stale pull request digest,.stamp/routing.ymldoes not route it, and that agent's own approval does not count on it. When no agent did, the revert is not recorded as opened through Stamp, so the on-call's approval counts on it. - A pull request still merges if it carries the fix label (
fix-redunless the setting names another; any letter case) or is a GitHub revert (its title starts withRevert ", as GitHub writes it; arevert-branch name alone is not enough). Such a merge is recorded. It is checked against the first completed run of the workflow that was red on a commit that contains the merge (the merge commit, or a later commit of the branch); a run of an older commit that was still in flight when it merged does not count. If that run is still red, the agent that opened the pull request and the agent that merged it are told, so a label put on something that did not fix the branch is seen. One no such run checks within 14 days is marked unsettled. The setting's answer lists these merges and how they ended; they are kept 90 days. - A named workflow is watched whether or not it runs on pull requests: Stamp records the runs of every workflow a hold names, so a build or deploy workflow that runs only on push holds merges from its first failing run after it is named. Such a workflow is recorded only while a hold names it: name it again after taking it out, and the hold reads the last run recorded before until it runs again. If no run of the named workflows has been recorded for the branch (nothing finished yet), the state is unknown and merges are not held: the hold acts only on a failure it has seen.
- The merge queue is not affected: it already holds a batch while its target's own CI is red, and while it does, a pull request with this rule's label (or a revert) is tested first in its own batch (see Merge queue).
With several Stamp servers covering one repository, each server's setting holds merges from every server into that branch, and each is judged on its own: a pull request needs the label of every setting that is red (the refusal names them), and the merge is listed to every server whose hold it went through. A server whose GitHub App no longer covers the repository holds nothing; its owner or admin can still read and turn off its setting, and its settings are deleted when it uninstalls.
From the command line (only a person who is an owner or admin of the server can change it; anyone on the server can read it):
stamp repo settings -R OWNER/REPO --merge-hold show # every held branch and its state now
stamp repo settings -R OWNER/REPO --merge-hold main --workflows Test # hold merges into main while Test is red
stamp repo settings -R OWNER/REPO --merge-hold main --workflows Test,Lint --label hotfix
stamp repo settings -R OWNER/REPO --merge-hold main --workflows Test --max-hold 30m --on-call @ana
stamp repo settings -R OWNER/REPO --merge-hold main --off # stop holding main--workflows takes the workflow names as runs show them (the workflow's name:). The API is GET and PUT /v1/repositories/OWNER/REPO/merge-hold with {"branch": "main", "workflows": ["Test"], "label": "fix-red"}; "workflows": [] turns the branch's hold off. Setting a hold also makes its label exist on the repository: Stamp creates it with the server's GitHub App when it is not there, and the answer's label ({name, exists, created, problem?, error?}; one line of stamp repo settings) says whether it was created, was already there, or is not known to be there, with problem: read_failed (Stamp could not check; nothing was created), create_refused (GitHub refused the creation) or create_unknown (GitHub's answer does not show whether it was created). The hold is saved in every case; a person then checks the labels on GitHub and creates it if it is missing. . and .. are not label names. The same label is created when someone first adds it with stamp pr edit --add-label and the repository does not have it yet; Stamp creates no other label. An agent's PUT is refused with 403 MERGE_HOLD_PERSON_REQUIRED, since the hold holds agents' merges. An agent asks an owner or admin for the change instead, as a merge_hold step of stamp request admin-ops (admin ops); approving it applies the same change, label included, and keeps the cap and the on-call as they are.
"maxHold": "30m" and "onCall": "@handle" are optional. A PUT replaces the branch's setting, so a field left out is its default (the label fix-red, no cap, nobody on call): when the setting it replaces had a cap or an on-call it leaves out, the answer's dropped names them ({maxHold, onCall}) and stamp repo settings prints a warning: line with the flag that keeps each. An on-call handle that no agent or person of the server signed in to Stamp with is 404 MERGE_HOLD_ON_CALL_UNKNOWN, one two of them share 409 MERGE_HOLD_ON_CALL_AMBIGUOUS, and a cap outside 1m to 168h is 400 MERGE_HOLD_INVALID; nothing is saved. The answer's hold carries maxHold, onCall ({kind, id, handle, active}; active false once they are no longer a member of the server, when they are told nothing), and while the branch is red baseline.heldSince, episodeRunUrl, releaseAt, remainingSeconds, releaseConfirming (the release is due and waits for the check of GitHub's runs), attributedPull (the pull request named for the episode) and revert ({state, number, url, error}: claimed, opened (Stamp's), found (someone else's open revert), or failed with GitHub's refusal or why it cannot be reverted, then revert it by hand).
When several merges could have broken it: the probe
When the post-merge check names several pull requests for a red episode, it blames none, so the cap opens no revert. A hold can name a probe: a workflow of the repository that re-runs only the newly failing test shards or jobs on one commit. Stamp then runs it on every commit of the branch since it last passed, and blames the pull request whose commit is the first red one once a second run agrees.
stamp repo settings -R OWNER/REPO --merge-hold staging --probe-workflow test-probe.yml --probe-job unit-server,commit-policy # set the probe, keep the rest of the hold
stamp repo settings -R OWNER/REPO --merge-hold staging --probe-off # clear itThe setting.
--probe-workflow(a workflow file under.github/workflows/) and--probe-job(the test workflow's jobs to re-run, comma-separated: a matrix job, whose jobs are namedJOB (N), or a plain job, namedJOB; Stamp keeps the list trimmed, each job once) go together. Alone, they change only the probe and keep the hold's workflows, label, cap and on-call; with--workflowsthey are part of the hold the command replaces, so leaving them out there drops the probe (the command warns).--merge-hold showprints it. There is no probe unless an owner or admin sets one. The API is the samePUTwith"probeWorkflow"and"probeJob", or{"branch": "staging", "probeOff": true}; an agent asks with amerge_holdstep'sprobe_workflowandprobe_job(orprobe_off: true), and a step that leaves them out keeps the hold's probe. The probe workflow is never one of the hold's own workflows: Stamp keeps a probe workflow's dispatched runs from the post-merge check, so the hold would stop reading that workflow. Stamp refuses it (MERGE_HOLD_PROBE_IS_HELD) by its name, and by its path with the repository's workflow list from GitHub (MERGE_HOLD_PROBE_UNCHECKEDwhen that list cannot be read: nothing changed, send it again).The probe workflow's contract. Stamp dispatches it on the held branch with the inputs
sha(the commit, 40 lowercase hex characters),probe_id(Stamp's own, letters, digits and-, at most 40 characters),JOB_shardsfor the matrix job whose shards it re-runs (the job name with-written_, such asunit_server_shards: the shard numbers, sorted and comma-separated, such as3,5; not sent when it re-runs no shard), and, only when it runs a plain job,jobs: every job of that run, matrix and plain, comma-separated in the setting's order (unit-server,commit-policy, orcommit-policyalone). To probe plain jobs the workflow must declare ajobsinput; a probe of shards alone never sends one, so a workflow without it keeps working (GitHub refuses an input the workflow does not declare). Its run must be titled exactlyprobe PROBE_ID SHA [SHARDS](itsrun-name:;[]when it re-runs no shard): Stamp finds the run by that title, and checks it on the run GitHub's answer names. A jobprobe resolveruns first; when it fails (a bad input, or a shard or job that commit does not have), that commit's probe is unusable, never red. Then one job per shard, namedprobe JOB (N)(probe unit-server (3)), and one per plain job, namedprobe JOB(probe commit-policy). Every job's name starts withprobebecause GitHub attaches a dispatched run's checks to the newest commit of the branch it ran on, where a job named as the test workflow's own (unit-server (3)) would stand as that check's newest result; Stamp also leaves a probe run's checks out of every check it reads on that commit (the pull request from the held branch, its auto-merge). Only the jobs' conclusions, and the tests their failure annotations name, count, never how long they took.When it runs. When the post-merge check that turns the branch red names two or more candidates (a pull request among them), no new failure is labelled possibly flaky, every newly failing job passed in the run before and is a
JOB (N)shard of a listed job or a listed job itself (the shards of one matrix job a probe; a summary job runs no tests and is left out when a listed job or a shard of one newly failed in the same run: a job not listed whose name either ends in-gate, such asunit-server-gate, or isNAMEwhile a listed job is namedNAME-..., such asunit-fastwithunit-fast-weblisted; red on its own, it is still not probed), there are at most 4 such shards (a plain job counts as one), and the branch's own first-parent line from the last passing run's commit to the red one holds at most 6 commits. Stamp probes every one of them, the red one (the control) last, so a commit no candidate merged (a direct push, or a sync from another branch) is probed too. A new failure labelled possibly flaky (it failed in one of the runs before too) is never probed: one run per commit cannot place it. One probe per red episode, however many servers watch the branch. Otherwise Stamp records why there is none (skipped, with the reason), and tells the on-call why when the check named several candidates.How it decides. A commit is red when one of its shards or plain jobs failed or timed out: when the red run named the tests that newly failed in that shard, only a failure whose annotations name one of them counts (a shard that failed on other tests, or names none, is unusable); else, and always for a plain job, the job's conclusion decides. It is green when all passed, and unusable when
probe resolvefailed, a shard's or plain job's job is missing, cancelled or skipped, no run carries its title (or two do), or Stamp could not read it. Stamp reads a run when GitHub says it finished, else 15 minutes after its dispatch and every 5 minutes after; a run with no result 45 minutes after its dispatch is unusable, and one Stamp could not dispatch within 45 minutes (GitHub's rate limit) is never sent. Once every commit is settled:- any commit unusable:
unusable; - the control green:
not_reproduced(a flaky failure, or one in a step the probe does not run); - red, then green, then red:
inconsistent(flaky); - the first red commit (every later one red too) is no candidate pull request's:
first_red_not_a_candidate, with the commit; - two or more candidates landed as it together:
ambiguous; - else it is one pull request's: Stamp runs it once more, and the commit before it (unless it is the first one probed: the last passing run already passed there). Only when they are red and green again is the episode
attributedto that pull request, as if the check had named it: the cap's revert opens at the release by the usual rules (none when the jobs that failed have passed in a later run by then), or at once when the release has passed and the branch is still red. Otherwise it isinconsistent.
Nobody is blamed but when it is
attributed. A probe still running 2.5 hours after it was planned isunusable(timed out).- any commit unusable:
Who is told. Attributed: one comment on that pull request (the shards and jobs, each probe run and the commit), its author (an agent with a Raft event, a person in their inbox), each other candidate's author agent (one line: the probe cleared it), and the on-call, once each. Otherwise only the on-call is told, with the reason. Stamp reads what it tells first: when a read fails, nothing is told and it is tried again.
What it costs. At most 4 shards (a plain job counting as one) on at most 6 commits, and the second runs: at most 8 probe runs an episode, dispatched with the server's GitHub App (not an agent's workflow run: no request or approval).
--merge-hold log --jsonlists each episode's probe (probe: each commit, the pull requests that landed as it, its run and conclusion, the second runs markedrecheck, the plain jobs it ran (plainJobs), andjobMinutes, the probe jobs' time) and the window'sprobesandprobeJobMinutes.
The hold's history
stamp repo settings -R OWNER/REPO --merge-hold log prints, for each branch the server holds (or --branch BRANCH), every red episode of the setting's workflows in the window, one row each, then the totals. The window is the last day by default, --window 7d the last week, and --since 2026-11-21T00:00:00Z (RFC 3339, within the last 90 days) starts it there instead of ending it now. --json prints the whole answer. The API is GET /v1/repositories/OWNER/REPO/merge-hold/log?branch=main&window=1d&since=.... It is read on a server whose GitHub App covers the repository, by anyone who can read the setting there (an agent only where the repository's agent access lets it, as for --merge-hold show). A server that no longer covers the repository can still read and turn off its setting, but not the history.
For each episode it says:
- when it began (the failing run completed) and ended (the first passing run of the same workflow on the branch after it that leaves no newer run of it red: a rerun of an earlier run that passes after a later run failed does not end it), how long it lasted, and how it ended:
green_after_fix(the next run on a commit with a merge through the red base passed),green_on_its_own(a rerun or another change),released_at_cap(the cap released the hold first; the end is when the branch turned green, if it has),still_red, orend_not_seen(still open a day past the cap, or eight days without a cap: Stamp never recorded a passing run after it, so it no longer counts as red and has no duration); - the pull requests the post-merge check named (
candidates) and the one it blamed (attributedPull, 0 when it named several or only direct commits), the rerun of the failed jobs that one waited on (rerun: whether Stamp asked for it, its run attempt and its conclusion), and how many notices and pull request comments it sent (notified,comments); - the cap: when it would release (
releaseAt), whether the episode reached it, whether Stamp confirmed it with GitHub's runs and when it released the hold (releasedAt), andfirstRunPassedwhen the run the blamed pull request was named for passed later,rerunNotConfirmedwhen its rerun was not red by the release, orfailedJobsPassedIn(the run) when every job that run failed passed in a later run, so no revert was opened; the revert at the cap (number, state, and whether it was merged or closed since; afailedone also left a comment on the pull request); - the pull requests the hold held: each one's first hold (a direct merge refused, or its auto-merge waiting), when the hold released it (the episode's end or the cap's release), it merged, or it was closed unmerged (
closedUnmerged: its wait counts up to the close), whichever came first, and the wait; plus the refused direct merge attempts (409 MERGE_HELD_BASE_RED; at most one counted per pull request a minute, so a client retrying in a loop does not inflate it); - the merges through the red base (the fix label or a GitHub revert), and whether the branch was still red after (
outcomered); - the time from the earliest merge among the named pull requests to the start of the run attempt that reported the red (
mergeToRunSeconds; a cancelled earlier attempt does not count).
The totals of each branch and of the window count the episodes (those still red, and those whose end was not seen), the held pull requests (those still held, and those closed unmerged) with the median, 90th percentile and longest wait, the refused direct merge attempts, the releases at the cap, the reverts opened, found, merged and closed, and the merges through the red base (and those still red after). A held pull request still waiting is counted up to now.
Stamp records what this needs from the release that added it on (goose 00172): an episode's end, what its check sent, the merge to run gap, the pull requests held and when they merged or closed, and a revert's merge or close. Older episodes are not filled in: an episode that began before lacks those, and its missing lists them (stamp repo settings prints them under the row). Episodes, held pull requests and merges through the red base are kept 90 days.
When an admin agent skips a gate
In an emergency, an agent whose role on your Raft server is admin can skip ONE of Stamp's own two gates for ONE head of a pull request, its own pull request included (stamp pr skip):
- Approval: Stamp treats that head as approved,
.stamp/CODEOWNERSincluded:stamp/approvalandstamp/codeownersturn success for that pull request ("Approval gate skipped at this head by an admin agent"), and Stamp's merges, auto-merge and the merge queue go ahead. A request for changes you left stays shown on the pull request, but no longer holds Stamp's merge. - Merge hold: Stamp's merges of that head go through this server's hold of its base branch while the branch is red. The merge is listed in the hold's history with the other merges let through, and checked against the next run.
Nobody approves a skip, and it never touches what Stamp does not own: GitHub's own branch rules, required reviews and other apps' checks (CI, atlantis/apply) still apply, and workflow-path guards and release rules are never skipped. It holds for that one head only: the next push needs the gate again, and so does moving the pull request to another base branch (where an admin agent may skip it again, as a new skip, told again). If another open pull request shares the head and is not approved, the head's statuses stay pending.
Only an agent that is an admin of the server in Raft at the moment of the skip can skip a gate; Stamp refuses every other agent. Each skip is recorded with the agent, the pull request and head, the gate, the agent's reason, and when Raft confirmed the role, and the server's owners get a direct message from the Raft App Bot at once, saying all of that and linking the pull request. Only the owners Stamp knows are told: people whose last Stamp sign-in on the server, within the last 30 days, had the owner role. When none of them can be told (Stamp knows none, or no message to one could be sent), the server's admins Stamp knows the same way are told instead, and their message says why. Someone who has not signed in to Stamp for 30 days, or never has, is not reached; when nobody could be told, the agent is asked to tell the owners itself, and nobody is told on a server whose Raft App Bot cannot send direct messages.
To see a skip, stamp pr view prints a skipped: line (and --json an adminSkips entry on the verdict). The pull request's page in Stamp gets them too (admin_skips in its answer, GET /api/web/github/OWNER/REPO/pull/N: the gate, head, base branch, the agent, its reason and when), so it can say why the pull request passed without an approval. If you disagree with one, push a new head (it then needs the gate again) or take the change back once it merged; whether an agent is an admin of your server is set in Raft.
Merge queue
Repositories can test approved pull requests together and merge them in batches under Settings → "Merge queue".
On a Stamp where many teams' servers share Stamp's GitHub App, the queue lands only on a branch registered as its target: the Stamp operator registers some, and, where this Stamp lets people register, a GitHub admin of the repository can register one on that page, which also makes the repository's queue your server's. See Register a merge queue target branch.
When a repository uses the merge queue:
- The status line shows "approved; lands through the merge queue" once ready.
- The pull request page includes a merge queue section linking to the repository's "Merge queue" page, plus "Join merge queue" when the queue is active and you have push access.
- Auto-merge enqueues the pull request instead of merging directly.
- GitHub may display a queue-landed pull request as closed; Stamp shows it as merged and links the landed commit.
During first setup (the queue saved, and maybe verified, but never enabled yet), merges continue directly until the queue is enabled for the first time: the status line reads ready, and auto-merge and stamp pr merge merge as on a branch with no queue. Once the queue has been enabled, it holds the branch whenever it is not enabled (saved again and waiting for verification, or paused): auto-merge waits for it instead of merging around it.
Turning the queue off ("Turn off the merge queue") ends its hold on the branch, on every Stamp server, even where the operator registers the branch as a queue target: pull requests merge directly from then on. On a branch a GitHub admin registered for one server, that is so for that server only: the other servers still can't merge into it until it's unregistered (Register a merge queue target branch). An auto-merge set before the queue was turned off counted on the queue's full test, so Stamp cancels it rather than merge it without that test, and tells its author to set it again; set again, it merges directly.
Pausing the queue stops new pull requests from joining and new batches from starting, but the batch it is running still finishes: it lands when its checks pass, or fails and its pull requests are told. So to turn a busy queue off, pause it, wait for that batch, then turn it off ("Turn off the merge queue" is refused while a batch is testing or publishing). An agent can turn the queue off too (stamp queue turn-off) when it has this server's owner or admin role, or when you approve its request; turning it back on stays with people.
While the target branch is red (the queue holds a batch because the branch's own CI failed), a pull request labelled fix-red (or the branch's merge hold label, any case) or opened as a GitHub revert (title Revert "…") is tested first, in a batch of fix pull requests only, instead of waiting for the branch to recover by itself. It still needs every required check to pass; the held pull requests keep waiting until the branch's own CI passes again. The queue page marks such a batch "fix lane". While the target is green, the label changes nothing: the pull request waits its turn like any other.
Before vs after
The repository's "Merge queue" page ends with Before vs after: the repository's numbers in a window before the queue was enabled against the same length after (7 or 14 days on each side; when the queue has run less than that, both sides are the time since it was enabled, and the page says so). Every number shows before, after and the change, green when it got better and red when it got worse, in the number's own direction:
- Speed: pull requests merged per day; approval to merge and last push to merge (median and p90; the same merges and approvals as the CI report's pull request waits).
- Default branch stability: failed runs on the default branch and their share; the time the default branch was red (from a workflow's failed run to its next passing run, any workflow); Revert pull requests merged (title starting
Revert "). - CI cost: CI minutes and dollars, in total and per merged pull request, and the wasted minutes and dollars (reruns, cancels, superseded runs), over every run of the repository, the queue's candidate branches (
stamp-mq/*) included.
Then the queue's own numbers, which have no before: the wait from joining the queue to a batch forming, the time to land, batches formed and how they ended. Landed, and failed by cause (CI, conflict, red base, provider or git error, other); apart from those and not failures: withdrawn or external (withdrawn, stopped by an admin, merged elsewhere), stale (a member or the base moved, so it went back to the queue) and configuration changed. The failure rate is failed over landed and failed. Also batch sizes, requests requeued or failed alone, conflicts, the time a batch was held for a red base and the CI minutes of the candidate branches. The CI page shows a short version of the same comparison and links to the queue page; stamp ci report prints it as MERGE QUEUE (merge_queue in --json). The comparison is read in the background the first time and kept for 5 minutes, so it may show "being read" for a few seconds; the page fills in by itself.
Everything comes from what Stamp already stored, never from GitHub. Stamp records the queue's batches (kept 60 days) and when it was enabled or paused from this release on; before that, the queue remembers its last 100 batches. The moment compared around is when the queue was last turned on (the latest recorded enable not followed by a recorded pause or turn-off), as long as the window before it was all time the queue was off (no recorded pause and no batch in it); otherwise it is the first recorded enable. A queue turned on before these records can have its enable time added by Stamp's operators from their logs. When no record says when the queue was enabled, the moment is its earliest stored batch, and only while those 100 still reach back to the queue's first batch; the page then says it may have been enabled earlier. Otherwise (a queue older than these records, or one recorded being paused before any recorded enable) Stamp has no record of when the queue was turned on, so there is no before/after comparison, and the page shows the queue's own numbers for the chosen window. Stamp keeps CI records 60 days, so a side whose window those records do not reach shows "Not recorded", and once the window after enabling is older than that the comparison has expired. A number the records do not reach is never guessed; when an input reached its bound the page says so and those numbers show no better or worse; how long the queue was stalled is not shown, as a stall is never recorded.
Post-merge CI
A pull request's own checks run on its head. The full tests that run after it merges are watched too: when a completed run of a test workflow on a branch that Stamp-created pull requests merge into newly fails (a job or test that passed in the last definitive run of that workflow on that branch), Stamp comments once on each pull request merged since that run, notifies their authors' agents, and shows the run on the pull request page and the repository page. A test workflow is one that also runs on pull requests, or one the branch's merge hold names; any other workflow (a deploy workflow that runs only on push) is not watched.
Stamp watches runs triggered by push, schedule or workflow_dispatch. Runs of one workflow on one branch form one history whatever their event, so the full tests can run as a batch, for example hourly on staging against its latest commit, instead of once per merge. A batch run names every pull request merged between the last run that passed and the commit it tested. For Stamp to read a batch run, it must:
- be the same workflow (the file that also runs on pull requests, so the same name);
- run on the merged-into branch (its
head_branch; a manual dispatch on a feature branch is ignored); - test the commit it reports (
head_sha).
GitHub runs schedule triggers only on the repository's default branch, so a scheduled run's head_branch and head_sha are always the default branch's. To batch another branch such as staging, have a cron (a small scheduled workflow, or any scheduler) dispatch the test workflow on that branch:
gh workflow run test.yml --ref stagingThe test workflow needs a workflow_dispatch trigger, and a dispatching workflow needs the actions: write permission. That run's head_branch is staging and its head_sha is the tip of staging when it started. A plain schedule trigger in the test workflow only counts when Stamp-created pull requests merge into the default branch.
A push run and a batch run on the same commit that fail the same way are reported once, even when Stamp looks at both at the same moment.
CI report: where the minutes go
Stamp records every completed GitHub Actions run and job of a repository it covers, from the webhooks it already receives. It never asks GitHub for them, so the report starts on the day Stamp started recording (no backfill). The CI report reads those records: for a window of 1 to 14 days (7 by default), compared with the window of the same length just before it. Windows up to 30 days will come with a daily rollup.
An agent reads it with stamp ci report. The web CI page reads the same report.


stamp ci report --repo OWNER/REPO # the last 7 days
stamp ci report --repo OWNER/REPO --window 14d
stamp ci report --repo OWNER/REPO --json # everything, for a scriptThe report has three blocks:
- Pull requests: runs triggered by a pull request.
- Post-merge: runs on the default branch, or on a branch Stamp's post-merge CI watches, from a push, a schedule or a dispatch.
- Other: the merge queue, pushes to other branches, and jobs whose run Stamp has not recorded.
Each block shows:
Runs, jobs and minutes: billable minutes round each job up to a whole minute, as GitHub bills.
Failure rate: real failures over finished jobs. The report gives the denominator too (
jobs_counted, the COUNTED column ofstamp ci report): the jobs that were neither skipped nor cancelled. A flaky failure finished, so it is counted there, though it is not a real failure.Flaky jobs: a job that failed and then passed on the same commit in the same workflow. Flaky failures are counted on their own, not in the failure rate.
Waste:
- minutes of jobs cancelled because a newer push replaced their run (superseded);
- minutes of jobs cancelled by hand;
- minutes of jobs cancelled because another job of the same run failed (fail-fast);
- minutes of rerun attempts.
When you choose "Re-run failed jobs", GitHub copies the jobs that passed into the new attempt. The report leaves those copies out, so nothing is counted twice.
Queue time of the whole block (
queue): median and 95th percentile from a run's creation to its start, over every first attempt of the block in the window. It is the workflows' queue time taken over all of the block's runs together.Workflows, sorted by minutes, with queue time (median and 95th percentile, from the run's creation to its start and to its first job's start).
Jobs: the top 200 by minutes.
Runners: the block's jobs per runner, that is the runs-on labels the job ran with (
ubuntu-latest,self-hosted,linux,x64, a hosted provider's label) and its runner group, with jobs, minutes, billable minutes, failure rate and the change from the window before; at most 20 per block. Stamp reads the runner from theworkflow_jobevent GitHub sends when a job finishes, so jobs recorded before runners were (and any job whose event did not arrive) are the runnerunknown. Each runner also has its price and cost (below).Flaky jobs, and the runs that waited longest in the queue.
Cost (cost_usd): each runner's billable minutes times its price per minute, read from its labels in runnerdb, the open dataset of CI runner prices: the providers' list prices, each with its source and the day it was checked. Stamp ships a copy and reads runnerdb again once a day, so a price change there reaches the report within a day; the report names what it priced with (prices.source runnerdb, prices.as_of, e.g. 2026-11-18), and the CLI prints it as prices: runnerdb 2026-11-18. Both providers bill each job rounded up to a whole minute, and so does the report.
A label is priced only when runnerdb lists it, exactly (a * in a runnerdb label matches any text, as in macos-*-large). As of 2026-11-18:
Runner (runs-on label) | Price per minute |
|---|---|
Blacksmith blacksmith-<N>vcpu-ubuntu-2404 / -2204 (x64; N = 2, 4, 8, 16, 32) | N × $0.0020 (4 vCPU: $0.008) |
Blacksmith blacksmith-<N>vcpu-ubuntu-2404-arm | N × 0.625 × $0.0020 |
Blacksmith blacksmith-<N>vcpu-windows-2025 (N = 4, 8, 16) | N × 2 × $0.0020 |
Blacksmith blacksmith-6vcpu-macos-* / blacksmith-12vcpu-macos-* (latest, 15, 26, 27) | 40 / 80 × $0.0020 |
Blacksmith label ending ;scheduling=flex | 0.6 × the label's price (40% off) |
GitHub ubuntu-latest, ubuntu-24.04, ubuntu-22.04 | $0.006 |
GitHub ubuntu-24.04-arm, ubuntu-22.04-arm | $0.005 |
GitHub windows-latest, windows-2025, windows-2022 | $0.010 |
GitHub macos-latest, macos-14, macos-15, macos-26, xcode-27 | $0.062 |
GitHub macos-*-large / macos-*-xlarge, xcode-27-xlarge | $0.077 / $0.102 |
self-hosted | $0 |
On a public repository GitHub's standard runners are free; its larger macOS runners and Blacksmith are still billed. Stamp takes the repository's visibility from what it stores; while that is unknown, the repository is priced as private (prices.visibility). A label set runnerdb does not list (a custom larger runner, an image it does not name yet, another provider) has no price: its cost is unknown (null in JSON), never guessed. A block's cost sums its priced runners, and unpriced_billable_minutes says how many billable minutes it leaves out (unknown runners and prices, and runners past the 20 shown); the cost is unknown only when minutes were spent and none is priced. The wasted cost (wasted_cost_usd) prices the waste's minutes on each runner; those minutes are summed, not rounded per job, so it can be a little under the bill (prices.wasted_rounding: "aggregate").
The post-merge block also shows base red: minutes of reruns and cancels on the default branch, which is what keeping the base green costs.
Pull request waits (pr_latency, the PR LATENCY section of stamp ci report): for the pull requests merged in the window (at most 1000, the latest), how long CI made them wait, from what Stamp already stores:
- Last push to all checks green (
push_to_green): from the moment the merged head appeared (the earliest of the first pull request workflow run GitHub created at it and the pull request event that carried it) to the moment that head first turned all green: for each workflow its first passing run at that head, the latest of those (a re-run after the head was already green, such as one an edited pull request triggers, does not stretch it). All green means: cancelled runs left out, the newest attempt of every workflow at that head (created before the merge) passed (success, neutral or skipped). A head with no run is counted inno_runs, one merged with a workflow not green innot_green; neither is measured. Each of the 10 slowest names the workflow that turned green last, that run's attempt and its last job. - Approval to merge (
approval_to_merge): from the approval that enabled the merge (the latest one at the merged head before the merge, else the latest at any head:at_merged_headfalse) to the merge. Approvals are Stamp's (an agent's, or a person's sent through Stamp; one its approver withdrew before the merge does not count) and GitHub's approving reviews (a dismissed one does not count). The merge time is GitHub'smerged_atfrom the pull request's closed event, else Stamp's own merge (merge_time_fromcounts both). Each of the 10 slowest is split, when the merged head was all green, into approval to green (waiting for CI) and green to merge (waiting for auto-merge, the queue or a person), and says whether the head was pushed after the approval (the approval no longer counted) and whether Stamp merged it (merged_via). A part the stored facts do not show is left out (?in the CLI): unknown, never guessed.
Pushes, approvals and runs are read back at most 7 days before the window. Percentiles are p50 and p90, in milliseconds in --json.
Stamp reads the waits apart from the rest of the report. If they could not be read this time (the read took too long or failed), the section has available false, every number 0 and the lists empty, and the rest of the report is unchanged; stamp ci report prints one line saying so instead of the numbers. Stamp keeps that report for a minute like any other, and the next read after it reads the waits again.
The pull request block lists skip candidates: jobs that ran in at least 30 runs and in at least 90% of their workflow's runs, and that failed for real in at most 1% of them. These are the first checks to move from every push to after merge.
Who can read it:
- A person: the repository must be in the server's scope, and you must have opened it recently, so Stamp holds a fresh check that your own GitHub account can read it. That is the same rule as the repository's post-merge status.
- An agent: any repository its server's GitHub App covers.
Any other repository is "not found", whether or not it exists. A pull request is named only by its number.
Stamp keeps a report for a minute, so a page left open or several readers cost one read, and it reads one report at a time: when another one is being read, wait a few seconds and ask again.
The report also shows minutes and dollars per runner label, at runnerdb's prices, refreshed daily (see Raft CI best practices).
Not in this release: windows over 14 days, the queue time of each job, and runs that are still queued or stuck in progress. Stamp records runs only when they complete.
To see test files and flaky tests too, see Test files and flaky tests.
Test files and flaky tests
The report can also say which test files cost the most, which costly files never failed, and which tests are flaky, without anyone downloading logs. Your CI writes its test results as JUnit XML and uploads them as a GitHub Actions artifact whose name starts with stamp-test-report. After each completed run, Stamp lists the run's artifacts, downloads those with the App's own token and reads every .xml file inside. The workflow needs no secret. Any test runner that writes JUnit XML works (Vitest, Jest with jest-junit, pytest --junitxml, Go with gotestsum --junitfile, Maven Surefire, ...).
With Vitest, sharded over a matrix:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3]
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: >-
npx vitest run --shard=${{ matrix.shard }}/3
--reporter=default --reporter=junit
--outputFile.junit=test-results/junit.xml
- uses: actions/upload-artifact@v4
if: always()
with:
name: stamp-test-report-${{ matrix.shard }}
path: test-results/*.xml
retention-days: 7if: always()uploads the report when tests fail too: that is when you want it.- A run may upload several artifacts (one per shard,
stamp-test-report-1,-2, ...); Stamp merges them per run attempt. - The test file is the test case's
fileattribute, else its suite's, else itsclassname(where Vitest puts the file's path). Paths must be relative to the repository. - Limits per run attempt: 20 artifacts, 16 MiB per artifact (compressed) and 10,000 files in its zip, 32 MiB per XML file and 128 MiB of XML in all, 100,000 test cases, 10,000 test files. A report over a limit is counted in part and marked truncated: an XML file over 32 MiB counts the test cases before the cut. An XML file nested deeper than 64 elements, or with an attribute over 4 KiB, is skipped whole.
- A download that fails is tried twice more, about 1 and then 3 seconds later. An artifact still not downloaded after the third try is left out, and the report keeps the other artifacts and is marked truncated. If none of a run attempt's artifacts could be downloaded, nothing is recorded, and Stamp reads the run again later when the failure looks temporary.
- Runs from forks are not recorded: a run whose head is in another repository (a fork's pull request) is skipped, since its artifacts come from the fork's code.
- A run attempt reads only the artifacts created while it ran, so a rerun's reports are not mixed into an earlier attempt.
- A run with no such artifact costs Stamp one listing of the run's artifacts, nothing else.
In the report (tests in --json, the TESTS section of stamp ci report, the Tests section of the CI page), over the window:
- Slowest test files (
slowest_files): by total time, the sum of the file's test times in every run attempt that ran it, with runs, average and p90 per run, failed and flaky tests. At most 50. - Costly test files that never failed (
never_failed_files): the same, only files with no failed and no flaky test in the window. These are the files to run less often, for example only after merge. - Flaky tests (
flaky_cases): a test that failed and then passed in the same report (a runner's retry), or that passed in a rerun attempt of the run after failing in an earlier attempt. At most 50, the flakiest first.
A truncated report is one over a limit or missing an artifact Stamp could not download. truncated_reports counts the run attempts in the window whose report is truncated, and truncated_runs names the latest 20 of them, newest first, each with run_id, run_attempt and completed_at, so you can open the run (stamp run view RUN_ID --repo OWNER/REPO). stamp ci report prints their run IDs after the count, for example truncated 2: runs 47120593318, 47098812604; a rerun's report shows as RUN_ID (attempt N), and past 20 the list ends with and N earlier.
The lists cover the latest 100 run attempts with a report in the window (bounded true when there were more). Until a report has been recorded, the section says so and how to enable it (recorded false, hint). If the section could not be read in time, it is empty with available false and the rest of the report is unchanged. Test results are kept 60 days, like the rest of the CI records.
Local test runs an agent reports
An agent can also tell Stamp what its local test runs cost before it pushed: which test files each run ran, how long it waited for the machine's test slot, how long it ran and how it ended. This is the agent's own report, kept apart from push receipts (what Stamp itself read at the push), and nothing that decides access, an approval or a merge reads it.
stamp ci local-run --repo OWNER/REPO --head SHA --file runs.json # report the runs behind the pushed head SHA
stamp ci local-run --repo OWNER/REPO --head SHA --file - # the same, from standard input
stamp ci local-run --repo OWNER/REPO --head SHA # print what you reported for that head--head is the full SHA of the head you pushed. Reporting the same head again replaces your earlier report. The file is the v1 document:
{
"version": 1,
"head_sha": "<the pushed head, 40 characters>",
"branch": "agent/xxx",
"runs": [
{
"head_sha": "<the HEAD this run ran at>",
"started_at": "2026-11-13T03:20:00Z",
"duration_ms": 41230,
"lock_wait_ms": 1200,
"exit_code": 0,
"files": ["packages/server/src/foo.test.ts"],
"passed": 120, "failed": 0, "skipped": 3
}
]
}- Each run carries the HEAD it ran at, since local runs often happen on earlier commits or uncommitted work; report all of a branch's runs since it left its base under the head you push.
passed,failedandskippedare optional;exit_codetells a pass from a failure.filesholds repository paths only, never test output or errors.- Limits: 1 to 50 runs, at most 2,000 paths a run, at most 256 KiB in all. Fields Stamp does not know are ignored and not stored. A document that breaks a rule is refused with
CI_LOCAL_RUN_INVALID, naming the field and why, and nothing is stored. - Who: an agent, on any repository its server's App covers (as for
stamp ci report). An agent reads back only its own report. - Reports are deleted 60 days after the last one for that head.
Next
- Requiring specific agents or people to approve some paths: Code owners.
- An agent asking to act as you, or to run a workflow: Permission requests.