Skip to content

Across servers ​

Several Raft servers can form a Stamp federation and count each other's approvals.

Servers whose Stamp GitHub Apps are installed on the same GitHub organization (or personal account) are federated automatically for every repository both Apps cover: your approval counts on a pull request opened through the other server's Stamp, with no setup. Self-approval follows the strictest of those servers: if any of them has self-approval turned off for the repository, pr approve refuses your own approval with SELF_APPROVAL_DISABLED and names that server, and someone else must approve. The automatic federation also counts for the lists and labels below (any server on the same account), and for stamp request act-as --as @handle@server naming a person who signed in on the other server (only for a repository both Apps cover now).

Approvals from another Raft server: federations ​

Several Raft servers can form a Stamp federation (GET /v1/federation shows your server's). Inside a federation, your approval on a pull request opened through another member server's Stamp counts there, and theirs count on yours. Run stamp pr approve NUMBER --repo OWNER/REPO --head HEAD_SHA --base BASE_SHA on your own server; the response's countsOnServers lists the servers where it counts and updates each server's stamp/approval status.

An approval counts across servers only when all of these hold (re-checked on every read):

  • You did not open the pull request or push to its branch through any member server's Stamp (else SELF_APPROVAL_NOT_ALLOWED; self-approve it with --evidence-file on the server you pushed through). For a pull request from a fork, the branch is the fork's: a push to the fork's branch through a member server makes you an author too. On a pull request whose fork was deleted, no agent's approval counts (APPROVAL_AUTHOR_UNKNOWN): who pushed it can no longer be read.
  • Both servers' GitHub Apps currently cover the repository (for servers on the same GitHub organization, this alone puts them in one federation for that repository).
  • Your approval is on the current head, and that head was pushed through Stamp by a member server. A push whose whole change is identical to the head you approved (a rebase that left the changed files as they were) carries your approval to the new head, as on your own server: the carried approval is recorded on your server, the comparison is read with your server's GitHub App (if your server cannot read the repository, nothing is carried), a self-approval is carried only while your server's self-approval settings would still allow it, and the pull request's server then counts it only where an approval you gave at the new head would count.
  • The pull request's server has not disabled federation approvals for that repository (in Settings › Reviews, or PUT /v1/repositories/OWNER/REPO/review-settings with {"federationApprovals": false}).

Leaving a federation stops cross-server counting immediately in both directions. When the pull request's server would not count your approval, pr approve refuses with APPROVAL_AUTHOR_UNKNOWN and states why and who can change it; nothing is recorded. pr view labels a federated vote @HANDLE (agent, SERVER · federation), and "federation": true marks it in the verdict JSON.

What a federation member sees of the other members ​

When your Raft server is in a federation, repository pages (https://stamp.build/github/OWNER/REPO), /pulls, stamp pr list, the repository switcher's pull request counts, and stamp search also include pull requests opened through Stamp by other member servers on repositories your server's GitHub App covers (matched by GitHub repository ID). Each row identifies its source server (serverId, serverName, and otherServer: true in JSON; Agent:ID @ SERVER in pr list; "from SERVER" in the web UI); its raftAgentId is an agent of THAT server:

  • Read and acted on under your server's rules: it is read-only for you; live state is read through your server's GitHub App, and any action you take (pr approve, pr merge, comments) follows your server's rules. A member's records never grant you anything.
  • Minimal metadata shared: only the pull request number, author agent, source server, and timestamp cross servers. stamp search matches federated pull requests by title, head SHA, or branch only—never by body or comments.
  • Servers outside a federation see only their own pull requests; leaving a federation takes effect on the next read.