Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

ci: main's full unit run starts every leg at once, six UI and six Node legs, and a dispatch can name its commit (AST-030 FR22) (#9207)

Cindy Zhanga55352c1a1e0
diff --git a/.github/scripts/main-validation-workflow.test.mjs b/.github/scripts/main-validation-workflow.test.mjs
new file mode 100644
index 0000000000..8edc4c3ece
--- /dev/null
+++ b/.github/scripts/main-validation-workflow.test.mjs
@@ -0,0 +1,239 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/**
+ * @file Main's full unit run: its leg plan and its dispatch inputs.
+ * @input The Main workflow (deploy.yml) and a mocked GitHub API
+ * @output The shard plan every leg of a main validation runs, the commit a
+ * dispatch validates, and which dispatch may take the validation group
+ * @position Node contracts for spec:AST-030 FR22. The
+ * Vitest routing over the same lanes is pinned in ci-test-routing.test.mjs.
+ */
+
+import fs from 'node:fs';
+import {describe, expect, it} from 'vitest';
+import yaml from 'yaml';
+
+const AsyncFunction = Object.getPrototypeOf(async () => {}).constructor;
+const workflow = yaml.parse(
+ fs.readFileSync(new URL('../workflows/deploy.yml', import.meta.url), 'utf8'),
+);
+const TIP = 'a'.repeat(40);
+const OLDER = 'b'.repeat(40);
+
+describe('main validation legs', () => {
+ it.each([
+ ['test-ui', 6],
+ ['test-node', 6],
+ ])('%s runs %i legs at once, each inside the job budget', (lane, legs) => {
+ const job = workflow.jobs[lane];
+ expect(job.strategy.matrix.shard).toEqual(
+ Array.from({length: legs}, (_, index) => index + 1),
+ );
+ // No hold: every leg starts when the run does.
+ expect(job.strategy['max-parallel']).toBeUndefined();
+ expect(job.strategy['fail-fast']).toBe(false);
+ expect(job['timeout-minutes']).toBe(15);
+ expect(job['runs-on']).toBe('ubuntu-latest');
+ });
+});
+
+describe('main validation dispatch', () => {
+ const inputs = workflow.on.workflow_dispatch.inputs;
+
+ it('takes an optional exact commit and a re-check flag', () => {
+ expect(inputs.sha).toMatchObject({type: 'string', required: false});
+ expect(inputs.recheck).toMatchObject({type: 'boolean', default: false});
+ expect(Object.keys(inputs).sort()).toEqual(['recheck', 'sha']);
+ });
+
+ /** The concurrency group and cancel rule GitHub would compute for an event. */
+ function concurrencyFor({
+ event = 'workflow_dispatch',
+ sha = '',
+ recheck = false,
+ actor = 'github-actions[bot]',
+ }) {
+ const evaluate = expression =>
+ Function(
+ 'github',
+ 'inputs',
+ 'format',
+ `return (${expression.replace(/^\$\{\{\s*|\s*\}\}$/g, '')});`,
+ )(
+ {event_name: event, triggering_actor: actor, run_id: 77},
+ event === 'workflow_dispatch' ? {sha, recheck} : {},
+ (text, ...args) => text.replace(/\{(\d+)\}/g, (_, i) => args[i]),
+ );
+ return {
+ group: evaluate(workflow.concurrency.group),
+ cancel: Boolean(evaluate(workflow.concurrency['cancel-in-progress'])),
+ };
+ }
+
+ it('keeps one validation of main at a time, and lets only a workflow-token re-check cancel it', () => {
+ for (const event of ['push', 'workflow_dispatch'])
+ expect(concurrencyFor({event})).toEqual({
+ group: 'main-validation',
+ cancel: false,
+ });
+ expect(concurrencyFor({recheck: true})).toEqual({
+ group: 'main-validation',
+ cancel: true,
+ });
+ // A person's re-check waits like any other validation.
+ expect(concurrencyFor({recheck: true, actor: 'someone'})).toEqual({
+ group: 'main-validation',
+ cancel: false,
+ });
+ });
+
+ it('runs a dispatch that names a commit in a group of its own, which cancels and replaces nothing', () => {
+ for (const recheck of [false, true]) {
+ const {group, cancel} = concurrencyFor({sha: OLDER, recheck});
+ expect(group).toBe('main-validation-sha-77');
+ expect(cancel).toBe(false);
+ }
+ });
+
+ // The commit of #9164, from which main keeps the size records the typecheck
+ // lane writes.
+ const FLOOR = /const FLOOR = '([0-9a-f]{40})';/.exec(
+ workflow.jobs['main-commit'].steps[0].with.script,
+ )?.[1];
+
+ async function resolve({
+ eventName,
+ sha = '',
+ status = 'ahead',
+ recorded = 'ahead',
+ }) {
+ const calls = [];
+ const github = {
+ rest: {
+ repos: {
+ getBranch: async () => ({data: {commit: {sha: TIP}}}),
+ compareCommitsWithBasehead: async ({basehead}) => {
+ calls.push(basehead);
+ // `<floor>...<sha>` asks whether the commit has the size records.
+ return {
+ data: {
+ status: basehead.startsWith(`${FLOOR}...`) ? recorded : status,
+ },
+ };
+ },
+ },
+ },
+ };
+ const outputs = {};
+ const core = {setOutput: (name, value) => (outputs[name] = value)};
+ const context = {
+ eventName,
+ sha: OLDER,
+ repo: {owner: 'meta', repo: 'astryx'},
+ payload: {inputs: {sha}},
+ };
+ const script = workflow.jobs['main-commit'].steps[0].with.script;
+ await new AsyncFunction('github', 'context', 'core', script)(
+ github,
+ context,
+ core,
+ );
+ return {sha: outputs.sha, calls};
+ }
+
+ it('validates the pushed commit on a push', async () => {
+ expect(await resolve({eventName: 'push'})).toEqual({sha: OLDER, calls: []});
+ });
+
+ it("validates main's tip on a dispatch without a commit", async () => {
+ expect(await resolve({eventName: 'workflow_dispatch'})).toEqual({
+ sha: TIP,
+ calls: [],
+ });
+ });
+
+ it.each(['identical', 'ahead'])(
+ "validates a requested commit in main's history (%s)",
+ async status => {
+ expect(
+ await resolve({eventName: 'workflow_dispatch', sha: OLDER, status}),
+ ).toEqual({
+ sha: OLDER,
+ calls: [`${OLDER}...${TIP}`, `${FLOOR}...${OLDER}`],
+ });
+ },
+ );
+
+ it.each(['behind', 'diverged'])(
+ "refuses a commit outside main's history (%s)",
+ async status => {
+ await expect(
+ resolve({eventName: 'workflow_dispatch', sha: OLDER, status}),
+ ).rejects.toThrow("is not in main's history");
+ },
+ );
+
+ it('refuses a commit from before the size records, naming why', async () => {
+ expect(FLOOR).toMatch(/^[0-9a-f]{40}$/);
+ // A commit between the package-size script (#9161) and the size records
+ // (#9164) is behind the floor, and is refused.
+ for (const recorded of ['behind', 'diverged']) {
+ await expect(
+ resolve({eventName: 'workflow_dispatch', sha: OLDER, recorded}),
+ ).rejects.toThrow('predates the size records');
+ }
+ expect(
+ (
+ await resolve({
+ eventName: 'workflow_dispatch',
+ sha: FLOOR,
+ recorded: 'identical',
+ })
+ ).sha,
+ ).toBe(FLOOR);
+ });
+
+ it('names a run that validates an older commit after that commit', () => {
+ const name = workflow['run-name'];
+ const evaluate = (event, sha) =>
+ Function(
+ 'github',
+ 'inputs',
+ 'format',
+ `return (${name.replace(/^\$\{\{\s*|\s*\}\}$/g, '')});`,
+ )({event_name: event}, {sha}, (text, value) =>
+ text.replace('{0}', value),
+ );
+ expect(evaluate('workflow_dispatch', OLDER)).toBe(
+ `Main validation of ${OLDER}`,
+ );
+ // An empty name keeps GitHub's default for every other run.
+ expect(evaluate('workflow_dispatch', '')).toBe('');
+ expect(evaluate('push', undefined)).toBe('');
+ });
+
+ it('checks every lane, sync-exports included, out at the resolved commit', () => {
+ for (const lane of ['sync-exports', 'test-ui', 'test-node', 'typecheck']) {
+ const job = workflow.jobs[lane];
+ expect([job.needs].flat(), lane).toContain('main-commit');
+ expect(
+ job.steps.find(step => step.uses?.startsWith('actions/checkout@')).with
+ .ref,
+ lane,
+ ).toBe('${{ needs.main-commit.outputs.sha }}');
+ }
+ });
+
+ // Only spaces would otherwise read as no commit, yet run in a group of its own.
+ it.each([
+ 'abc123',
+ 'B'.repeat(40),
+ `${OLDER} `.repeat(2),
+ ' ',
+ ` ${OLDER}`,
+ ])('refuses a commit that is not a full SHA (%s)', async sha => {
+ await expect(
+ resolve({eventName: 'workflow_dispatch', sha}),
+ ).rejects.toThrow('full 40-character commit SHA');
+ });
+});
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 837cd88555..5ff9cd6036 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -3,21 +3,41 @@
# Validate every push to main. Stable docs, Storybook, and Sandbox deploy through
# the Vercel project; this workflow preserves the post-merge test gates only.
name: Main
+# A run that validates an older commit is named for it, so it never reads as a
+# check of main's tip; every other run keeps its default name.
+run-name: "${{ github.event_name == 'workflow_dispatch' && inputs.sha != '' && format('Main validation of {0}', inputs.sha) || '' }}"
on:
push:
branches: ['main']
workflow_dispatch:
+ inputs:
+ sha:
+ description: "Full SHA of a commit in main's history from #9164 on to validate; empty validates main's tip"
+ type: string
+ required: false
+ recheck:
+ description: "Release re-check of main's tip, sent by the release re-check workflow: takes the validation group at once"
+ type: boolean
+ default: false
permissions: {}
+# One validation of main at a time; a newer one waits and replaces any older
+# waiting one. A dispatch that names `sha` validates an older commit in a group
+# of its own, so it never replaces or cancels main's validations. Only a release
+# re-check, which the release re-check workflow sends with the workflow token
+# and without `sha`, cancels the running validation: it is itself a full
+# validation of main's tip, so the cancelled run's commits stay covered
+# (spec:AST-030 FR22).
concurrency:
- group: 'main-validation'
- cancel-in-progress: false
+ group: "${{ github.event_name == 'workflow_dispatch' && inputs.sha != '' && format('main-validation-sha-{0}', github.run_id) || 'main-validation' }}"
+ cancel-in-progress: ${{ github.event_name == 'workflow_dispatch' && inputs.recheck && inputs.sha == '' && github.triggering_actor == 'github-actions[bot]' }}
jobs:
# The one commit every lane and leg of this run tests. A push validates the
- # pushed commit; a dispatch, main's tip when it starts. Each leg resolving
+ # pushed commit; a dispatch, its `sha` input when given (it must be in main's
+ # history), else main's tip when it starts. Each leg resolving
# `main` itself could straddle a merge, shard different file lists, and skip
# a file in every leg.
main-commit:
@@ -36,17 +56,47 @@ jobs:
if (context.eventName !== 'push') {
const {data} = await github.rest.repos.getBranch({...context.repo, branch: 'main'});
sha = data.commit.sha;
+ // Not trimmed: the concurrency group reads the raw input, so a
+ // value of only spaces must fail here, not validate the tip.
+ const requested = context.payload.inputs?.sha ?? '';
+ if (requested !== '') {
+ if (!/^[0-9a-f]{40}$/.test(requested)) {
+ throw new Error(`sha must be a full 40-character commit SHA, got "${requested}".`);
+ }
+ const {data: comparison} = await github.rest.repos.compareCommitsWithBasehead({
+ ...context.repo,
+ basehead: `${requested}...${sha}`,
+ });
+ if (!['identical', 'ahead'].includes(comparison.status)) {
+ throw new Error(`${requested} is not in main's history.`);
+ }
+ // The typecheck lane keeps this commit's size records, which
+ // needs main's size-record scripts (the commit of #9164 and
+ // later); an older commit cannot run that lane.
+ const FLOOR = 'f0039ff70521b4f51a2a64ea15f2b687e6374482';
+ const {data: since} = await github.rest.repos.compareCommitsWithBasehead({
+ ...context.repo,
+ basehead: `${FLOOR}...${requested}`,
+ });
+ if (!['identical', 'ahead'].includes(since.status)) {
+ throw new Error(`${requested} predates the size records this run's typecheck lane keeps; validate a later commit.`);
+ }
+ sha = requested;
+ }
}
core.setOutput('sha', sha);
# Verify package.json exports match the source tree.
# Fails if exports are stale — run `node scripts/sync-exports.js` locally to fix.
sync-exports:
+ needs: [main-commit]
runs-on: ubuntu-slim
permissions:
contents: read
steps:
- uses: actions/checkout@v7
+ with:
+ ref: ${{ needs.main-commit.outputs.sha }}
- name: Check package.json exports are in sync
run: node scripts/sync-exports.js --check
@@ -64,15 +114,21 @@ jobs:
# typecheck needs the `pnpm build` it follows, so they stay together in
# their own lane and take the build with them.
#
- # Both Vitest lanes split into four legs, as in ci.yml: one job each ran
- # test-ui in ~18 minutes and test-node in ~28, so main's gate took about half
- # an hour while the PR gate took under fifteen. `test` joins the legs.
+ # Both Vitest lanes split into legs that all run at once, with no
+ # max-parallel hold: a validation of main may cost more runner-minutes to
+ # finish sooner, so the release train can re-check a fix within minutes
+ # (spec:AST-030 FR22, DEC-17). At four legs each, test-node's slowest leg took ~8 minutes
+ # and test-ui's ~6. Six legs each bring every leg near the typecheck lane
+ # (~5 minutes); the leg that holds the longest Node test file (~6 minutes on
+ # its own) sets the floor, and more legs would not move it. `test` joins the
+ # legs.
test-ui:
needs: [main-commit]
+ timeout-minutes: 15
strategy:
fail-fast: false
matrix:
- shard: [1, 2, 3, 4]
+ shard: [1, 2, 3, 4, 5, 6]
runs-on: ubuntu-latest
permissions:
contents: read
@@ -94,10 +150,11 @@ jobs:
test-node:
needs: [main-commit]
+ timeout-minutes: 15
strategy:
fail-fast: false
matrix:
- shard: [1, 2, 3, 4]
+ shard: [1, 2, 3, 4, 5, 6]
# Vitest runs one test file per CPU beyond the first, so the 2-core runner
# ran this suite one file at a time (~23 min). Four cores give it three.
runs-on: ubuntu-latest
diff --git a/docs/specs/AST-030/spec.md b/docs/specs/AST-030/spec.md
index 02339679b5..3f05294096 100644
--- a/docs/specs/AST-030/spec.md
+++ b/docs/specs/AST-030/spec.md
@@ -362,6 +362,18 @@ they are separately named.
minutes added to time to green. A flag asks the reviewer to weigh the cost;
it fails no check.
+- **FR22 — Main's full unit run finishes in minutes.** The Main workflow runs
+ every Vitest leg of `main`'s full unit run at once, with no `max-parallel`
+ hold: six UI legs and six Node legs beside the build-and-typecheck lane, each
+ inside the fifteen-minute job budget (DEC-17). A dispatch may name `sha`, a
+ commit in `main`'s history that has the size records the build lane keeps, and
+ every lane checks that commit out; without it the run validates `main`'s tip.
+ A `sha` run waits for nothing and replaces nothing. One validation of `main`
+ runs at a time and a newer one waits. Only a release re-check, which the
+ workflow token sends with `recheck` and no `sha`, cancels the running
+ validation, because the re-check validates `main`'s tip in full itself.
+ Pull-request legs keep their shape.
+
### Platform support
- Supported feature/engine floor: GitHub pull-request and merge-group workflows
@@ -397,22 +409,23 @@ read change (FR14).
## Verification
-| Contract | Verification | Representative states | Mutation or failure expectation |
-| -------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| FR1–FR2 | classifier unit tests expose the surface set | knowledge; docsite; admitted tool; Core/Lab/Charts/Rich Text/Vega source; shared config; unknown | an unclassified path receives a specialized lane or a category has no check owner |
-| FR3–FR4 | workflow contract tests execute an isolated trusted-base classifier | valid base; missing merge base; missing matcher/registry; classifier self-change; merge group | PR-controlled policy grants a lane, or missing trust data skips checks |
-| FR5 | mixed-surface and incomplete-owner routing tests | spec+component; tooling+component; named surface without admitted lane; docsite+shared | one surface hides another owner or a named-but-incomplete surface skips broad CI |
-| FR6–FR8 | Node-tooling dependency, CI workflow, and trusted post-CI workflow tests | both admitted score-ledger paths; Sandbox projection imports; test/build joins; preview/visual publisher | UI/browser/build work or preview publication runs for the singleton tool set, an operational consumer is untested, a visual status stays pending, or a required context disappears |
-| FR9 | mutation-sensitive classifier and workflow fixtures | unknown path; rename from unknown; truncated list; package-specific public paths | weakening a fail-closed rule leaves the suite green |
-| FR10 | surface-admission and routing contract tests | existing surface; proposed surface with and without the full admission contract | a new surface adds lanes without its approved paths, commands, ownership, projections, and routing tests |
-| FR11 | surface owner, internal-job, and required-join contract tests | Build package browser behavior; CLI; theme-family broad fallback; mixed Core+CLI | a second owner is routed for one surface, an internal job masquerades as a lane, an owned failure misses its join, or an unrelated owner runs |
-| FR12 | Storybook visual-plan, canonical workflow, and repository-owner guard tests | PR scope; full-plan maintenance; report-only publication; deployment/a11y/RTL/vibe artifacts | another workflow captures or compares pixels, a renamed or aliased owner escapes the guard, or legitimate non-visual artifacts are rejected |
-| 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 | `review-required` succeeds while spec approval is missing, another workflow publishes a review context, a fork review starts the spec checks, or a non-command comment starts a runner |
-| FR16 | `heavy-caps-action.test.mjs` cap cases and heavy-job contract | 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 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 fails |
-| 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 |
-| FR19 | `ci-impact.test.mjs`, `pr-preview.test.mjs` and the maintenance template | CI change and non-CI change; standard, non-standard and expression runners; added, removed and changed jobs; trigger change | a CI change reports no impact, a move onto a non-standard runner or a pool or time-to-green rise past its threshold goes unflagged, or the section names a price |
+| Contract | Verification | Representative states | Mutation or failure expectation |
+| -------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| FR1–FR2 | classifier unit tests expose the surface set | knowledge; docsite; admitted tool; Core/Lab/Charts/Rich Text/Vega source; shared config; unknown | an unclassified path receives a specialized lane or a category has no check owner |
+| FR3–FR4 | workflow contract tests execute an isolated trusted-base classifier | valid base; missing merge base; missing matcher/registry; classifier self-change; merge group | PR-controlled policy grants a lane, or missing trust data skips checks |
+| FR5 | mixed-surface and incomplete-owner routing tests | spec+component; tooling+component; named surface without admitted lane; docsite+shared | one surface hides another owner or a named-but-incomplete surface skips broad CI |
+| FR6–FR8 | Node-tooling dependency, CI workflow, and trusted post-CI workflow tests | both admitted score-ledger paths; Sandbox projection imports; test/build joins; preview/visual publisher | UI/browser/build work or preview publication runs for the singleton tool set, an operational consumer is untested, a visual status stays pending, or a required context disappears |
+| FR9 | mutation-sensitive classifier and workflow fixtures | unknown path; rename from unknown; truncated list; package-specific public paths | weakening a fail-closed rule leaves the suite green |
+| FR10 | surface-admission and routing contract tests | existing surface; proposed surface with and without the full admission contract | a new surface adds lanes without its approved paths, commands, ownership, projections, and routing tests |
+| FR11 | surface owner, internal-job, and required-join contract tests | Build package browser behavior; CLI; theme-family broad fallback; mixed Core+CLI | a second owner is routed for one surface, an internal job masquerades as a lane, an owned failure misses its join, or an unrelated owner runs |
+| FR12 | Storybook visual-plan, canonical workflow, and repository-owner guard tests | PR scope; full-plan maintenance; report-only publication; deployment/a11y/RTL/vibe artifacts | another workflow captures or compares pixels, a renamed or aliased owner escapes the guard, or legitimate non-visual artifacts are rejected |
+| 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 | `review-required` succeeds while spec approval is missing, another workflow publishes a review context, a fork review starts the spec checks, or a non-command comment starts a runner |
+| FR16 | `heavy-caps-action.test.mjs` cap cases and heavy-job contract | 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 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 fails |
+| 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 |
+| FR19 | `ci-impact.test.mjs`, `pr-preview.test.mjs` and the maintenance template | CI change and non-CI change; standard, non-standard and expression runners; added, removed and changed jobs; trigger change | a CI change reports no impact, a move onto a non-standard runner or a pool or time-to-green rise past its threshold goes unflagged, or the section names a price |
+| FR22 | `main-validation-workflow.test.mjs` over the Main workflow and its commit resolver | six UI and six Node legs; dispatch without a commit, with a commit in main's history, with a commit outside it and with a malformed one; a re-check from the workflow token and from a person, and one that names `sha`; a `sha` before the size records, and one of only spaces | a hold, a leg past the fifteen-minute budget, a commit outside main's history that validates, a person's dispatch or a `sha` run that cancels or replaces a validation of main, a `sha` lane that checks out another commit, or a `sha` run named for main's tip fails |
## Decision log
@@ -620,6 +633,23 @@ quiet, so the check would starve); holding a runner to wait out each push (it
is billed while it waits); a daily check (main's result would lag a whole
day).
+### DEC-17 — Main's full runs spend runner-minutes to finish in minutes
+
+**Reference:** `spec:AST-030/DEC-17`
+**Decider:** `cixzhang`, `2026-10-31`
+
+A full check of `main` may cost more runner-minutes if it finishes sooner: the
+release train can then fix and re-check within minutes, and pull requests, which
+run far more often, carry the per-update cost. A full run starts every
+leg at once, with no `max-parallel` hold, on standard runners, and gets as many
+legs as shorten its slowest lane. Legs stop growing where one indivisible piece
+of work sets the floor, such as the longest test file. Pull requests keep their
+shape, which bounds the spend of each update.
+
+Rejected: larger runners for these lanes (measured no faster than the standard
+four-core runners); keeping four unit legs, whose slowest leg took about eight
+minutes.
+
## Open questions
None.