Skip to content

ci: release-specs (changed) runs the release specs a pull request reaches - #11044

Merged
cixzhang merged 12 commits into
mainfrom
ci/release-specs-changed
Nov 11, 2026
Merged

cixzhang merged 12 commits into
mainfrom
ci/release-specs-changed

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Who this helps

Anyone landing a change to a release spec (*.release.*.spec.ts) or to a module one imports. Release specs run in full only in the release check. On a pull request, the touched-components contract job plans a changed release spec, but it can report the spec as "not run" at its eight-minute budget and still pass. A broken or over-budget release spec could merge, and the release check found it after the fact.

This implements FR32's release-file and import triggers and DEC-29 (AST-030, records: #11052). FR32's other triggers come in a follow-up: specs tagged @pr-a11y release-only, components a spec visits, and Lab-only pull requests. Until then, FR32's gap line names them: this pull request updates that line in docs/specs/AST-030/spec.md (its text from Specs' #11116, folded in here).

What changes

ci.yml, two jobs:

release-specs-plan: on ubuntu-slim, behind the same pull-request gate and admission as pr-component-a11y-contracts.

  • It is path-scoped to package and harness sources (packages/*/src/, internal/) and the release specs. It reads the changed-file list.
  • New release-specs-plan.mjs names the release specs to run:
    • each one the change adds or changes;
    • each one that imports a changed module, followed file by file with the contract job's proofImporters, with the release specs as roots.
  • If the imports can't be followed, every release spec runs (fail closed).
  • If GitHub truncated the file list, the job fails and says to split the pull request, since a re-run can't help.

release-specs (changed): on 4-core-ubuntu, the runner the gating release check uses.

  • It starts only when the plan names a spec, so a pull request that triggers nothing never takes a paid runner.
  • It runs each planned spec in full, alone with --workers=1, against the head's Storybook build, with playwright.config.ts --project chromium.
  • It sets ASTRYX_TABLE_TIMING_GATE: '1', so timing budgets gate as on the release check's runner.
  • It has no time budget and no automatic retry: a timing-budget miss fails the job.
  • A planned spec outside the config's spec globs fails by name, since no release check would run it. The glob list comes from the workflow's commit.
  • Never drops a spec (FR32): a planned spec that the head lacks (main added it after the branch point) fails the step by name and asks for a merge of main.
  • Merge-guard waits for this job by name when a pull request triggers it.

Limits:

  • The plan step sets pipefail: a planner that throws fails release-specs-plan, never reads as "nothing to run".
  • The import walk sees modules a spec loads by import path. It does not see the component a spec opens as a Storybook page. A change to Table.tsx alone plans nothing, the same limit as the contract job's mapping.
  • It also does not follow workspace package imports outside packages/ (such as the interaction harness).
  • Editing today's release spec now runs it twice: once in the contract job's plan, and once in full here.

CI impact

CI impact: two new jobs.

  • release-specs-plan: on ubuntu-slim, for every pull request with a package or harness change; about 30 seconds (sparse checkout and the import walk).
  • release-specs (changed): on the paid 4-core-ubuntu pool. It starts only for a pull request that changes a release spec or a module one imports. Today that's one spec and its harness. Its fixture is a type-only import that the page loads, so the walk doesn't see it. It takes about 5 job-minutes per update (Storybook download, Playwright install, about 3 minutes of spec time).
  • Runner-pool usage: under a few runner-minutes a day, and average concurrent jobs rise by well under one.
  • Time to green: unchanged. The plan runs beside the other owners, and the spec job runs beside the test owners after the Storybook build.

Tests

Red-first: on main both files fail, since the jobs and the planner don't exist.

release-specs-plan.test.mjs runs on a scratch checkout with the real import graph:

  • a changed release spec runs;
  • a release spec runs when its harness changes, and when a module the harness imports changes (the import trigger);
  • a module no release spec imports plans nothing;
  • an import graph that can't be followed runs every release spec;
  • a deleted release spec runs nothing.

ci-release-specs.test.mjs:

  • the job name merge-guard waits for;
  • the plan runs on the slim runner behind the gate;
  • the planner starts from only the plan job's sparse checkout (it fails with ERR_MODULE_NOT_FOUND if scripts/lib is left out);
  • the 4-core job starts only on the plan's answer;
  • the plan's path scope;
  • the runner, config, timing gate and --workers=1;
  • the run step, executed in bash with a stub pnpm: an in-glob spec runs on one worker, a spec outside the config's globs exits 1 by name before Playwright starts, and a planned spec the head lacks (added on main after the branch point) exits 1 by name and asks for a merge of main, never dropped;
  • no budget or retry;
  • the truncated-list message;
  • a failing planner fails the plan step (red-first: without pipefail the step exits 0).

Existing contracts updated for the new jobs: ci-admission, ci-free-runners (the paid-pool allowance and its reason) and ci-test-routing (the plan reads the scope's file list).

In real CI, throwaway fixture #11045 ran on this job's first version, which selected changed release specs only, before the planner. It added one failing *.release.a11y.chromium.spec.ts and turned release-specs (changed) red in run 42851060485: the job ran exactly that spec on one worker, and the spec's failure failed the job. The fixture is closed. The planner's selection is covered by the unit tests above.

Writing rubric results

One knowledge record change: AST-030 FR32's gap line, copied verbatim from Specs' stamped #11116, which already carries its writing rubric results. Specs stamps its consistency with this job.

…nges

A changed *.release.*.spec.ts runs in full on the pull request, with the release check's spec-test contract runner (4-core-ubuntu), workers and Playwright config; a failing spec fails the job. Pull requests that change no release spec skip it.
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 11, 2026 4:33am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 10, 2026
@astracat-bot

astracat-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 11, 2026, 4:39 AM UTC

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 818b162

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.

CI impact: +0.2 job-min per update · pool +0.2% · time to green −9.2 min · non-standard runners · 6 CI action or script files changed (not measured) ⚠️
Before After Change
Job-minutes per PR update 85.8 86 +0.2
Runner pool, runner-minutes a day 41,048 41,120 +72 (+0.2%)
Average concurrent jobs 28.5 28.6 0
Time to green (median → this run) 28.5 min 19.3 min −9.2 min
Runs a day 478 478 0

Changed jobs: release-specs added: non-standard (4-core-ubuntu) · release-specs-plan added: standard

Not measured (the jobs that use these keep their recent minutes above): .github/scripts/ci-admission.test.mjs, .github/scripts/ci-free-runners.test.mjs, .github/scripts/ci-release-specs.test.mjs, .github/scripts/ci-test-routing.test.mjs, .github/scripts/release-specs-plan.mjs, .github/scripts/release-specs-plan.test.mjs.

Flags: release-specs moves onto a non-standard runner.

Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.


Generated by PR Enrichment workflow | View full report

A release spec judges timing, and the release check runs its timing specs alone on one worker; the pull request run matches.

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting on an engineering owner's decision, then changes.

Running each changed release spec in full in its own merge-blocking job is CI direction that AST-030 does not state: FR26 and FR31 cover Lab-only routing and interaction specs, FR12 and DEC-22 keep changed accessibility specs inside the contract job's eight-minute plan, and FR11 asks new coverage to join the existing owner rather than add a separately routed job. Approval needs an engineering owner to decide this direction, including whether the job blocks through the test join or through merge-guard by name, either by amending AST-030 or by commenting /approve-spec <full head SHA> on this pull request; the author may record it as an engineering owner.

These need fixing either way:

  • Paid runner on every run: the scope check runs inside the job, so every non-draft pull request takes a 4-core-ubuntu runner (this pull request's own run did, for 9 seconds, with no release spec changed), although ci-free-runners.test.mjs says ubuntu-latest has the same four vCPUs and main's bot-dispatched release checks run these contracts there; use ubuntu-latest, drop the PAID_ALLOWED entry and correct the CI impact line.
  • One-worker claim: the release check runs its contract legs with four workers (A11Y_CONTRACT_WORKERS: 4), so "the release check runs it alone" in ci.yml, the test and the description is wrong, and a timing budget that passes alone here can still fail there.
  • Overstated gap: the existing contract job already selects a changed release spec as "spec changed" and plans today's spec at the median recorded time, so narrow the description to a release spec the contract job leaves out and note that an edit to today's spec now runs twice.
  • Wrong citations: the job comment and the test's @position cite AST-030 FR26 and FR31, which govern Lab-only routing and interaction specs; cite the clause the decision lands on.
  • Miss: untested fail-closed edge: forcing the glob check's exit code to 0 (ci.yml:4912) leaves every test in ci-release-specs.test.mjs passing, because the test only looks for the text isA11ySpecFile, which AST-030 FR9 does not allow; run that check in bash on an out-of-glob release spec and expect exit 1.

[Automated review]

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
@cixzhang
cixzhang marked this pull request as ready for review November 10, 2026 16:09
A slim plan job names the release specs to run: each one the change adds or changes, and each one that imports a changed module; an import graph that cannot be followed runs them all, and a truncated file list asks for a split. The 4-core job starts only on a planned spec, runs it alone with the timing gate on, and has no budget or retry.
@cixzhang cixzhang changed the title ci: release-specs (changed) runs each release spec a pull request changes ci: release-specs (changed) runs the release specs a pull request reaches Nov 10, 2026
@cixzhang
cixzhang marked this pull request as draft November 10, 2026 17:31

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting on an engineering owner's decision, then changes.

Running each changed release spec, and each one a changed module reaches through its imports, in its own merge-blocking job is CI direction that AST-030 on main does not state yet: FR11, FR12 and DEC-22 keep changed accessibility specs inside the contract job and the test join, and FR32 and DEC-29 are still in #11052, where FR32 now also covers specs tagged @pr-a11y release-only and changes to a component a spec visits. Approval needs that direction settled, including whether this narrower selection may go first: an engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), or #11052 lands and the job implements its FR32.

These need fixing either way:

  • Plan step crashes: the .plan sparse checkout (ci.yml:4918-4938) leaves out scripts/lib, which a11y-pr-contracts.mjs imports, so release-specs-plan.mjs stops with ERR_MODULE_NOT_FOUND on every pull request it applies to and no release spec runs; add scripts/lib as the interaction legs' checkout does, and a test that runs the planner from only the job's sparse paths.
  • Miss: the crash reads as a pass: the plan step pipes the planner into tee under GitHub's default bash -e shell, without pipefail (ci.yml:4934-4938), so any planner failure leaves release-specs-plan green and skips release-specs (changed); start the step with set -o pipefail, as the Chromium selection step does, and test it with a failing planner.
  • Overstated description: a change to the release fixture plans nothing (it is imported type-only and loaded by the page's <script>), and the #11045 run predates the planner, so drop "fixture files" from the CI impact line and re-run or relabel that evidence.
  • Regression: FR32 coverage claim: FR32 was amended on #11052 after the last review to count @pr-a11y release-only specs and component visits, which isReleaseSpec (release-specs-plan.mjs:24-25) does not, so once the direction is decided either say the job implements FR32's file-name and import triggers only, or implement both.
  • No longer blocking: the earlier timing-gate and one-worker comments no longer apply, because #11055 on main added the reader of ASTRYX_TABLE_TIMING_GATE and the release check's isolated timing leg.

[Automated review]

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/workflows/ci.yml Resolved
@cixzhang
cixzhang marked this pull request as ready for review November 10, 2026 19:21
…alk needs

The planner imports a11y-pr-contracts.mjs, which imports scripts/lib/duration-split.mjs; a test now runs the planner from only the job's sparse paths. The planner's entry check compares real paths.
@cixzhang
cixzhang marked this pull request as draft November 10, 2026 19:47

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. AST-030 FR32 and DEC-29 settle the direction of release-specs (changed), and the job's runner, isolation, timing gate and no-retry rule match them; two fixes remain.

  • The plan step pipes the planner into tee without pipefail (.github/workflows/ci.yml:4940-4944), so a planner error exits 0 with no outputs, release-specs-plan shows green and release-specs (changed) is skipped; add set -o pipefail (or shell: bash) and a test that runs the step with a failing planner and expects a non-zero exit.
  • FR32 also counts specs tagged @pr-a11y release-only, runs a spec when a component it visits changes (or when the visit cannot be resolved), and runs the job for a Lab-only pull request, but this job selects only *.release.*.spec.ts names and import-reached specs while release-specs-plan.mjs:24, the workflow comment and the description say it implements FR32; add those triggers with the cases in FR32's verification row, or narrow those claims and restate FR32's gap line to name what stays missing.

Even with pipefail, a failed plan skips the spec job, so merge-guard needs to treat a red release-specs-plan as blocking too.

[Automated review]

Comment thread .github/workflows/ci.yml Resolved
Comment thread .github/scripts/release-specs-plan.mjs Resolved
Comment thread .github/workflows/ci.yml Resolved
@cixzhang
cixzhang marked this pull request as ready for review November 10, 2026 22:07
…ers the job covers

The plan step sets pipefail, so a planner that throws fails the job instead of planning nothing; a test runs the step with a failing planner. The job, planner and test name FR32's release-file and import triggers; tagged specs, visited components and Lab-only pull requests come later.

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI. release-specs (changed) and its plan job match AST-030 FR32 and DEC-29 for FR32's release-file and import triggers, and both earlier blockers are fixed: the plan step now sets pipefail, with a test that fails without it, and the comments and description claim only the two triggers this job covers.

CI's heavy checks are deferred while the pull request is a draft, so they and the two new jobs run once it is marked ready for review.

  • Land #11116 with this pull request and link it from the description: until it merges, FR32's gap line on main still says no job runs changed release specs.
  • The Tests section lists ci-head-checkout-scripts among the updated contracts, but that file is unchanged; drop it from the list.

[Automated review]

@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 01:25

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one fix in the run step. The two new jobs otherwise match AST-030 FR32 and DEC-29 for FR32's release-file and import triggers.

  • Miss: the run step keeps only the planned specs that exist at the head (.github/workflows/ci.yml:5030-5036), so a release spec that main added after the branch point, and that the change reaches through its imports, is skipped while the job passes, which FR32's "The job MUST NOT drop a spec as not run" rules out; fail the step naming each planned spec missing at the head and asking for a merge of main, and update the test at .github/scripts/ci-release-specs.test.mjs:197-199 to expect that failure.

Also worth doing: land #11116 with this pull request so FR32's gap line matches the new job, and drop ci-head-checkout-scripts from the Tests section's list of updated contracts, since that file is unchanged. The red test check comes from packages/cli/api/theme-edit/theme-edit.test.mjs, which only main has, not from this change.

Automated review (maintainer link)

Comment thread .github/workflows/ci.yml Resolved

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one fix in the run step, which the merge of main leaves in place. The two new jobs otherwise match AST-030 FR32 and DEC-29 for FR32's release-file and import triggers.

  • Miss: the run step keeps only the planned specs that exist at the head (.github/workflows/ci.yml:5032-5036), so a release spec that main added after the branch point, and that the change reaches through its imports, is skipped while the job passes, which FR32's "The job MUST NOT drop a spec as not run" rules out; fail the step naming each planned spec missing at the head and asking for a merge of main, and update the test at .github/scripts/ci-release-specs.test.mjs:197-199 to expect that failure.

Also worth doing: land #11116 with this pull request so FR32's gap line matches the new job, and drop ci-head-checkout-scripts from the Tests section's list of updated contracts, since that file is unchanged.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 04:07
The plan reads the merge commit, so a planned spec the pull request's head does not have was added on main after the branch point. The run step now fails naming it and asks for a merge of main, as FR32 says the job must not drop a spec; the test expects that failure.
@cixzhang
cixzhang marked this pull request as draft November 11, 2026 04:16
@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 04:16
…s not run yet

Folds in #11116's gap-line change verbatim.
@cixzhang
cixzhang marked this pull request as draft November 11, 2026 04:20
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 2026
@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 04:21
@cixzhang
cixzhang marked this pull request as draft November 11, 2026 04:21
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 818b162

@cixzhang
cixzhang marked this pull request as ready for review November 11, 2026 04:22
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 11, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not finished on this head yet.

release-specs (changed) and its plan job match AST-030 FR32 and DEC-29 for FR32's release-file and import triggers. The run step now fails, naming the spec and asking for a merge of main, when a planned release spec is missing at the head, as FR32's "The job MUST NOT drop a spec as not run" requires, and FR32's gap line now names the triggers still left out (tagged specs, visited components, Lab-only pull requests).

FR32 also needs merge-guard to require release-specs (changed) when a pull request triggers it and to fail closed on a missing or skipped result; that lives outside this repository and is not checked here.

Automated review (maintainer link)

@cixzhang
cixzhang merged commit 20977be into main Nov 11, 2026
118 of 124 checks passed
@github-actions
github-actions Bot deleted the ci/release-specs-changed branch November 11, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 818b162f Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant