Skip to content

ci: a changed interaction spec runs in both interaction lanes - #10015

Merged
cixzhang merged 3 commits into
mainfrom
ci/interaction-spec-scope
Nov 5, 2026
Merged

cixzhang merged 3 commits into
mainfrom
ci/interaction-spec-scope

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

A pull request that changes an interaction spec outside the WebKit lane's code paths gets no WebKit run. The WebKit lane starts only for gesture, motion, touch and press code, and plans only those specs. So a test-only fix for a WebKit failure in a component's spec (for example ListRowPress.interaction.browser.spec.ts) skips the very spec it fixes, and merges unproven.

Intended invariant

A pull request that changes an interaction spec runs that spec in both interaction lanes, Chromium and WebKit, outside a Lab-only pull request (which runs no interaction proofs under AST-030 FR26).

Change

  • Scope: both lanes' paths now include any *.interaction.browser.spec.ts (the Chromium lane already matched specs under packages/*/src/).
  • WebKit plan: the WebKit scope step lists the changed files (component-audit: 'true', as the audit jobs use). The plan step adds each changed interaction spec that still exists at the head to the planner's paths, so the spec runs in one of the two WebKit legs. A deleted spec is left out. If the scope step could not list the files, the plan runs its own paths and prints a warning that a changed spec outside them does not run.
  • Chromium: its legs already plan every interaction spec, so a changed spec runs there once the lane starts.
  • Behavior change: a component's code still starts no WebKit run, only its spec does. One existing assertion changes with it: a changed Carousel paging spec now runs in WebKit, while Carousel's code still doesn't.

Evidence

  • New cases in ci-interaction-webkit.test.mjs: a pull request changing only packages/core/src/List/__tests__/ListRowPress.interaction.browser.spec.ts starts both lanes. The WebKit plan step, run with a stub planner, adds that spec to its paths and leaves out a non-spec file and a deleted spec. With no file list, it plans its own paths and warns.
  • Mutations caught: dropping the WebKit scope entry fails "starts both lanes"; dropping the changed specs from the plan fails "adds the changed spec".
  • The pins in ci-test-routing.test.mjs (jobs that read the scope's file list) and interaction-legs.test.mjs (the WebKit filters) are updated.
  • ci-interaction-webkit, interaction-legs, workflow-paths, ci-run-scripts-parse, ci-test-routing, ci-heavy-deferral and ci-pr-gate pass, 389 tests.
  • Product/runtime behavior verified unchanged: CI only.
  • CI impact (AST-030 FR19), for a pull request that changes an interaction spec outside the WebKit lane's paths:
    • Chromium (pr-interaction): unchanged. It already started for specs under packages/*/src/ and planned every spec: about 15 job-minutes per update (two legs of 7–8 min).
    • WebKit (pr-interaction-webkit): 0 → about 10 job-minutes per update (two legs of about 5 min on standard runners, measured on a recent run; planned to the lane's paths plus the changed spec).
    • Runner pool: in the last 7 days, 41 of 892 merged pull requests changed such a spec, about 6 a day. At 2–3 updates each, that's about 120–180 more standard runner-minutes a day, about 0.1 more concurrent jobs on average.
    • Time to green: unchanged. The WebKit legs (about 5 min) run beside the Chromium legs (7–8 min), after the same Storybook build.
    • Every other pull request: unchanged.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Public text and artifacts contain no internal Meta context.

The WebKit interaction lane starts for gesture, motion, touch and press code
and plans only those specs. A pull request that changes another interaction
spec, such as a fix for a WebKit-only failure in a component's spec, did not
start it, so the spec it fixes never ran there.

Both lanes' scopes now include any *.interaction.browser.spec.ts. The WebKit
scope step lists the changed files, and the plan adds each changed spec that
still exists to the WebKit paths. The Chromium legs already plan every spec.
A component's code still starts no WebKit run; only its spec does.
@vercel

vercel Bot commented Nov 4, 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 5, 2026 2:19am UTC

Request Review

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

astracat-bot Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 5, 2026, 2:27 AM UTC

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · caee4a5

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 9 rows, core 3 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: +11.9 job-min per update · pool +15% · time to green −12 min · standard runners · 3 CI action or script files changed (not measured) ⚠️
Before After Change
Job-minutes per PR update 81.4 93.4 +11.9
Runner pool, runner-minutes a day 31,595 36,220 +4,626 (+15%)
Average concurrent jobs 21.9 25.2 +3.2
Time to green (median → this run) 26.8 min 14.8 min −12 min
Runs a day 388 388 0

Changed jobs: pr-interaction changed: standard · 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/ci-test-routing.test.mjs, .github/scripts/playwright-legs.test.mjs.

Flags: runner-pool usage +15%.

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 routing works: a changed interaction spec now starts the WebKit lane and is planned into one of its legs, and the new tests prove it. Two description fixes remain.

  • The CI impact: line needs what AST-030 FR19 asks of a workflow change, for both interaction jobs: job-minutes per update before and after, the runner-pool change (runner-minutes a day and average concurrent jobs), and the time to green.
  • The stated invariant ("a pull request that changes an interaction spec runs that spec in both interaction lanes") does not hold for a Lab-only pull request, such as a change to only RefreshControl.interaction.browser.spec.ts, which runs no interaction proofs under AST-030 FR26, so scope it in the description and in the comment at ci-interaction-webkit.test.mjs:194-196.

Optional: when the scope step cannot list the changed files, the WebKit plan drops the changed spec and still passes. The accessibility contract job's "Require the changed-file list" step shows how to fail loudly instead.

[Automated review]

Comment on lines +194 to +196
// A pull request that changes an interaction spec runs that spec in both
// lanes, wherever it lives: the Chromium legs plan every spec, and the
// WebKit plan adds the changed ones to its paths.

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.

This holds only outside a Lab-only pull request. A change to only packages/lab/src/RefreshControl/__tests__/RefreshControl.interaction.browser.spec.ts is classified Lab-only, so neither lane applies (AST-030 FR26: no interaction proofs). Suggest: "A pull request that changes an interaction spec, outside a Lab-only pull request, runs that spec in both lanes …", and the same wording in the description's invariant.

Comment thread .github/workflows/ci.yml
CHANGED_FILES: ${{ steps.scope.outputs.changed_files_path }}
run: |
CHANGED_SPECS=()
if [ -n "${CHANGED_FILES:-}" ] && [ -s "$CHANGED_FILES" ]; then

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: when the scope step falls back because it could not list the files, changed_files_path is empty. This plan then drops the changed spec and the job still passes. pr-component-a11y-contracts fails in that case with a "Require the changed-file list" step. The same guard, or at least a log line, would keep the new route honest.

expect(paths).not.toContain('packages/core/src/List/ListRow.tsx');
});

it('leaves out a spec the pull request deletes, and plans as before with no list', () => {

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 case always passes a list (one deleted spec), so an empty CHANGED_FILES is never exercised. Add a planArgs run with CHANGED_FILES: '', or drop "with no list" from the name.

… rule to non-Lab pull requests

When the scope step cannot list the changed files, the WebKit plan now says
that a changed spec outside its paths does not run, instead of dropping it
silently. A Lab-only pull request runs no interaction proofs (AST-030 FR26),
so the rule and its test say "outside a Lab-only pull request".
@cixzhang
cixzhang marked this pull request as draft November 5, 2026 00:11
@cixzhang
cixzhang marked this pull request as ready for review November 5, 2026 00:13

@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: some required checks are still running on this head.

The routing works: a changed interaction spec now starts the WebKit lane and is planned into one of its legs, and both earlier points (the CI impact: line and the Lab-only scope of the invariant) are addressed.

Optional: the WebKit job header in ci.yml and the header of ci-interaction-webkit.test.mjs still describe the lane as starting only for gesture, motion, touch and press code, and no test fails if the new Chromium scope alternative is removed.

[Automated review]


it('starts both lanes', () => {
expect(inScope(spec)).toBe(true);
expect(new RegExp(decide(chromium).with.paths).test(spec)).toBe(true);

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 path already matches packages/[^/]+/src/, so removing the new .*\.interaction\.browser\.spec\.ts$ alternative from the Chromium scope fails no test. Since the Chromium config only runs specs that the existing alternatives already cover, either pin the alternative with a case that needs it or drop it.

…cope

# Conflicts:
#	.github/workflows/ci.yml
@cixzhang
cixzhang marked this pull request as draft November 5, 2026 02:09
@cixzhang
cixzhang marked this pull request as ready for review November 5, 2026 02:10

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

A changed interaction spec now starts the WebKit lane and is planned into one of its legs, outside Lab-only pull requests, and the new tests fail when any part of that route is removed.

Optional: the WebKit job header in ci.yml and the header of ci-interaction-webkit.test.mjs still describe the lane as starting only for gesture, motion, touch and press code, and no test fails if the new Chromium scope alternative is removed.

[Automated review]

@cixzhang
cixzhang merged commit cf62942 into main Nov 5, 2026
105 checks passed
@github-actions
github-actions Bot deleted the ci/interaction-spec-scope branch November 5, 2026 06:03

This branch was successfully deployed

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