Skip to content

ci: refresh the recorded interaction test times weekly from main's full runs, with an early warning under nine in ten - #12760

Merged
cixzhang merged 5 commits into
mainfrom
ci/interaction-record-refresh
Nov 19, 2026
Merged

cixzhang merged 5 commits into
mainfrom
ci/interaction-record-refresh

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Who this helps

Authors whose pull request runs the interaction suite. Its legs split the specs by .github/playwright-leg-durations.json, and nothing kept those times current. The Chromium times went 10 days stale, and one leg planned at about 7.7 minutes ran its tests for 13.6 and hit the 15-minute job limit (fixed by hand in #12703). The WebKit times cover only 100 of today's 130 interaction specs.

What changes

  • .github/workflows/interaction-record-refresh.yml (new; weekly on Monday 11:23 UTC, or on demand):
    • finds each lane's (up to) three latest successful full runs of main, paging through main's latest 600 successful dispatches, by ci.yml's own run names: Chromium from "Interaction proofs of …" (ci.yml's daily interaction-full), WebKit from "WebKit weekly of …";
    • records each run on its own with the planner's recorder (playwright-legs.mjs record --key interaction-chromium --project chromium, and the same for WebKit), from each leg's complete job log in a file of its own;
    • keeps each spec's median over those runs, and the median mean time a test (seconds-per-test, the cost of an untimed spec), via interaction-record-refresh.mjs median, so one slow or fast run does not move a time alone. The record format is unchanged: one number per spec;
    • reports coverage in the step summary. Under nine in ten timed spec files it adds an early warning, as a summary line and a workflow warning; nothing fails on it;
    • a pull request opened with the workflow token starts no CI until someone with write access reopens it, as with the Node refresh (said in the workflow and the pull request body);
    • when the record changed, it force-updates the fixed branch ci/interaction-durations-refresh (keeping the commit when the branch already carries the record) and opens the one durations-only pull request, or refreshes the open one. It never pushes to main. This is the same shape as the Node record refresh, and the 11/15 ruling on durations-refresh pull requests covers it.
  • .github/scripts/interaction-record-refresh.mjs: median (each spec's median over the runs that timed it), coverage (the share and the warning) and pr. It calls the Node refresh's own coverage, which gains a minShare option (called with nine in ten here; its default stays the Node bar), its openOrRefresh, which gains a branch option (default unchanged), and its percent. The warning says an untimed spec is costed at the other browser's time first, else at its tests times the mean time a test, as the planner does. Its body names the runs, the coverage lines and the fixed branch ci/interaction-durations-refresh, and says each refresh needs a review at its new head.
  • Tests (interaction-record-refresh.test.mjs, 10): the median (odd and even counts, a spec only one run timed); the warning below nine in ten and quiet at it; one open pull request at most; the body; and the workflow contract (weekly schedule, permissions, ci.yml's run names, leg job patterns, the recorder calls, and no push to main).

Evidence

  • I ran the workflow's record step locally against main's runs: Chromium over 3 nightly runs (44273007201, 44052514091, 43838156395) and WebKit over the only 2 successful weekly runs so far (43702667879, 43555511013; the lane takes three once a third exists). Both lanes then time 127 of 130 specs; WebKit was at 100 of 130, and today's record trips the early warning (76.9%).
  • actionlint clean; Prettier clean; this script's 10 tests and the Node refresh's tests pass (38).

Known limit: a spec whose time changes on main reaches the record once two of its lane's three sampled runs carry it. For example, LightboxPaging changed at 14:11Z today (#11539), after the latest nightly: 180 s in the nightlies, 403 s in #12644's run. Monday's refresh samples the weekend's nightlies.

CI impact

CI impact: one job a week on ubuntu-latest, about 5 minutes (setup plus about 30 log downloads); it runs no tests. Pull-request job-minutes and time to green are unchanged: it starts no pull-request run itself, and the refresh pull request it opens runs CI only when someone reopens it.

Overlap checked: #11910, #11921 (our own Node record refresh changes). This pull request also changes node-record-refresh.mjs, which both of them change, but only by adding two options with unchanged defaults (openOrRefresh's branch and coverage's minShare). This pull request merges cleanly with each of them (#11910 and #11921 conflict with each other, and land in turn).

Owning session: noopbot (a61f66c2), under CI & Release (ca77f950). Land path: the shipper, through merge-guard, on green, CodeBunny approval and Specs' exact-head /approve-spec.

@vercel

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

Request Review

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

astracat-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

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

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec da73cc2

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 1932855

Storybook · Sandbox · built from this PR's head

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

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.

CI impact: 0 job-min per update · pool 0% · time to green −21.6 min · standard runners · 1 other workflow changed (not measured) · 3 CI action or script files changed (not measured)
Before After Change
Job-minutes per PR update 173.5 173.5 0
Runner pool, runner-minutes a day 51,781 51,781 0 (0%)
Average concurrent jobs 36 36 0
Time to green (median → this run) 27.8 min 6.3 min −21.6 min
Runs a day 298 298 0

Other workflows: interaction-record-refresh.yml added: runs on schedule (23 11 * * 1), workflow_dispatch; standard runners; its minutes are not measured here

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

…ee latest full runs, and the refresh pull request names its fixed branch
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 34200c8

@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 weekly interaction-times refresh has an engineering owner's approval at this head, and two fixes remain before it can be approved.

  • The WebKit lane reads only one page of main's latest 100 successful ci.yml dispatches (interaction-record-refresh.yml line 60), which at main's current dispatch rate holds at most two weekly WebKit runs, so its times take the mean of two runs while the workflow header and the description promise a median of three; page through the runs until each lane has three, or say that WebKit uses the weekly runs in that window.
  • openOrRefresh in interaction-record-refresh.mjs (lines 113-146) copies the one in node-record-refresh.mjs line for line; give that helper a branch option (or move it to a shared module), call it from both scripts, reuse its percent(), and delete the copy.

Also worth fixing: each run's refreshed seconds-per-test value never reaches the record, and the workflow comment should say, as the Node refresh does, that a pull request opened with the workflow token starts no CI until someone with write access reopens it.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claims:
    • Runs weekly on Monday at 11:23 UTC or on demand: verified (interaction-record-refresh.yml:18-21, workflow test).
    • Finds each lane's three latest successful full runs by run name: false for WebKit (one page of 100 dispatches; the description's own run found two), the first finding.
    • Records each run separately with the planner's recorder from each leg's full job log: verified (interaction-record-refresh.yml:66-80).
    • Keeps each spec's median and leaves the record format unchanged: verified (interaction-record-refresh.mjs:45-62 and :177-180, median tests).
    • Reports coverage in the step summary, with a warning-only early warning under nine in ten: verified (interaction-record-refresh.mjs:187-200, coverage tests).
    • Force-updates one fixed branch, keeps its commit when it already carries the record, opens or refreshes one pull request, and never pushes to main: verified (interaction-record-refresh.yml:93-115, pull request and no-push tests).
    • Same shape as the Node record refresh: verified for the branch, pull request and permissions; its pull request helper is copied rather than shared, the second finding.
    • An earlier ruling covers refresh pull requests: not verifiable from the repository.
    • The refresh pull request body names the runs, coverage and fixed branch and asks for a review at each head: verified (interaction-record-refresh.mjs:89-105, body test).
    • Ten tests pass: verified at this head.
    • A local record run timed 127 of 130 specs on both lanes: not reproduced, since it needs main's job logs; its two-run WebKit count supports the first finding.
    • WebKit times 100 of 130 specs today and trips the warning at 76.9%: verified at this head.
    • Prettier and actionlint are clean: Prettier verified; actionlint not run here, and the run scripts parse as bash.
    • A changed spec reaches the record once two of three sampled runs carry it: verified for Chromium; WebKit with two runs takes their mean.
    • One short weekly job that reads logs and runs no tests: verified (no test step).
  • Files:
    • .github/workflows/interaction-record-refresh.yml: first finding; the CI-start comment (non-blocking).
    • .github/scripts/interaction-record-refresh.mjs: second finding; seconds-per-test not carried (non-blocking).
    • .github/scripts/interaction-record-refresh.test.mjs: clear.

Automated review (maintainer link)

…e median time a test too, shares the Node refresh's pull request helper, and says a token-opened pull request needs a reopen for CI
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 48253bf

@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 weekly interaction-times refresh has an engineering owner's approval at this head, and both fixes from the last review are in, but two new fixes remain.

  • Miss: coverageOf in interaction-record-refresh.mjs (lines 73-77) and its MIN_TIMED_SHARE repeat coverage and MIN_RECORDED_SHARE from node-record-refresh.mjs, the module this script already imports from, so give coverage a minimum-share option (as openOrRefresh gained branch), call it with 0.9, and delete the copy.
  • The description's overlap line says #11910 and #11921 touch a different record and script, but this head changes node-record-refresh.mjs, which both of them change (they still merge cleanly), so please correct that line.

Also worth fixing, both missed by the last review: the early warning says every untimed spec is costed at the mean time a test, but the planner first uses the other browser's recorded time (Chromium times 27 of the 30 specs WebKit lacks), and the CI impact: line could add the runner class, the pull-request job-minutes and the time to green. CI has not run on this draft yet.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claims:
    • Nothing kept the recorded interaction times current, and a stale Chromium time let a leg overrun its job until a hand re-record: verified (no refresh workflow on the base; the earlier re-record's description).
    • WebKit times 100 of 130 interaction specs and trips the warning at 76.9%: verified (the coverage command at this head).
    • Runs weekly on Monday at 11:23 UTC or on demand: verified (workflow lines 21-25, workflow test).
    • Finds each lane's up to three latest successful full runs by run name among 600 dispatches: verified (workflow lines 66-67, the run names in ci.yml).
    • Records each run on its own with the planner's recorder from each leg's full job log: verified (workflow lines 72-88).
    • Keeps each spec's median and the median mean time a test, with the record format unchanged: verified (script lines 48-66 and 133-152, median tests, the median command on a scratch record).
    • Reports coverage in the step summary with a warning-only early warning under nine in ten: verified (script lines 160-172, coverage tests, exit 0).
    • A pull request opened with the workflow token starts no CI until someone with write access reopens it, as the workflow and the body say: verified (workflow lines 15-17, script line 109).
    • Force-updates one fixed branch, keeps its commit when it already carries the record, opens or refreshes one pull request and never pushes to main: verified (workflow lines 99-121, tests).
    • Same shape as the Node refresh, under an earlier ruling on refresh pull requests: the shape is verified; the ruling is not in the repository and is not relied on.
    • pr uses the Node refresh's openOrRefresh, whose new branch option keeps the Node branch by default, and its percent: verified (node-record-refresh.mjs line 192, script line 29).
    • The body names the runs, the coverage lines and the fixed branch, and asks for a review at each head: verified (script lines 93-111, body test).
    • Ten tests cover the median, the warning, one open pull request, the body and the workflow contract: verified (10 pass).
    • A local record run timed 127 of 130 specs on both lanes: not reproduced, since it needs main's job logs.
    • Prettier is clean and this script's 10 tests plus the Node refresh's tests pass (38): verified; actionlint was not run here, and the run scripts parse as bash.
    • A changed spec time reaches the record once two of three sampled runs carry it: verified for three runs; with two runs it moves halfway at once.
    • One short weekly job that reads logs and runs no tests: verified (no test step); runner class, pull-request minutes and time to green are left implicit.
    • The overlap check found the two Node refresh pull requests touch a different record and script: false, the second finding.
  • Files:
    • .github/scripts/interaction-record-refresh.mjs: first finding; the early-warning wording (non-blocking).
    • .github/scripts/node-record-refresh.mjs: the optional branch keeps the Node refresh unchanged; coverage here is the helper to extend (first finding).
    • .github/workflows/interaction-record-refresh.yml: clear.
    • .github/scripts/interaction-record-refresh.test.mjs: clear.

Automated review (maintainer link)

…wn bar, and its warning names the other browser's time as the first fallback
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 1932855

@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: CI has not run on this head yet because the pull request is a draft; marking it ready for review starts it, and the merge guard waits for the required checks.

Both fixes from the last review are in: the interaction refresh now uses the Node refresh's coverage at its own nine-in-ten bar, and the description's overlap note matches the two open Node-refresh pull requests, which still merge cleanly with this head. An engineering owner's approval at this exact head records the decision for the weekly refresh, which no current CI spec clause covers.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none.
  • Claim: stale Chromium times let a leg run into the 15-minute job limit, fixed by hand earlier. Verified against that fix's description.
  • Claim: the WebKit record times 100 of 130 interaction specs. Verified at this head (76.9%).
  • Claim: the workflow runs Mondays at 11:23 UTC or on demand. Verified in its schedule.
  • Claim: each lane takes up to three latest green full runs of main from its latest 600 dispatches, by the CI workflow's run names. Verified against the workflow and the CI run names.
  • Claim: each run is recorded on its own from each leg's complete job log with the existing recorder. Verified (the recorder writes in a scratch copy per run).
  • Claim: the record keeps each spec's median and the median time a test, in the same one-number-per-spec format. Verified in the script and its tests.
  • Claim: coverage goes to the step summary, with an early warning under nine in ten that never fails the job. Verified by running the coverage command at this head.
  • Claim: a pull request opened with the workflow token starts no CI until someone with write access reopens it, as the workflow and body say. Verified (CI listens for reopened pull requests).
  • Claim: a changed record force-updates one fixed branch, keeps its commit when unchanged, opens or refreshes one pull request, and never pushes to main. Verified in the push step and the tests.
  • Claim: the shape matches the Node record refresh. Verified; the cited ruling on refresh pull requests is not in the repository, and the review does not rely on it.
  • Claim: the script reuses the Node refresh's coverage, pull-request helper and percent formatting, and the two new options keep their defaults. Verified.
  • Claim: the warning describes how the planner costs an untimed spec. Verified against the planner's fallback order.
  • Claim: ten tests cover the median, the warning, one open pull request, the body and the workflow contract. Verified: ten pass.
  • Claim: a local re-record from three nightly and two weekly runs times 127 of 130 specs in each lane. The runs are confirmed green on main; the counts were not reproduced.
  • Claim: Prettier is clean and this script's and the Node refresh's tests pass (38). Verified; actionlint was not rechecked.
  • Claim: the CI impact is one weekly job of about five minutes, with no change to pull-request job-minutes or time to green. Verified (schedule and dispatch only).
  • Claim: both open Node-refresh pull requests change the same script, each merges cleanly with this one, and they conflict with each other. Verified with a merge of each.
  • File .github/workflows/interaction-record-refresh.yml: clear.
  • File .github/scripts/interaction-record-refresh.mjs: clear.
  • File .github/scripts/interaction-record-refresh.test.mjs: clear.
  • File .github/scripts/node-record-refresh.mjs: clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 19, 2026 02:19
@cixzhang
cixzhang merged commit d1d6bd1 into main Nov 19, 2026
204 of 206 checks passed
@github-actions
github-actions Bot deleted the ci/interaction-record-refresh branch November 19, 2026 06:05

This branch was successfully deployed

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