Repository navigation
Description
This was generated by AI during triage.
Follow-up to #1969 (Fleet cron schedules by repository and machine, in progress as PR #1987). It builds on that Fleet view. Quota evidence is on #739. Reducing the requests themselves is #1992.
Problem
All Fleet machines authenticated as one GitHub user share that user's 5000/hr REST quota. On 2026-11-10, six machines scheduled ~840 Pass starts/hr. That exhausted the quota and failed #1968's Ticket run during CI watching. Nothing in thirdshift shows how much of the quota the schedules use; the total had to be worked out by hand from six crontabs.
Desired behavior
Using the repository → machine → Command kind inventory from #1969, show an estimated GitHub request rate for the scheduled Passes:
- For each recognized entry, derive Pass starts per hour from its cron schedule. Support at least
*,*/n,a-b/n, lists, single values and@hourly/@dailyacross the minute and hour fields. A schedule that can't be evaluated, or that restricts day-of-month, month or day-of-week, is not estimated rather than approximated or counted as zero. - Multiply by a fixed per-Pass request estimate for the Command kind, split into REST and GraphQL, kept in one documented place. Each value says whether it was measured or derived from code.
- Show subtotals per machine and per repository. The headline is per GitHub quota owner (the authenticated login and GitHub host each machine reports), summed across the Fleet. Show it against the 5000/hr REST limit, with GraphQL separate. Machines that can't be reached are excluded and named.
- Label the figures as floors for Passes that find nothing to do. A Pass that starts a run uses far more (CI watching, Claims, agent sessions). Skips at the Command limit are free.
thirdshift cronjobs --json, the page and the Console API agree (ADR 0026).
Measured per-Pass costs (2026-11-10)
Hand-run on Lima under a pass-through gh counter (GH_DEBUG=1, one line per HTTP request). stephens.page, with nothing to do:
| Pass | REST | GraphQL | Requests seen |
|---|---|---|---|
| Pickup | 4 | 2 | closed in-progress, closed agent-failed, open agent-failed, open ready-for-agent issue lists; 2 GraphQL Ready checks |
| Triage | 4 | 0 | the same three Sweep/accounting lists + open needs-triage |
| Review | 2 + 1 per candidate PR | 0 | open PRs, /user, comments on one PR |
| Fix | 0 | 0 | stopped at "Base branch CI is reserved on origin" (git, not GitHub); other paths not measured |
| Architect, Secure | not measured | ||
| Any Pass skipped at the Command limit | 0 | 0 | all ten Pass kinds × 2 repos, checked |
Each --paginate list counts one request per page, so large repositories cost more. Agent sessions add ~3–7 gh calls per run (14 days of Session traces, all hosts: Pickup ~6.5, Triage ~5.3, Architect ~3.1, Secure ~3.2, Fix ~2.5, Review ~0.9 per run).
Example acceptance criteria (to confirm when shaping)
*/2gives 30 starts/hr,1-59/10gives 6,20 * * * *gives 1,0 1,5,6 * * *gives 3/24. A day-of-week-restricted or unparseable schedule shows as not estimated.- With the table above, a Pickup entry at
*/2shows 120 REST + 60 GraphQL per hour. Totals per repository, per machine and per quota owner add up exactly. - Two fake Fleet machines on the same GitHub login add up into one quota-owner total. A third machine on a different login is totalled separately.
- The page and CLI say the figures are floors for Passes that find nothing to do.
What a person needs to do first
- Wait for make a view in thirdshift console web ui which lets you see by repository which host in the fleet runs which cronjob / which type of thirdshift run on schedule #1969 / PR Show Fleet cron schedules by repository and machine #1987 to land, then shape this against its final inventory and Fleet interfaces. This brief was written before they existed.
- Decide how this relates to Measure and cut the GitHub reads idle Passes make #1992. Its reductions will change these costs, so the table must be easy to update, or this waits for Measure and cut the GitHub reads idle Passes make #1992. Fill in Architect, Secure and Fix's non-reserved path by measurement or code reading.
- Then write the Agent Brief and label it
ready-for-agent.
Out of scope
- Recording real GitHub usage per Pass or per run.
- Quota waits and deferral (Defer scheduled passes during GitHub quota exhaustion and reduce idle polling #739), and reducing the requests (Measure and cut the GitHub reads idle Passes make #1992).
- Editing crontabs or suggesting schedule changes automatically (ADR 0009).
- System crontabs, other OS users, systemd timers, macOS LaunchAgents. GitHub App or Enterprise quotas beyond reporting the authenticated login.
Activity