You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Authenticate the fleet as a GitHub App to raise its API quota #1993
This was generated by AI during a grilling session on #739.
Split out of #739 (decision Q5b), carrying over #1186's point that the ceiling can be raised as well as the spending lowered.
Problem
Every host in the fleet authenticates gh as the same GitHub user, so they all share that user's 5000/hr REST quota. A GitHub App installation token has its own rate limit, separate from the user's, and it grows with the number of repositories on larger installations. Moving some or all hosts to App tokens would raise the fleet's ceiling.
What a person needs to do
This is mostly setup, not code: creating the GitHub App, choosing its permissions, installing it on the repositories, and getting short-lived installation tokens to each host's gh. Decide:
which hosts or Pass kinds move to the App, and which stay on the user's login;
how tokens are refreshed (installation tokens expire after an hour);
whether thirdshift needs any change, for example to recognise the App identity as a Trusted account for labelling, or to key its Quota wait record by App installation.
Status: paused, waiting on the owner's GitHub steps
Decisions made (owner, 2026-11-12):
All hosts move to the App; it's installed on all of the owner's repositories.
thirdshift trusts the login its own gh credentials act as (the App's bot). See ADR 0031.
The Quota wait stays keyed by login; no per-installation key.
Done:
Created the private GitHub App thirdshift-fleet (App ID 5733116), installable only on this account, with webhooks off.
Repository permissions: contents, issues, pull requests, actions and workflows set to write; checks, statuses and metadata set to read.
Branch gh-app-1993 (commit 6effb37d, no PR yet). The full suite, clippy and fmt pass.
The account thirdshift acts as is a Trusted account at every check site. Bot logins are compared without REST's [bot] suffix, since GraphQL omits it.
An issue author with an untrusted association is checked by membership, as an actor is.
The identity cache replaces a login's old credential, so hourly tokens don't pile up.
ADR 0031, a glossary update and an architecture page update.
scripts/gh-app-token.sh <app-id> <pem> <installation-id>: mints an installation token and stores it as gh's login. Run it from cron every 30 minutes, and run gh auth setup-git once per host.
Remaining:
Owner: generate the App's private key, then install the App on all repositories.
Verify live on Lima before rollout. Two things are unconfirmed with an installation token:
whether gh auth login --with-token accepts it;
whether thirdshift's identity lookup returns the bot login (gh api user fails, so it falls back to GraphQL viewer).
Open the PR from gh-app-1993, then switch hosts' crons to the token script.
The ETA hosts' tourbot repos belong to another owner, so the App doesn't cover them. Those hosts keep a person's login for that work.
Activity
JacobStephens2 commentedon Nov 16, 2026
Status: paused, waiting on the owner's GitHub steps
Decisions made (owner, 2026-11-12):
ghcredentials act as (the App's bot). See ADR 0031.Done:
thirdshift-fleet(App ID5733116), installable only on this account, with webhooks off.gh-app-1993(commit6effb37d, no PR yet). The full suite, clippy and fmt pass.[bot]suffix, since GraphQL omits it.scripts/gh-app-token.sh <app-id> <pem> <installation-id>: mints an installation token and stores it as gh's login. Run it from cron every 30 minutes, and rungh auth setup-gitonce per host.Remaining:
gh auth login --with-tokenaccepts it;gh api userfails, so it falls back to GraphQLviewer).gh-app-1993, then switch hosts' crons to the token script.The ETA hosts' tourbot repos belong to another owner, so the App doesn't cover them. Those hosts keep a person's login for that work.