Skip to content

ci: the WebKit lane runs a component folder's interaction specs when its code changes - #10225

Merged
cixzhang merged 4 commits into
mainfrom
ci/webkit-folder-interaction-specs
Nov 7, 2026
Merged

cixzhang merged 4 commits into
mainfrom
ci/webkit-folder-interaction-specs

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Who this helps

A contributor who changes a component that has interaction proofs (DateInput, BottomSheet, Dialog, Switch, …) now sees those proofs run in WebKit, the engine of every iOS browser, on their pull request. Today a WebKit-only break in that component first shows after merge.

Until now the WebKit lane ran two hand-kept lists:

  • a scope pattern that lets in only the shared touch code (gestures, motion, touch and press helpers);
  • inside it, a fixed set of specs (gestures, the motion runtime, the pager, the harness) plus the specs a change edits.

A change to a component's own code never ran that component's interaction specs in WebKit. Thirty-five folders hold such specs on main, three of them in Lab. A pull request that changes only Lab takes the Lab-only lane, which runs no interaction proofs, so Lab's folders run beside a change outside Lab.

What changes

  • .github/scripts/playwright-legs.mjs: a new select command and its functions.
    • folderSpecs: the interaction specs in each component folder (packages/<package>/src/<Component>/) whose code a change reaches, derived from where the spec files live in the tree. Tests, stories, docs and notes put no code on a page, so they select nothing. Shared folders (motion, hooks, utils) stay with the shared-code pattern.
    • selectProofs: the lane's own paths when the change touches shared code, plus each interaction spec the change edits, plus the folder specs. An unknown change (no file list) runs the lane's own paths, as today.
  • .github/workflows/ci.yml, pr-interaction-webkit only:
    • The hand-kept pattern moves to WEBKIT_SHARED_PATHS and still decides when the fixed spec set runs.
    • The scope step admits any component source, so the legs step can decide.
    • The legs step selects once, into selected.txt, and counts legs from it. With nothing selected, no leg runs, and it says why.
    • The plan step plans exactly that selection, leaving out spec files the head does not have. It plans no file, never every file, when none remain.
  • .github/scripts/ci-interaction-webkit.test.mjs and playwright-legs.test.mjs:
    • A contract test that every component folder holding an interaction spec, in every package, runs all of its specs when its code changes.
    • Unit tests for select, and the step scripts run with stubs.
    • The scope and replay cases updated for the new rule.

WebKit baseline

These component specs had never run in WebKit CI, so they ran once before this change (https://github.com/meta/astryx/actions/runs/42304502597): a one-time CI run that counted every component folder as changed, with 4 legs of 6–9 minutes. Of 867 tests, 866 passed and 138 skipped. The one failure was a Lightbox zoom proof that judged its own window too sparse in WebKit, and its cause is fixed on main. So a component change now runs its folder's specs in WebKit without inheriting a red.

CI impact

  • Runner: the existing WebKit job on the standard ubuntu-latest runner. No new job and no new required context.
  • Frequency: on Tuesday and Wednesday, 45 of 340 merges would newly run WebKit, about 22 a day.
  • Cost: each newly run job adds about 80 s of proofs to about 90 s of setup, about 3 runner-minutes. That's 150–200 runner-minutes a day with re-pushes.
  • Concurrency: about 0.05 more concurrent jobs on average (about 66 job-minutes a day over 24 hours). Usually one leg; the leg count spreads a folder with many proofs.
  • Time to green: unchanged for most pull requests. The WebKit legs run beside the Chromium legs and finish within them. A pull request that touches no component with proofs sees no change, since the job already starts to decide its scope.

Tests

  • ci-interaction-webkit.test.mjs, playwright-legs.test.mjs and the other workflow contracts that read this job all pass. folderSpecs reads a component folder with the accessibility contracts' own helpers (isComponentPath, specOwners). Only the WebKit-specific filter for files that render nothing (tests, stories, docs, notes) stays local.
  • Red-first: the new cases fail on main's planner and workflow.

…its code changes

The WebKit interaction lane ran two hand-kept lists: a scope pattern for
the shared touch code, and a fixed spec set plus the specs a change edits.
A change to a component's own code never ran that component's
interaction specs in WebKit. The legs step now selects once from where
the spec files live: the lane's own paths for shared code, each spec the
change edits, and every interaction spec in a component folder whose code
it changes. The count and the plan both read that selection; with nothing
selected, no leg runs.
@vercel

vercel Bot commented Nov 6, 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 7, 2026 3:04am UTC

Request Review

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

astracat-bot Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 7, 2026, 3:14 AM UTC

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 592da02

Storybook · Sandbox · built from this PR's head

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

API changes: none in this pull request

Committed API report behind this build: cli 19 rows, core 24 rows; run pnpm api:report.

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

CI impact: +2.9 job-min per update · pool +2.6% · time to green −3.7 min · standard runners · 3 CI action or script files changed (not measured)
Before After Change
Job-minutes per PR update 112.4 115.3 +2.9
Runner pool, runner-minutes a day 58,103 59,613 +1,510 (+2.6%)
Average concurrent jobs 40.3 41.4 +1
Time to green (median → this run) 17.1 min 13.4 min −3.7 min
Runs a day 517 517 0

Changed jobs: pr-interaction-webkit changed: standard

Not measured (the jobs that use these keep their recent minutes above): .github/scripts/ci-interaction-webkit.test.mjs, .github/scripts/playwright-legs.mjs, .github/scripts/playwright-legs.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.


Generated by PR Enrichment workflow | View full report

@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: the new WebKit selection does what the description says and its routing tests cover it, but two things need fixing first.

  • .github/scripts/playwright-legs.mjs:114 (FOLDER, used by folderSpecs) reimplements the component-folder rule that .github/scripts/a11y-pr-contracts.mjs already exports as isComponentPath and specOwners, and the two copies already disagree on which changed files select a folder's specs, so please call the shared helpers and keep only the WebKit-specific file filter local, or say in the description why they cannot serve.
  • The description needs the CI impact: line that AST-030 FR19 requires, adding the changed job's runner class, the average concurrent jobs and the time to green to the runner-minutes it already gives.

Not blocking: the planned baseline run of every component folder's specs in WebKit is still to be posted, and folder-based selection does not cross folders (a change to DateInput/Wheel.tsx does not run TimeInput's TimeWheels proofs, which render that wheel).

[Automated review]

Comment thread .github/scripts/playwright-legs.mjs Resolved
Keeps main's WebKit job changes (the leg count and plan, the stale-head hint, the merge-base helper) and its shared-code scope (nodeType, inputAge, tokenReferences) in WEBKIT_SHARED_PATHS. A change to Carousel code now runs Carousel's own interaction spec.

@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: the new WebKit selection routes component changes as its tests show, but three things need fixing first.

  • .github/scripts/playwright-legs.mjs:210 (FOLDER, used by folderSpecs) still reimplements the component-folder rule that .github/scripts/a11y-pr-contracts.mjs exports as isComponentPath and specOwners, so please call those helpers and keep only the WebKit-specific NOT_RENDERED filter local, or say in the description why they cannot serve.
  • The description still needs the CI impact: line that AST-030 FR19 requires, adding the job's runner class, the average concurrent jobs and the time to green to the runner-minutes it already gives.
  • Miss: "Who this helps" promises WebKit proofs to contributors who change RefreshControl or NavigationStack, but a pull request that changes only Lab takes the Lab-only lane, which runs no interaction proofs (AST-030 FR26), so please say Lab's folders run only beside a change outside Lab, or drop those two examples.

The branch also conflicts with main, which added FR28's WEBKIT_ALL_SPECS in the same steps: skipping select under WEBKIT_ALL_SPECS keeps main's FR28 count test passing. The planned baseline run is still to be posted.

[Automated review]

Keeps main's release interaction check (WEBKIT_ALL_SPECS plans every spec, without the changed files) on top of the folder selection.

@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: the merge with main keeps the release check's full WebKit scope, but four things need fixing first.

  • .github/workflows/ci.yml:2806 now calls select without --changed for the release interaction check, and select (.github/scripts/playwright-legs.mjs:490) then warns on every leg that "the scope step could not list the changed files, so only this lane's own paths run here" while the run covers every spec, so please warn only when --changed is given but unreadable, as legs does, and keep one of the two warnings the Count step can now print.
  • .github/scripts/playwright-legs.mjs:210 (FOLDER, used by folderSpecs) still reimplements the component-folder rule that .github/scripts/a11y-pr-contracts.mjs exports as isComponentPath and specOwners, so please call those helpers and keep only the WebKit-specific NOT_RENDERED filter local, or say in the description why they cannot serve.
  • The description still needs the CI impact: line that AST-030 FR19 requires, adding the job's runner class, the average concurrent jobs and the time to green to the runner-minutes it already gives.
  • Miss: "Who this helps" promises WebKit proofs to contributors who change RefreshControl or NavigationStack, but a pull request that changes only Lab takes the Lab-only lane, which runs no interaction proofs (AST-030 FR26), so please say Lab's folders run only beside a change outside Lab, or drop those two examples.

The planned baseline run of every component folder's specs in WebKit is still to be posted.

[Automated review]

Comment thread .github/scripts/playwright-legs.mjs Resolved
…hanged-files warning

folderSpecs reads a component folder with isComponentPath and specOwners. select warns only when a changed-files list was passed and is missing, so the release interaction check, which passes none, warns nothing.
@cixzhang
cixzhang marked this pull request as draft November 7, 2026 02:58
@cixzhang
cixzhang marked this pull request as ready for review November 7, 2026 02:59

@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: CI passed on this head.

The four points from the last review are fixed: the release interaction check no longer warns of a scope failure, folderSpecs reads component folders with the accessibility contracts' isComponentPath and specOwners, the CI impact now covers runner class, concurrency and time to green, and the description no longer promises WebKit proofs for Lab-only changes.

Optional follow-ups: a test that the release check prints no "Changed specs not planned" warning would keep that fix from regressing, and the 0.05 concurrency figure counts merges only, while 150–200 runner-minutes a day works out to about 0.10–0.14.

[Automated review]

Comment on lines +211 to +213
// The component folder a path is in: `packages/<package>/src/<Component>`.
// Shared folders (`motion`, `hooks`, `utils`) are not component folders: the
// lane's shared-code pattern decides what their changes run.

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.

Non-blocking: this comment described the FOLDER constant, which this push removed, so it now sits above NOT_RENDERED and describes nothing there. Could it move into folderSpecs' JSDoc, or go?

@cixzhang
cixzhang merged commit 9782dea into main Nov 7, 2026
112 checks passed
@cixzhang
cixzhang deleted the ci/webkit-folder-interaction-specs branch November 7, 2026 03:15

This branch was successfully deployed

1 active deployment
Preview — 592da02e Deployed Nov 7, 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