An open source design system that's fully customizable and agent ready
TypeScript
ci: a main or release run waits for room on a standard runner, not a slim job's fifteen-minute cap (#9879)
Cindy Zhang0a64fdb4f0c5
diff --git a/.github/actions/ci-admission/action.yml b/.github/actions/ci-admission/action.ymlindex 7a3d041665..e0cd5d6d5d 100644--- a/.github/actions/ci-admission/action.yml+++ b/.github/actions/ci-admission/action.yml@@ -23,10 +23,12 @@# jobs a run) always count at least eighteen jobs, which covers all but their# rarest bursts, so the room they can still take is kept free. A pull-request run (`main: false`) also# waits while a-# `main` full check or release re-check is waiting, so `main` fits first;-# pull-request runs never wait for each other.-# - It waits at most `max-wait-minutes` (fifteen for `main`, twelve for a pull-# request, inside its fifteen-minute job budget), looking at even intervals+# `main` full check or release re-check is waiting, for that wait's first+# fifteen minutes, so `main` fits first; pull-request runs never wait for+# each other.+# - It waits at most `max-wait-minutes` (120 for `main`, on a standard runner,+# since a slim job stops at fifteen minutes; twelve for a pull request,+# inside its fifteen-minute job budget), looking at even intervals# plus a random 0-20 s so runs that look together spread out, and then# starts (a pull request: see above).# - Each CI or Main run counts its live jobs, read once per look. A@@ -39,7 +41,7 @@# stale record GitHub still lists as active, and counts nothing.# - A look costs two run listings plus one call per active CI or Main run, and# a run looks at most `max-looks` times: twice for a pull request (at once and-# after its longest wait), every two minutes for the rare `main` run. A+# after its longest wait), about every four minutes for the rare `main` run. A# pull-request run that would fit but yields to a waiting `main` check looks# again every two minutes while it does, and a run within ten jobs of room# every four, both outside that count and inside the run's longest wait. When the@@ -136,8 +138,8 @@ runs:const MAX_LOOKS = Math.max(1, Number(process.env.MAX_LOOKS || '8'));const LOOK_MS = MAX_LOOKS > 1 ? (MAX_WAIT_MS - JITTER_MS) / (MAX_LOOKS - 1) : MAX_WAIT_MS;// A run that would fit but yields to a waiting `main` check looks- // again this soon, outside its count of looks, since `main` waits- // are short.+ // again this soon, outside its count of looks: the yield lasts at+ // most MAIN_YIELD_MS.const YIELD_LOOK_MS = 2 * 60_000;// A run with no room but within this many jobs of it looks again// this soon, also outside its count of looks: near-full CI frees@@ -175,6 +177,11 @@ runs:// At most this many pull-request runs wait at once; one more finding// no room is turned away (spec:AST-030 DEC-16).const MAX_WAITING = 10;+ // A pull-request run yields to a waiting `main` run for the first+ // fifteen minutes of that wait. After that the `main` run still counts+ // its whole peak, so a pull-request run starts only when it fits+ // beside it (spec:AST-030 DEC-16).+ const MAIN_YIELD_MS = 15 * 60_000;const PHASE = process.env.PHASE || 'whole';// The most jobs a run holds at once, by workflow: ci.yml's// release-check and Main's runs (a push's fast checks or a unit run)@@ -309,7 +316,7 @@ runs:// it runs: the job that waits and its Storybook build,// which starts beside it.const holds = isMain(run) ? estimate(run) : Math.max(1, jobs.filter(job => LIVE.includes(job.status)).length);- if (isMain(run) && !main) mainWaiting = true;+ if (isMain(run) && !main && !(Date.now() - span.began >= MAIN_YIELD_MS)) mainWaiting = true;if (run.event === 'pull_request') waitingPulls += 1;large += holds;counted.push(`${short(run)} ${run.id} ${run.event}: ${holds} waiting`);diff --git a/.github/scripts/ci-admission.test.mjs b/.github/scripts/ci-admission.test.mjsindex aa380911a2..1cad69ef33 100644--- a/.github/scripts/ci-admission.test.mjs+++ b/.github/scripts/ci-admission.test.mjs@@ -12,6 +12,7 @@*/import fs from 'node:fs';+import {createRequire} from 'node:module';import path from 'node:path';import {afterEach, describe, expect, it, vi} from 'vitest';@@ -19,6 +20,7 @@ import yaml from 'yaml';import {matrixFor} from './ci-matrix.mjs';import {PR_CI_GATE, ungated} from './ci-pr-gate.mjs';+const require = createRequire(import.meta.url);const root = path.resolve(import.meta.dirname, '../..');const read = file => yaml.parse(fs.readFileSync(path.join(root, file), 'utf8'));const action = read('.github/actions/ci-admission/action.yml');@@ -46,11 +48,15 @@ describe('where runs wait', () => {const admission = ci.jobs.admission;const wait = stepOf(admission);- it('waits in two slim jobs: room for the Storybook build, then the rest of the run', () => {+ it('waits in two jobs: room for the Storybook build, then the rest of the run', () => {const room = ci.jobs.room;expect(Object.keys(ci.jobs).slice(0, 2)).toEqual(['room', 'admission']);for (const job of [room, admission]) {- expect(job['runs-on']).toBe('ubuntu-slim');+ // A pull request waits on a slim runner; a dispatch, whose wait can+ // outlast a slim job's fifteen-minute cap, on a standard one.+ expect(job['runs-on']).toBe(+ "${{ github.event_name == 'workflow_dispatch' && 'ubuntu-latest' || 'ubuntu-slim' }}",+ );expect(stepOf(job).uses).toBe('./.ci-admission/.github/actions/ci-admission',);@@ -231,10 +237,13 @@ describe('where runs wait', () => {expect(limit(admission['timeout-minutes'], 'pull_request'),).toBeLessThanOrEqual(15);- expect(limit(wait.with['max-wait-minutes'], 'workflow_dispatch')).toBe(15);- // A pull request looks twice; the rare main run every two minutes.+ // A main or release check waits until room, up to two hours, inside its+ // job's own limit; a pull request at most twelve minutes.+ expect(limit(wait.with['max-wait-minutes'], 'workflow_dispatch')).toBe(120);+ expect(limit(wait.with['max-wait-minutes'], 'pull_request')).toBe(12);+ // A pull request looks twice; the rare main run about every four minutes.expect(limit(wait.with['max-looks'], 'pull_request')).toBe(2);- expect(limit(wait.with['max-looks'], 'workflow_dispatch')).toBe(8);+ expect(limit(wait.with['max-looks'], 'workflow_dispatch')).toBe(30);expect(admission.steps.filter(step => step !== wait)).toEqual([expect.objectContaining({name: 'Stop when CI is full'}),expect.objectContaining({uses: 'actions/checkout@v7'}),@@ -282,7 +291,13 @@ describe('where runs wait', () => {const step = stepOf(job);expect(step.uses).toBe('./.ci-admission/.github/actions/ci-admission');expect(step.with.main).toBe(true);- expect(step.with['max-wait-minutes']).toBeUndefined(); // fifteen+ // It waits until room, up to two hours, on a standard runner: a slim job+ // stops at fifteen minutes, which cancelled the whole run.+ expect(step.with['max-wait-minutes']).toBe(120);+ expect(step.with['max-looks']).toBe(30);+ expect(job['runs-on']).toBe('ubuntu-latest');+ expect(step['timeout-minutes']).toBeGreaterThan(120);+ expect(job['timeout-minutes']).toBeGreaterThan(step['timeout-minutes']);expect(step['continue-on-error']).toBe(true);expect(job.permissions.actions).toBe('read');// Directly, or through the lanes it joins.@@ -296,6 +311,75 @@ describe('where runs wait', () => {});});+describe('slim runners', () => {+ // GitHub stops a job on an `ubuntu-slim` runner at fifteen minutes, and the+ // run is cancelled. So no job that can land on one may plan to run longer.+ const SLIM_CAP_MINUTES = 15;+ const {labelsOf} = require('./lib/runner-labels.cjs');+ const TERNARY =+ /^\$\{\{\s*(.+?)\s*&&\s*'?([\w.-]+)'?\s*\|\|\s*'?([\w.-]+)'?\s*\}\}$/;+ /** A job's value on its slim branch: `cond && a || b`, as `runs-on` picks slim. */+ const onSlim = (job, value) => {+ if (value == null) return null;+ const runner = TERNARY.exec(String(job['runs-on']));+ const split = TERNARY.exec(String(value));+ if (!split) return Number(value);+ if (!runner || runner[1] !== split[1])+ throw new Error(`cannot tell which branch of ${value} runs on slim`);+ return Number(runner[2] === 'ubuntu-slim' ? split[2] : split[3]);+ };++ it('no job that can run on a slim runner plans past its fifteen-minute cap', () => {+ const files = fs+ .readdirSync(path.join(root, '.github/workflows'))+ .filter(file => file.endsWith('.yml'));+ let slimJobs = 0;+ for (const file of files) {+ const workflow = read(`.github/workflows/${file}`);+ for (const [id, job] of Object.entries(workflow.jobs ?? {})) {+ if (!labelsOf(job).includes('ubuntu-slim')) continue;+ slimJobs += 1;+ const timeout = onSlim(job, job['timeout-minutes']);+ if (timeout != null)+ expect(timeout, `${file} ${id}`).toBeLessThanOrEqual(+ SLIM_CAP_MINUTES,+ );+ // An admission wait, set or by default, must end before the cap+ // whether or not the job sets its own limit.+ for (const step of job.steps ?? []) {+ if (step.name !== STEP) continue;+ expect(+ onSlim(job, step.with?.['max-wait-minutes'] ?? 15),+ `${file} ${id} admission wait`,+ ).toBeLessThan(SLIM_CAP_MINUTES);+ }+ }+ }+ expect(slimJobs).toBeGreaterThan(0);+ });++ it("reads a slim job's own limit from the branch its runner takes", () => {+ expect(onSlim(ci.jobs.room, ci.jobs.room['timeout-minutes'])).toBe(15);+ expect(+ onSlim(+ ci.jobs['test-native-swift'],+ ci.jobs['test-native-swift']['timeout-minutes'],+ ),+ ).toBe(15);+ // The merge base's Main shape: slim, no job limit, the default wait.+ const oldMainCommit = {+ 'runs-on': 'ubuntu-slim',+ steps: [{name: STEP, with: {main: true}}],+ };+ expect(+ onSlim(+ oldMainCommit,+ oldMainCommit.steps[0].with['max-wait-minutes'] ?? 15,+ ),+ ).toBe(15);+ });+});+describe('peaks', () => {it('gives a release-check a peak that covers every job it can hold at once', () => {// A release-check runs the jobs its join needs. A job every leg needs@@ -1363,6 +1447,26 @@ describe('ci admission', () => {expect(result.lookTimes[1]).toBeGreaterThan(11 * 60_000);});+ it("yields to a waiting main run only for that wait's first fifteen minutes", async () => {+ const mainSince = minutes => {+ const run = waitingRun(70, {event: 'workflow_dispatch'});+ run.jobs[0].steps[0].started_at = new Date(+ Date.now() - minutes * 60_000,+ ).toISOString();+ return run;+ };+ // Fourteen minutes in, a pull-request run that would fit still yields.+ expect(+ (await admit({active: () => [mainSince(14)], maxWait: 12, maxLooks: 2}))+ .looks,+ ).toBeGreaterThan(1);+ // Sixteen minutes in, it starts at once; the main run still counts its peak.+ expect(+ (await admit({active: () => [mainSince(16)], maxWait: 12, maxLooks: 2}))+ .looks,+ ).toBe(1);+ });+it('lets a waiting main run go first, counting its whole peak; never waits for a pull-request run', async () => {const mainWaiting = waitingRun(70, {event: 'workflow_dispatch'});const held = await admit({diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex e3764eafa8..b1bd45909e 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -94,7 +94,8 @@ concurrency:jobs:# Admit the whole run under CI's ceiling of about ninety concurrent jobs- # (spec:AST-030 FR16, DEC-16), in two slim jobs: `room` waits until the+ # (spec:AST-030 FR16, DEC-16), in two jobs (slim on a pull request, standard+ # on a dispatch): `room` waits until the# Storybook build has room and starts it, and `admission` waits for the rest# of the run unless it already fit. Every job here but build-storybook and# ci-full needs admission, directly or through the jobs it needs, so a@@ -112,8 +113,10 @@ jobs:# whether the whole run fit on that look. A pull-request run finding ten# others already waiting, and no room, is turned away: CI is full.if: (github.event_name != 'pull_request' || !github.event.pull_request.draft && (github.event.pull_request.head.repo.full_name == github.repository || contains(github.event.pull_request.labels.*.name, 'ci:run')))- runs-on: ubuntu-slim- timeout-minutes: ${{ github.event_name == 'workflow_dispatch' && 20 || 15 }}+ # A dispatch (a main or release check) may wait longer than a slim job's+ # fifteen-minute cap, so it waits on a standard runner (spec:AST-030 DEC-16).+ runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-latest' || 'ubuntu-slim' }}+ timeout-minutes: ${{ github.event_name == 'workflow_dispatch' && 130 || 15 }}permissions:actions: readcontents: read@@ -135,20 +138,22 @@ jobs:id: roomuses: ./.ci-admission/.github/actions/ci-admissioncontinue-on-error: true- timeout-minutes: ${{ github.event_name == 'workflow_dispatch' && 16 || 13 }}+ timeout-minutes: ${{ github.event_name == 'workflow_dispatch' && 125 || 13 }}with:phase: roompeak: ${{ github.event_name == 'workflow_dispatch' && 39 || 16 }}main: ${{ github.event_name == 'workflow_dispatch' }}- max-wait-minutes: ${{ github.event_name == 'workflow_dispatch' && 15 || 12 }}- max-looks: ${{ github.event_name == 'workflow_dispatch' && 8 || 2 }}+ max-wait-minutes: ${{ github.event_name == 'workflow_dispatch' && 120 || 12 }}+ max-looks: ${{ github.event_name == 'workflow_dispatch' && 30 || 2 }}label-legs: '{"ci:run-visual": 6, "ci:run-rtl": 9, "ci:run-a11y": 3}'admission:needs: [room]if: (github.event_name != 'pull_request' || !github.event.pull_request.draft && (github.event.pull_request.head.repo.full_name == github.repository || contains(github.event.pull_request.labels.*.name, 'ci:run')))- runs-on: ubuntu-slim- timeout-minutes: ${{ github.event_name == 'workflow_dispatch' && 20 || 15 }}+ # A dispatch (a main or release check) may wait longer than a slim job's+ # fifteen-minute cap, so it waits on a standard runner (spec:AST-030 DEC-16).+ runs-on: ${{ github.event_name == 'workflow_dispatch' && 'ubuntu-latest' || 'ubuntu-slim' }}+ timeout-minutes: ${{ github.event_name == 'workflow_dispatch' && 130 || 15 }}permissions:actions: readcontents: read@@ -172,7 +177,7 @@ jobs:id: restuses: ./.ci-admission/.github/actions/ci-admissioncontinue-on-error: true- timeout-minutes: ${{ github.event_name == 'workflow_dispatch' && 16 || 13 }}+ timeout-minutes: ${{ github.event_name == 'workflow_dispatch' && 125 || 13 }}with:phase: restfits: ${{ needs.room.outputs.fits }}@@ -181,8 +186,8 @@ jobs:next: ${{ needs.room.outputs.next }}peak: ${{ github.event_name == 'workflow_dispatch' && 39 || 16 }}main: ${{ github.event_name == 'workflow_dispatch' }}- max-wait-minutes: ${{ github.event_name == 'workflow_dispatch' && 15 || 12 }}- max-looks: ${{ github.event_name == 'workflow_dispatch' && 8 || 2 }}+ max-wait-minutes: ${{ github.event_name == 'workflow_dispatch' && 120 || 12 }}+ max-looks: ${{ github.event_name == 'workflow_dispatch' && 30 || 2 }}label-legs: '{"ci:run-visual": 6, "ci:run-rtl": 9, "ci:run-a11y": 3}'# A pull-request run that waited its longest while another started at@@ -1054,7 +1059,9 @@ jobs:needs: [heavy-ci, native-swift-runner]if: ${{ (github.event_name != 'pull_request' || !github.event.pull_request.draft && (github.event.pull_request.head.repo.full_name == github.repository || contains(github.event.pull_request.labels.*.name, 'ci:run'))) && (!cancelled() && needs.heavy-ci.outputs.deferred != 'true' && (github.event_name != 'workflow_dispatch' && always() && !cancelled())) }}runs-on: ${{ needs.native-swift-runner.outputs.applies == 'true' && 'macos-15' || 'ubuntu-slim' }}- timeout-minutes: 30+ # The slim branch only reports that Swift is out of scope; a slim job+ # stops at fifteen minutes.+ timeout-minutes: ${{ needs.native-swift-runner.outputs.applies == 'true' && 30 || 15 }}permissions:contents: readsteps:diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.ymlindex d7c2b2045e..c01658f095 100644--- a/.github/workflows/deploy.yml+++ b/.github/workflows/deploy.yml@@ -43,7 +43,10 @@ jobs:# `main` itself could straddle a merge, shard different file lists, and skip# a file in every leg.main-commit:- runs-on: ubuntu-slim+ # Its admission wait may outlast a slim job's fifteen-minute cap, so it+ # runs on a standard runner (spec:AST-030 DEC-16).+ runs-on: ubuntu-latest+ timeout-minutes: 130permissions:# actions: read lets the admission step count CI's live jobs.actions: read@@ -109,12 +112,16 @@ jobs:- name: Wait for room under the CI ceilinguses: ./.ci-admission/.github/actions/ci-admissioncontinue-on-error: true- timeout-minutes: 16+ timeout-minutes: 125with:# A push runs only the fast checks (main-commit, sync-exports,# typecheck, test); a dispatched unit run holds every leg.peak: ${{ github.event_name == 'push' && 4 || 14 }}main: true+ # It waits for room, up to its own job's limit, looking about every+ # four minutes, and never yields to a pull-request run.+ max-wait-minutes: 120+ max-looks: 30# Verify package.json exports match the source tree.# Fails if exports are stale — run `node scripts/sync-exports.js` locally to fix.diff --git a/docs/specs/AST-030/spec.md b/docs/specs/AST-030/spec.mdindex e84dfbc53c..2ed811a8ab 100644--- a/docs/specs/AST-030/spec.md+++ b/docs/specs/AST-030/spec.md@@ -391,10 +391,11 @@ they are separately named.start, except the CI workflow's Storybook build, which starts as soon as thereis room for it while every job that uses it waits for room for the run: itstarts once the other active runs' estimated jobs plus its own most fit under- about ninety, and a pull-request run also waits while a `main` full check,- release re-check or baseline capture is waiting, looking twice on a pull- request, at once and after twelve minutes, and every two minutes for at most- fifteen for `main` (DEC-16); a pull-request run that would fit but waits for a+ about ninety, and a pull-request run also waits, for that wait's first+ fifteen minutes, while a `main` full check, release re-check or baseline+ capture is waiting, looking twice on a pull+ request, at once and after twelve minutes, and about every four minutes for+ up to two hours for `main`, whose wait runs on a standard runner (DEC-16); a pull-request run that would fit but waits for a`main` check looks again every two minutes while it does, and a run within tenjobs of room every four minutes, inside its longest wait. At most tenpull-request runs wait at once: one more that finds no room stops at once with@@ -627,7 +628,7 @@ The nightly perf lane is the one scheduled measurement outside them (FR18).| FR13 | classifier, workflow contract, component-analysis and RTL-scope tests | component change; shared module; Changeset beside code; infrastructure path; incomplete list; no build | an infrastructure path is scoped, a file-system guard test is skipped, a reverse dependent leaves visual/RTL or enters PR accessibility, or a full-suite event is narrowed || FR14 | `workflow-paths.test.mjs` over every workflow | path allowlist; required-context workflow | a `paths-ignore`, a match-all or exclusion glob, or a path filter on a workflow that reports a required context fails || FR15 | workflow contract and reconciler tests | ENGOWNER spec PR; owner command; other comment; fork review; non-spec PR; run over the request budget; maintainer dispatch; fork PR, code-only: an owner's exact-head approval plus the owner command clears the code half | `review-required` succeeds while spec approval is missing, another workflow publishes a review context, a fork review starts the spec checks, a non-command comment starts a runner, an over-budget run decides, or a fork's approved code-only PR stays pending after the owner command |-| FR16 | `heavy-caps-action.test.mjs` cap cases and heavy-job contract; `ci-admission.test.mjs` | sixteenth-oldest PR; 101st heavy run of the day, beside cancelled, light and other-branch runs; agent lane and its five-PR and forty-run backstops; an engineering owner, including the shared login past those backstops, a commented-out or trailing-comment handle and an unreadable roster; bot; the deciding run; re-run; failed lookup; a run with room, without room, past its longest wait, beside a waiting `main` check, as a draft or unlabelled fork, with opt-in labels, beside small workflows past their measured most, and with the API unreadable; each workflow's most jobs; every required context's rule | a heavy suite that runs ahead of the author's fifteen oldest PRs, or past the daily cap, a capped job that passes, an engineering owner or a re-run that is held, or a roster read from the pull request's head, a run that starts without room before its longest wait, a pull-request run that starts while `main` waits, a job admission could skip, or a peak below the jobs its run holds fails |+| FR16 | `heavy-caps-action.test.mjs` cap cases and heavy-job contract; `ci-admission.test.mjs` | sixteenth-oldest PR; 101st heavy run of the day, beside cancelled, light and other-branch runs; agent lane and its five-PR and forty-run backstops; an engineering owner, including the shared login past those backstops, a commented-out or trailing-comment handle and an unreadable roster; bot; the deciding run; re-run; failed lookup; a run with room, without room, past its longest wait, beside a waiting `main` check, as a draft or unlabelled fork, with opt-in labels, beside small workflows past their measured most, and with the API unreadable; each workflow's most jobs; every required context's rule | a heavy suite that runs ahead of the author's fifteen oldest PRs, or past the daily cap, a capped job that passes, an engineering owner or a re-run that is held, or a roster read from the pull request's head, a run that starts without room before its longest wait, a pull-request run that starts while `main` has waited under fifteen minutes, a job admission could skip, a peak below the jobs its run holds, or a job on a slim runner planned past its fifteen-minute cap fails || FR16 | `ci-admission.test.mjs` cases for one start at the longest wait at a time and the workflow contract | a pull-request run at its longest wait alone, within ten minutes of another pull-request run's start there and after them, behind a run that waited longer and ahead of a younger one; another run that found room earlier, a fork's stopped run and a `main` run that waited its longest; a `main` run and a merge-queue entry at their longest wait; the rest of a run whose Storybook build found room; ten runs out of time together; the required contexts and ci-full for either wait | two pull-request runs start at their longest wait within ten minutes, a younger run starts ahead of a longer waiter, a `main` run or merge-queue entry stops, a run CI is full for builds, or a required context passes or skips || FR17 | `ci-pr-gate.test.mjs` over every `pull_request` workflow and the shared conditions | branch here, fork with and without `ci:run`, another label, draft with the label, ready, push, merge group, dispatch | a job that can start on a pull request without the condition, a label trigger, a required job that skips for a pull request that may not run CI, or a draft or unlabelled fork that runs fails || FR18 | `perf-nightly-workflow.test.mjs`, `perf-trend.test.mjs` and `run-labels.test.mjs` | nightly and dispatch; labelled, unlabelled, draft and unvouched-fork pull requests; write, read and no access; newest label event; failed lookup; 10% boundary; metric floors; seven-day window edges; fewer than three runs; a metric over once, twice in a row, or a different metric before; recorded and pull request runs | a run on an unlabelled pull request, a label honoured from read access, a regression called at exactly 10%, under its floor or on one run alone, a run outside the window in the baseline, a pull request run that records, or a second regression issue fails |@@ -960,10 +961,12 @@ spend a low API budget. A `main` full check, release re-check or baselinecapture (every dispatch of the CI workflow) goes first: while one waits,pull-request runs wait too, their Storybook builds included. A pull-request runthat would fit and waits only for a `main` check looks again every two minutes-until it starts, since `main` waits are short. The extra looks happen only while-CI is near full or `main` waits. Every job ends within its fifteen-minute-budget, so `main` fits within fifteen minutes. Nothing is reserved for `main`-outside those minutes. At most ten pull-request runs wait at once, counting+until it starts. It yields that way only during the `main` check's first fifteen minutes of waiting. A longer `main` wait still counts its whole peak, so a pull-request run starts only when it fits beside that peak. While `main` waits, the pull-request runs that do not fit start one per ten minutes at their longest wait and the rest stop with "CI is full", for up to the two-hour wait. The extra looks happen only while+CI is near full or `main` waits. Every pull-request job ends within its+fifteen-minute budget, so `main` usually fits within fifteen minutes. A `main`+run still waits until there is room, up to two hours, and its waiting job runs+on a standard runner: a slim runner stops a job at fifteen minutes and so cancels the whole run. Nothing is+reserved for `main` outside its wait. At most ten pull-request runs wait at once, countingpull-request runs only; one more that finds no room stops at once, "CI is full:re-run all jobs or push later", rather than add a waiting job to a full CI. Apull-request run still without room at its longest wait looks once more, at a@@ -977,8 +980,8 @@ one at a time instead of together. A `main` run is never stopped.CI can still pass ninety in five bounded ways, the first three rare:-- A run that has waited its longest (fifteen minutes for `main`, twelve for a- pull request) starts whatever the load, even while a `main` check waits, at+- A run that has waited its longest (two hours for `main`, twelve minutes for+ a pull request) starts whatever the load, even while a `main` check waits, atmost one pull-request run in ten minutes. That happens when a job outlivesits budget, such as the thirty-minute macOS Swift job, or when a `main` checkheld the waiting runs until their longest waits; CI is over by at most one@@ -989,10 +992,10 @@ CI can still pass ninety in five bounded ways, the first three rare:- A run starts when the GitHub API cannot be read, a rate limit included. It isover by at most its own jobs.- A waiting run's own waiting job starts before it finds room; its Storybook- build starts only once there is room for it. CI is over by at most one slim- job per waiting run: at most ten for pull requests, plus one for each waiting- merge-queue entry and `main` run, which are never turned away, for at most a- wait (twelve minutes for a pull request, fifteen for `main`).+ build starts only once there is room for it. CI is over by at most one+ waiting job per waiting run: at most ten for pull requests, plus one for each+ waiting merge-queue entry and `main` run, which are never turned away, for at+ most a wait (twelve minutes for a pull request, two hours for `main`).- Small workflows can run more jobs at once than the eighteen counted for them:they peaked at twenty in a day's runs, two over, while their jobs ran.