Repository navigation
ci: release-specs (changed) adds tagged specs, visited components and Lab-only pull requests, in shards - #11171
Conversation
… Lab-only pull requests, in shards FR32 (spec:AST-030): a release spec is a *.release.*.spec.ts file or a spec tagged @Pr-a11y release-only. It also runs when a pull request changes the rendered source of the component it visits: the component its story id names, an a11y-* id or fixture page through .github/release-spec-visits.json, or a @visits line. An unresolved visit runs the spec. A Lab-only pull request plans too. The plan splits the specs into 4-core shards of at most 12 minutes by recorded time; release-specs (changed) joins them.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
/approve-spec 4969833 |
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| BottomSheet | 69.2 kB (0) · 7.7 kB CSS (0) | — | ✗ · ✓ · — |
| BottomSheetSwitcher | 18.6 kB (0) · 3.4 kB CSS (0) | — | ✗ · ✓ · — |
| LinkProvider | 3.8 kB (0) · 20 B CSS (0) | — | ✓ · ✓ · ✗ |
19 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| ChatComposer | 81.2 kB (0) · 12.1 kB CSS (0) | — | ✓ · ✓ · — |
| ChatComposerDrawer | 18.0 kB (0) · 4.7 kB CSS (0) | — | ✓ · ✓ · — |
| ChatComposerInput | 78.9 kB (0) · 11.3 kB CSS (0) | — | ✓ · ✓ · — |
| ChatComposerTokenElement | 78.9 kB (0) · 11.3 kB CSS (0) | — | ✓ · ✓ · — |
| ChatDictationButton | 62.6 kB (0) · 10.1 kB CSS (0) | — | ✓ · ✓ · — |
| ChatLayout | 84.9 kB (0) · 10.6 kB CSS (0) | — | ✓ · ✓ · — |
| ChatLayoutScrollButton | 62.6 kB (0) · 10.2 kB CSS (0) | — | ✓ · ✓ · — |
| ChatMessage | 17.2 kB (0) · 3.7 kB CSS (0) | — | ✓ · ✓ · ✓ |
| ChatMessageBubble | 7.6 kB (0) · 3.7 kB CSS (0) | — | ✓ · ✓ · ✓ |
| ChatMessageList | 29.9 kB (0) · 7.1 kB CSS (0) | — | ✓ · ✓ · — |
| ChatMessageMetadata | 20.4 kB (0) · 4.1 kB CSS (0) | — | ✓ · ✓ · — |
| ChatSendButton | 62.5 kB (0) · 10.0 kB CSS (0) | — | ✓ · ✓ · — |
| ChatSystemMessage | 7.1 kB (0) · 3.8 kB CSS (0) | — | ✓ · ✓ · — |
| ChatTokenizedText | 7.3 kB (0) · 4.0 kB CSS (0) | — | ✓ · ✓ · — |
| ChatToolCalls | 33.9 kB (0) · 8.4 kB CSS (0) | — | ✓ · ✓ · — |
| Link | 54.8 kB (0) · 7.1 kB CSS (0) | — | ✓ · ✓ · — |
| NavHeadingMenu | 16.9 kB (0) · 3.5 kB CSS (0) | — | ✓ · ✓ · ✓ |
| chat | — | — | — · ✓ · — |
| Chat | — | — | ✓ · ✓ · — |
Visual changes: 2 snapshots in 1 component
A change is a question for the reviewer, not a failure.
| Component · story | Before | After | Diff |
|---|---|---|---|
| BottomSheet · Text Only (neutral, dark) | ![]() |
![]() |
![]() |
| BottomSheet · Text Only (neutral, light) | ![]() |
![]() |
![]() |
Package size: no published package changed; no new dependencies.
Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.
CI impact: +1.9 job-min per update · pool +2.2% · non-standard runners · 7 CI action or script files changed (not measured)
| Before | After | Change | |
|---|---|---|---|
| Job-minutes per PR update | 85.8 | 87.8 | +1.9 |
| Runner pool, runner-minutes a day | 41,051 | 41,974 | +923 (+2.2%) |
| Average concurrent jobs | 28.5 | 29.1 | +0.6 |
| Time to green (median → this run) | — | 31.5 min | — |
| Runs a day | 478 | 478 | 0 |
Changed jobs: release-specs changed: non-standard (4-core-ubuntu) · release-specs added: standard · release-specs-plan changed: standard
Not measured (the jobs that use these keep their recent minutes above): .github/scripts/a11y-dependent-audits.mjs, .github/scripts/a11y-pr-contracts.mjs, .github/scripts/ci-admission.test.mjs, .github/scripts/ci-release-specs.test.mjs, .github/scripts/release-spec-visits.mjs, .github/scripts/release-specs-plan.mjs, .github/scripts/release-specs-plan.test.mjs.
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.
Accessibility: 2 violation(s)
Accessibility Audit
Status: 2 accessibility violation(s) found — 2 serious.
ChatComposer - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 1/19 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
ChatComposerInput - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 1/18 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested. The visit trigger, Lab-only planning and the sharded join work as described, and the planner tests pass. Five things need fixing first:
- The plan never treats the 12 tagged
internal/a11y-spec/src/patterns/*.chromium.spec.tsspecs as release specs (release-spec-visits.mjs:38keeps onlypackages/*/src/), though FR32 counts every@pr-a11y release-onlyspec and the title and the new FR32 gap line say tagged specs are covered. BottomSheetFocusReturn,BottomSheetToastOutletandNavMenusSlideSelectionare never planned when BottomSheet or NavMenu changes, because each visits only its story's component, so add@visitslines (or count a spec's own folder as a visit).- FR32 still says the specs run "on
4-core-ubuntu… in therelease-specs (changed)job", which is now anubuntu-slimjoin, so that sentence needs rewording for the shards and a fresh/approve-spec. - The description's "Learning-loop rule" is not in any changed file, so add it to FR32 or the planner's header, or drop it from the description.
RESOLVE_SUFFIXESandresolveinrelease-spec-visits.mjscopy the resolver ina11y-pr-contracts.mjsand have already lost.mts, so export the shared one and reuse it.
One non-blocking note: a single spec longer than 12 minutes raises every shard's cap in shardSpecs (release-specs-plan.mjs:52).
…ts; one shared resolver; FR32 names the shards Every @Pr-a11y release-only spec counts, internal/ pattern specs included. Four specs whose stories name another component get a @visits line for their own, and a test keeps a spec visiting its own folder. The visit reader resolves imports with the resolver the import trigger uses. A spec longer than a shard runs alone without raising the other shards' limit. FR32 names the shards and the joined release-specs (changed) check. The learning-loop rule is in the visit reader's header.
|
/approve-spec 3dd365f |
There was a problem hiding this comment.
Approved. release-specs (changed) now runs tagged release specs, visited components and Lab-only pull requests in shards. This head's own sharded run passed beside the required checks.
Optional tidy-ups, none blocking:
- Miss: the
planReleaseSpecsJSDoc still documentsoptions.pages, but the function takesoptions.map(.github/scripts/release-specs-plan.mjs, line 88). - FR32's "runs the job for the release specs it triggers" has no referent now that the paragraph names shards and a check (
docs/specs/AST-030/spec.md, line 665). FOLDERinrelease-spec-visits.mjsrepeatsisComponentPath's pattern. One exported helper would keep the visit reader and the touched-component mapping on the same definition.
There was a problem hiding this comment.
Changes requested. The tagged-spec, visit and Lab-only triggers and the sharded release-specs (changed) join work as described, and this head's own sharded run passed. One thing needs fixing first:
- Miss:
.github/scripts/release-spec-visits.mjsdefines its own component-folder pattern (FOLDER, line 105) instead of callingcomponentFolderOffroma11y-pr-contracts.mjs, which the dependent-audit plan already uses for the same match, so export one folder helper there and use it in the visit reader, the planner's match and the planner test.
Optional tidy-ups, none blocking: the planner's @output header says reason where the plan writes reasons, its JSDoc still documents options.pages, FR32 still says a Lab-only pull request "runs the job", and "fewest shards" overstates a slowest-first split that can use one shard more than needed.
componentPathOf in a11y-pr-contracts.mjs shares componentFolderOf's pattern and names a file's component folder, or its package's source folder for a package with no component folders (Rich Text). The visit reader, the planner's match and the planner test use it. The planner's header and JSDoc match what it writes, the shard split says it is slowest-first, and FR32 says a Lab-only pull request runs the release specs it triggers.
|
/approve-spec 0818ccc |
There was a problem hiding this comment.
Changes requested: one fix in the code and one in the description; the FR32 change, the visit trigger and the shard wiring are otherwise in order, and the release-spec shard and its join passed on this head.
- Miss:
shardSpecsin.github/scripts/release-specs-plan.mjsre-implements the fit-legs-to-a-budget loop thatfitLegsin.github/scripts/a11y-dependent-audits.mjsalready owns, and the two already differ on an over-budget file, so please extendfitLegs(or move it besidesplitByDurationinscripts/lib/duration-split.mjs) to take the budget and give an over-budget file a leg of its own, and call it fromshardSpecs(see the inline comment). - Miss: the description says the 68
@pr-a11y release-onlyspecs "ran only in the release check", but onmainthe touched-components contract job already runs the release-only specs a touched component owns inside its six-minute plan, so please reword it to say what was missing: a full run on the gating runner, specs longer than that plan, and specs that reach a component only through another component's story.
Non-blocking: the visit-map test still checks startsWith while the planner matches componentPathOf exactly (see the earlier inline comment), and the description's "fewest shards" should read "the fewest shards a slowest-first split fits".
…get split fitLegsToBudget in scripts/lib/duration-split.mjs fits legs to a time budget, from a starting count up to an optional cap, and gives an item over the budget a leg of its own without raising the other legs' limit. shardSpecs and the dependent-audit planner's fitLegs both call it. The visit-map test checks each folder in the shape the planner matches.
|
/approve-spec ca033e4 |
There was a problem hiding this comment.
Changes requested: one description fix. The FR32 change, the visit trigger, the shards and the join are otherwise in order, and both earlier blockers are fixed at this head.
- The description says the shared split stops an audit over 10 minutes from raising every other dependent-audit leg's limit, but a first run's fit checks in
.github/scripts/a11y-dependent-audits.mjs(lines 213-215 and 238-240) still admit legs up tobudgetFor, so withCheckbox.a11y.chromium.spec.ts(703 s) owed the undecided-scope plan still has legs of 682 and 692 s, exactly as onmain; please reword that sentence to say today's dependent-audit plans are unchanged, or make those two checks hold the shared legs toLEG_BUDGET_MS(see the inline comment).
Non-blocking: fitLegsToBudget gives every over-budget item its own leg before it applies maxLegs, so three audits over 10 minutes plus one more would plan four legs at MAX_LEGS 3 (see the inline comment).
When the items over the budget alone fill maxLegs, the items split into maxLegs legs by time, as the dependent-audit planner did before, instead of one leg more. A test pins the case.
|
/approve-spec 2a763b0 |
There was a problem hiding this comment.
Changes requested: one fix in the shared leg split. The FR32 change, the visit trigger, the shards and the join are in order, and the earlier description fix is in.
- The description says "The shared split never plans more legs than
maxLegs", and the JSDoc atscripts/lib/duration-split.mjs:75says the same, but the new guard at line 87 applies only when some item is under the budget, so four items over the budget atmaxLegs: 3still plan four legs (five plan five) wheremainplans three, and a component owing four audits over 10 minutes would start four dependent-audit legs on a first run; taking themaxLegssplit wheneveralone.length + (rest.length > 0 ? 1 : 0) > maxLegs, with a four-item test, makes the sentence hold (see the inline comment).
No plan reaches this case today, since only one audit is over 10 minutes.
… budget too The maxLegs split now applies whenever the over-budget legs, and one more for the rest, would pass maxLegs. A test pins four and five items over the budget at maxLegs 3.
|
/approve-spec 21b4a22 |
There was a problem hiding this comment.
Approved pending CI: the required checks have not finished on this head yet.
The shared leg split now stays within maxLegs when every item is over the budget, and the new four- and five-item test pins it. The FR32 change, the visit trigger, Lab-only planning, the shards and the join are in order, and the FR32 rewording has an engineering owner's approval for this head.






Who this helps
Maintainers merging a change to a component that a release-only spec covers. On main, the touched-components contract job already runs the
@pr-a11y release-onlyspecs that a touched component owns, inside its six-minute plan. Three things were missing:4-core-ubuntu, one worker, timing gate on);So a change that broke one could surface at the cut instead of on its own pull request. Now the pull request that changes the component runs those specs in full, on the gating runner, before merge. There are 68 such specs: 56 component specs and 12 accessibility-pattern specs.
What changes
Implements the rest of AST-030 FR32 (DEC-29) on top of #11044:
*.release.*.spec.tsfiles plus every spec tagged@pr-a11y release-only(read with the existingparseRouting), in packages and in theinternal/accessibility-pattern harness.isRenderedSource: not a test, story, doc or type) of a component it visits. It visits only the component its story id names, not every component that story renders as scaffolding:core-<component>--…resolves to the story file whose title (or metaid) makes it. The component is that file's metacomponent, or else the longest folder name the id begins with (core-tablerowexpansion→ Table).core-${component}--…is filled from the spec's quoted names that make a real story id.a11y-*ids and fixture pages: resolve only through the checked-in.github/release-spec-visits.json. It holds 12 pattern stories and 2 pages. The button-pattern entry is cross-checked againstownerForA11yStory's owner map.@visits <Component>line in a spec: adds a component the spec reaches through another component's story. It only adds triggers and never removes one.Link.navigationgets@visits Markdown Citation ClickableCard, the sinks its navigation contract covers.@visitsname that cannot be resolved runs the spec on every pull request the plan applies to. Today every release spec resolves, and a test keeps it so.@visitsline for their own:BottomSheetFocusReturn,BottomSheetToastOutlet,NavMenusSlideSelection(NavHeadingMenu) anduseChatStreamScroll. A test keeps the rule.resolveModule, the resolver the import trigger uses, now exported froma11y-pr-contracts.mjs.lab-only-specs: '.', so a Lab-only pull request plans from its changed files (FR26)..github/a11y-contract-durations.json, at 60 s for a spec with none.fitLegsToBudgetinscripts/lib/duration-split.mjs, now shared with the dependent-audits planner (whosefitLegswraps it). Today's dependent-audit plans are unchanged: its first-run checks still admit legs up to its longest audit's time. The shared split never plans more legs thanmaxLegs.--workers=1,ASTRYX_TABLE_TIMING_GATE: '1', no retry andtimeout-minutes: 15.release-specs (changed)is now a slim join job that fails unless every shard succeeded. Merge-guard's job name and its skip semantics are unchanged.@visitsline would have caught gets that line in the pull request that fixes it. The rule is inrelease-spec-visits.mjs's header.release-specs (changed)passes only when every shard does;CI impact
Pull requests that change no release spec, no module one imports, and no rendered source of a visited component (most pull requests): zero 4-core minutes. Only the slim plan job runs.
Shard math: shards = the fewest a slowest-first split fits at ≤12 min of recorded spec time each, starting from ceil(total ÷ 12 min). Each shard adds about 3 min of setup (checkout, install, Playwright, Storybook download), an estimate.
Per component changed, from recorded release-check durations (41 component folders are visited):
So a triggering pull request costs about 5–12 4-core minutes.
Worst case: the import graph cannot be built, so all 68 specs run. That is 61 min of spec time in 6 shards of about 10 min each, about 79 4-core minutes.
This pull request adds
@visitslines to five release specs, so it runsrelease-specs (changed)for those specs.Tests
Red-first:
@visitsline removed, "runs Link.navigation for a Markdown change through its @visits line, not for a Markdown doc" fails against this repository's real specs and stories. With the line, it passes.release-specs-plan.test.mjs, other cases:internal/pattern specs included, and a change to a pattern spec's fixture runs it.@visits: adds and never removes.a11y-*id missing from the map, an unmapped page, an unknown story id, an unnamed story id, and an unknown@visitsname.ownerForA11yStory's owners.ci-release-specs.test.mjs:release-specs (changed), it passes only on shard success and starts exactly when the shards do.fail-fast: falseand a 15-min limit.lab_specs_path.ci-admission.test.mjs: lists the join job as admission-guarded.Local: every
.github/scripts/ci-*.test.mjsfile plus the planner anda11y-pr-contractstests pass (36 files, 977 tests).Writing rubric results
Two record changes in AST-030 FR32: the requirement sentence names the shards and the joined check, and the gap line shrinks.
FR32 gap: <observable mismatch>form ("the plan reads visits only from Storybook story ids and pages on the served Storybook; it maps no sandbox path to a component folder"), with no build-status words.