Skip to content

ci: the leg-count test fails only when the planner cannot fit the matrix, and the WebKit matrix has six legs - #10631

Merged
cixzhang merged 1 commit into
mainfrom
ci/interaction-legs-fit
Nov 8, 2026
Merged

cixzhang merged 1 commit into
mainfrom
ci/interaction-legs-fit

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Maintainer impact

The leg-count contract test (playwright-legs.test.mjs, "fits every leg in ten minutes at today's recorded times, within the matrix") fails any pull request whose release-wide WebKit plan passes 2,040 s. #8133, with real WebKit times, reaches 2,054 s and fails. main sits at about 1,996 s, so a pull request adding about 45 s of WebKit proofs trips it.

The planner itself copes: past 2,040 s it plans a fifth leg, and the matrix had five. The test asked for more than the planner needs. It required the leg count to stay below the matrix (needed < legs), so it failed with one matrix leg still unused.

Intended invariant

The contract test fails only when the planner cannot fit the proofs in the matrix. That means more legs than the matrix holds, or a leg over ten minutes with setup (plus one spec's slack, since a spec cannot be split). When it fails, it names the heaviest specs.

Change

  • ci.yml: pr-interaction-webkit runs a matrix of 6 legs, as pr-interaction does. The leg count still plans as few legs as fit, so most runs use 1 to 4.
  • playwright-legs.mjs: legsFitMessage(...) returns null when the proofs fit the matrix. Otherwise it returns the seconds, the legs needed against the matrix, the longest leg with setup, and the five heaviest specs with their seconds.
  • playwright-legs.test.mjs:
    • The contract test asserts legsFitMessage(...) is null for each lane, in place of needed < legs.
    • The WebKit lane's matrix is 6.
    • Unit tests for legsFitMessage: proofs that need the matrix's last leg fit. Proofs that need one leg more name the heaviest specs. A single spec longer than a leg is named.

No proof is cut and no time limit is raised.

Evidence

  • Failure before the change: main's recorded WebKit times with 60 s added to one spec (2,056 s release-wide) fail the current contract test with 2056 s of proofs: expected 5 to be less than 5.
  • Success after the change: the same input passes the new contract test, which plans 5 of 6 legs, none over its time. main's own times pass too. playwright-legs.test.mjs, ci-interaction-webkit.test.mjs and ci-interaction.test.mjs pass, 67 tests.
  • Product/runtime behavior verified unchanged: no product source.
  • CI impact: one more WebKit matrix job per run. A leg with no share still starts its container before its steps skip, about 30–40 s of runner time per run, until the dynamic-matrix follow-up stops share-less legs from starting. Chromium is about 8 s under needing a fifth leg of its six, and now has room to take it.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  • vitest run .github/scripts/playwright-legs.test.mjs .github/scripts/ci-interaction-webkit.test.mjs .github/scripts/ci-interaction.test.mjs, with main's times and with 60 s added to one WebKit spec.
  • The contract test against the previous guard with the 60 s input, to see it fail.

@vercel

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

Request Review

@astracat-bot

astracat-bot Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 8, 2026, 4:40 AM UTC

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 19a18f3

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 29 rows, core 39 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: +5.4 job-min per update · pool +4.6% · time to green −0.6 min · standard runners · 2 CI action or script files changed (not measured)
Before After Change
Job-minutes per PR update 117.4 122.8 +5.4
Runner pool, runner-minutes a day 60,140 62,912 +2,772 (+4.6%)
Average concurrent jobs 41.8 43.7 +1.9
Time to green (median → this run) 16.8 min 16.2 min −0.6 min
Runs a day 512 512 0

Changed jobs: pr-interaction-webkit changed: standard

Not measured (the jobs that use these keep their recent minutes above): .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.

Approved. The leg-count contract test now fails only when the planner cannot fit the proofs into the matrix, and the six-leg WebKit matrix keeps the release-wide plan in reach. An input 60 s over main's WebKit times fails the old guard and passes the new one, and CI on this head is green.

Non-blocking:

  • legsFitMessage repeats legCount's leg formula (.github/scripts/playwright-legs.mjs:82 and :228). A small shared helper would keep the two from drifting.
  • A WebKit leg with no share took 30–38 s on this run, because the container starts before the steps skip. The description's "a few seconds of runner start" understates that.

[Automated review]

@cixzhang
cixzhang merged commit 9db6e34 into main Nov 8, 2026
72 checks passed
@github-actions
github-actions Bot deleted the ci/interaction-legs-fit branch November 8, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — 19a18f35 Deployed Nov 8, 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