Repository navigation
ci: a changed interaction spec runs in both interaction lanes - #10015
Conversation
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.
|
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 | 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
There was a problem hiding this comment.
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 atci-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]
| // 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. |
There was a problem hiding this comment.
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.
| CHANGED_FILES: ${{ steps.scope.outputs.changed_files_path }} | ||
| run: | | ||
| CHANGED_SPECS=() | ||
| if [ -n "${CHANGED_FILES:-}" ] && [ -s "$CHANGED_FILES" ]; then |
There was a problem hiding this comment.
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', () => { |
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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]
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
pathsnow include any*.interaction.browser.spec.ts(the Chromium lane already matched specs underpackages/*/src/).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.Evidence
ci-interaction-webkit.test.mjs: a pull request changing onlypackages/core/src/List/__tests__/ListRowPress.interaction.browser.spec.tsstarts 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.ci-test-routing.test.mjs(jobs that read the scope's file list) andinteraction-legs.test.mjs(the WebKit filters) are updated.ci-interaction-webkit,interaction-legs,workflow-paths,ci-run-scripts-parse,ci-test-routing,ci-heavy-deferralandci-pr-gatepass, 389 tests.pr-interaction): unchanged. It already started for specs underpackages/*/src/and planned every spec: about 15 job-minutes per update (two legs of 7–8 min).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).Scope