Repository navigation
ci: the WebKit lane runs a component folder's interaction specs when its code changes - #10225
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| 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
There was a problem hiding this comment.
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 byfolderSpecs) reimplements the component-folder rule that.github/scripts/a11y-pr-contracts.mjsalready exports asisComponentPathandspecOwners, 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]
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.
There was a problem hiding this comment.
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 byfolderSpecs) still reimplements the component-folder rule that.github/scripts/a11y-pr-contracts.mjsexports asisComponentPathandspecOwners, so please call those helpers and keep only the WebKit-specificNOT_RENDEREDfilter 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.
There was a problem hiding this comment.
Changes requested: the merge with main keeps the release check's full WebKit scope, but four things need fixing first.
.github/workflows/ci.yml:2806now callsselectwithout--changedfor the release interaction check, andselect(.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--changedis given but unreadable, aslegsdoes, and keep one of the two warnings the Count step can now print..github/scripts/playwright-legs.mjs:210(FOLDER, used byfolderSpecs) still reimplements the component-folder rule that.github/scripts/a11y-pr-contracts.mjsexports asisComponentPathandspecOwners, so please call those helpers and keep only the WebKit-specificNOT_RENDEREDfilter 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]
…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.
There was a problem hiding this comment.
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]
| // 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. |
There was a problem hiding this comment.
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?
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 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 newselectcommand 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-webkitonly:WEBKIT_SHARED_PATHSand still decides when the fixed spec set runs.selected.txt, and counts legs from it. With nothing selected, no leg runs, and it says why..github/scripts/ci-interaction-webkit.test.mjsandplaywright-legs.test.mjs:select, and the step scripts run with stubs.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
ubuntu-latestrunner. No new job and no new required context.Tests
ci-interaction-webkit.test.mjs,playwright-legs.test.mjsand the other workflow contracts that read this job all pass.folderSpecsreads 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.main's planner and workflow.