Skip to content

Federation ​

A federation is a group of Raft servers that count each other's agents' approvals while keeping their own settings, people, and data separate.

Servers on the same GitHub organization are federated automatically ​

You do not need to set anything up when your servers work on the same GitHub organization (or the same personal GitHub account). If two Raft servers' Stamp GitHub Apps are both installed on that account, they are in the same federation for every repository both Apps cover:

  • An agent's approval on one server counts on a pull request opened through the other, on that repository.
  • A server whose App covers the organization but not that repository does not count for it.
  • It ends by itself when an App is uninstalled or suspended, or stops covering the repository (within about an hour).
  • Self-approval follows the strictest server: if any of these servers has self-approval turned off for the repository (by the repository's own setting or by that server's review default for the account), the author's own approval is not enough, and someone else must approve.

The automatic federation counts everywhere a federation does:

  • For the whole account: other servers' pull requests in your lists and search, the server labels, Settings › Federation (under "Servers on the same GitHub account"), and the waiting-requests count from other servers you signed in to.
  • For one repository, only the servers whose App covers that repository now: approvals and merging, acting as a person who signed in on another server (--as @handle), which GitHub authors' text agents treat as trusted rather than external, and using the repository's merge queue.

A federation you set up keeps working as before, alongside the automatic one. Joining or leaving it does not change the automatic one.

Note

Only an owner or admin of your Raft server can create, join, or leave a federation. Everyone on the server can view its federation.

Where to find it ​

Open Settings → Federation (/settings/federation).

When your server is not in a federation, the page shows "This server is not in a federation." and lets you create one, ask to join one, or accept an invitation.

Prerequisites:

  • Your server needs a GitHub App; without one, Stamp refuses federation actions.
  • Your login must be less than 24 hours old; otherwise, sign out and log in with Raft again.
  • A server can belong to only one federation at a time.

Create a federation ​

Settings › Federation on a server that is not in a federation yetSettings › Federation on a server that is not in a federation yet

  1. Under "Create a federation", type a Name (1 to 100 characters).
  2. Choose "Create federation".

Your server becomes the first member, and the page displays the Federation ID (starting with fed_). Choose "Copy ID" to share it with servers that should join.

Add another server ​

You invite a server ​

  1. On Settings → Federation, under "Invite a server", type the other server's Server name or ID (or its ID if multiple servers share the name; someone from that server must have signed in to Stamp at least once).
  2. Add an optional Note (optional) and choose "Send invitation".

The invited server's owners and admins see the invitation under "Invitations" on their Settings → Federation, choose "Accept or decline", and then "Accept" or "Decline" within 7 days. Any member server's owner or admin can withdraw a pending invitation from its page.

A server asks to join ​

  1. Get the Federation ID from an owner or admin of a member server.
  2. On Settings → Federation, under "Ask to join a federation", paste the Federation ID, add an optional Note (optional), and choose "Ask to join".

The request appears under "Waiting to join" on your page and under "Waiting join requests" for the federation. Any owner or admin of a member server chooses "Review", then "Approve" or "Decline". If you are already an owner or admin of a member server, your server joins immediately.

Not an owner or admin? ​

Under "Ask to join a federation", paste the ID and choose "Ask your admins to join". Your server's owners and admins see it under "Members asking to join"; once one approves, Stamp files the join request as them for a member server to decide.

Leave a federation ​

  1. On Settings → Federation, under "Leave the federation", choose "Leave federation…".
  2. Type the federation's name to confirm and choose "Leave federation".

Leaving takes effect immediately without requiring other members' approval:

  • Approvals from other member servers' agents stop counting on your pull requests, and your agents' approvals stop counting on theirs.
  • Other servers remain in the federation. Rejoining requires a new join request and approval.

"History" on the page records who created, joined, or left the federation and when.

What changes inside a federation ​

Approvals count across servers ​

An approval by an agent of another member server (or of a server on the same GitHub organization, see above) counts on your pull requests like your own agents' approvals, and yours count on theirs, when:

  • both servers' GitHub Apps cover the repository;
  • the pull request's current head was pushed through Stamp.

An agent that opened a pull request, or pushed to its branch, through any member server's Stamp still cannot approve it from another member: it self-approves with review evidence only on the Stamp it opened or pushed it through (see Review and merge).

Turning it off for one repository ​

Federation approvals are enabled by default for every repository. To count only your own server's approvals on a repository:

  1. Open Repository settings → Reviews (/github/<owner>/<repo>/settings/reviews).
  2. Under "Federation approvals", turn off "Count approvals by the agents of this server's federation members".

Only server owners and admins can view or change this setting, and the page history records every change. To set it for every repository of a GitHub account at once, see Review defaults.

Other servers' people and agents are labelled ​

Whenever Stamp shows someone from another member server, a chip with that server's name follows their handle.

You see the members' pull requests ​

Repository pages and pull request lists also include pull requests opened through Stamp by other member servers on repositories your GitHub App covers, each labeled with its source server. Actions you take on them (approve, merge, comment) follow your own server's rules.

The federation view ​

On Settings → Federation, choose "Open the federation view" (/f/<federation>, accessible to signed-in members):

A federation's view, read through one of its two member servers: the federation's name and id, and each member server with when it created or joined the federation and whether this browser is signed in to itA federation's view, read through one of its two member servers: the federation's name and id, and each member server with when it created or joined the federation and whether this browser is signed in to it

  • Member servers: links to each member server's address, with "this server" marking yours.
  • Requests waiting on you: lists your server's requests plus act-as requests from member servers that name you, each labeled by server, with inline "Approve" and "Decline" actions (see Permission requests).
  • Repository and pull request pages: show Stamp activity across all member servers.

Per-server settings and individual request pages remain at /s/<your-server>/…; choose "Federation settings on this server" to return to Settings → Federation.

Acting as a person on another server ​

Inside a federation, an act-as request can name a person who has signed in to Stamp on another member server, with that server's name after the handle: --as @handle@server (for example --as @bob@bravo). A bare --as @handle names a person of your own server only: if nobody there has the handle, Stamp refuses with REQUEST_APPROVER_UNKNOWN, listing the servers you can name with --as @handle@server, so a same-named person of another server is never chosen by accident. A name --as @handle@server that names no one person there who can approve (an unknown or shared handle, an agent, someone who is not a member) is refused with REQUEST_APPROVER_PEER_UNAVAILABLE, whatever the reason: your server learns of another server's people only whether a name there can approve. A server that is neither yours nor a member is refused with REQUEST_APPROVER_SERVER_UNKNOWN, listing the servers you can name.

  • They approve it on their own server or from the federation view's request list.
  • The resulting grant covers that single repository only.
  • If the two servers stop sharing a federation, the grant ends immediately and any pending request is closed.