Repository navigation
ci: record the Chromium interaction times from a full run, so no leg plans past ten minutes on a stale time - #12703
Conversation
…plans past ten minutes on a stale time
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 750ef10 |
PR Analysis Report🔎 Preview ·
|
| 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 | 65 min | +37.1 min |
| Runs a day | 298 | 298 | 0 |
Not measured (the jobs that use these keep their recent minutes above): .github/scripts/playwright-legs.test.mjs.
Flags: time to green +37.1 min.
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.
Approved pending CI. The re-record is faithful: re-running playwright-legs.mjs record --key interaction-chromium --project chromium on that run's six Chromium leg logs reproduces .github/playwright-leg-durations.json byte for byte, and the 129 listed specs now plan into 7 legs of 456-459 s (9.1 minutes with the 90 s of setup) instead of the 6 legs whose fifth was cancelled at the job limit. The heavy suites have not run on this head, so this is not "ready to merge": the merge guard still needs them green once the pull request leaves draft.
No blocking findings. Three things worth your eye:
- The coverage case turns
test-nodered on every open pull request once 13 more interaction specs exist (127 timed of the tree's 129 today; red at 142 files), and the failure reads onlyexpected 0.894 to be greater than or equal to 0.9— it names neither the record command nor who re-records. The Node record solves the same drift with an automatic refresh and never fails a pull-request check on coverage; worth either matching that shape or at least naming the remedy in the assertion. - The new leg case prices an untimed spec at
seconds-per-testfor the leg count but at the median recorded time insideplanLegs, and the lane itself prices it at the WebKit time, then its test count × the mean. Building the costs withcostsFor/estimateSecondsandfallback: durations['interaction-webkit'], as the case at line 1411 does, keeps the test honest to the planner. - The 12-minute case largely repeats "fits every leg in ten minutes at today's recorded times, within the matrix", which is stricter and covers both lanes — and which passes on
main's record, so it is the coverage case that does the work here.
One correction for the description: on main the coverage check counts 129 interaction spec files, not 127 (100 timed, 0.775); 127 was the count at the measured run's head.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Leg 5 of 6 passed every test in 13.6 minutes and was then cancelled at the 15-minute job limit — verified in that job's log.
- The planner had costed that leg at about 461 s plus 90 s of setup — verified in the leg count and plan lines of the same run.
- The times it planned from were recorded on 11/08 — verified from the record's own history.
- LightboxPaging was recorded at 100.9 s and ran 403 s; LightboxZoom at 95.1 s and ran 140 s — verified against the re-recorded values (403.5 s, 140.2 s).
- 27 of that run's 127 spec files had no recorded time and were costed at the mean time a test — verified: 27 untimed, none with a WebKit time, so each fell through to its test count times the mean.
- The record is re-recorded with the named command from all six Chromium legs, all 127 spec files, about 3,190 s — verified: the command reproduces the file byte for byte, 127 entries, 3,191.9 s.
- The planner and its limits are unchanged — verified: neither the planner nor the workflow is in the diff.
- The suite now plans 7 legs of about 456 s each, about 9 minutes with setup, instead of 6 — verified: 7 legs of 456.5-458.9 s, 546.5-548.9 s with setup.
- The two new checks do what the description says — verified by reading and running them.
- No timeout changes — verified.
- Red-first: the coverage check fails on
main's record and both new checks pass here — verified, with the count correction above. - The rest of the file passes except one case that fails the same way on
main— not reproduced: in this review's sandbox seven cases fail identically on both trees because it refuses to create a scratch git repository; no case fails on this head that passes on the base. - Prettier clean — verified.
- CI impact: 7 legs instead of 6, about 9 minutes each instead of up to 13.6, the same job-minutes on the same runner class — verified; the total also carries one extra leg's 90 s of setup.
.github/playwright-leg-durations.json— clear: every one of its 127 entries names a file that exists at this head, the entries are sorted, and no value departs from the generated record..github/scripts/playwright-legs.test.mjs— the four non-blocking findings above; the rest of the block reads correctly, and itsgit ls-filescall takes a fixed argument list with no shell and no untrusted input.
| // undercounts a slow spec; the legs then run past the time they planned. | ||
| expect(specs.length).toBeGreaterThan(100); | ||
| const timed = specs.filter(file => recorded[file] != null); | ||
| expect(timed.length / specs.length).toBeGreaterThanOrEqual(0.9); |
There was a problem hiding this comment.
Nothing re-records this file, so coverage only falls: with 127 timed of the tree's 129 interaction specs, the 13th spec added before the next re-record (127/142 = 0.894) turns test-node red for every open pull request, and the author sees only expected 0.894 to be greater than or equal to 0.9.
The Node record meets the same drift with a refresh job that opens a durations pull request, and AST-030 FR22 adds "No pull-request check fails on the record's coverage". At a minimum, let the failure name its remedy:
expect(
timed.length / specs.length,
'Re-record with: node .github/scripts/playwright-legs.mjs record --key interaction-chromium --project chromium <job logs>',
).toBeGreaterThanOrEqual(0.9);| const seconds = specs.reduce( | ||
| (sum, file) => | ||
| sum + | ||
| (recorded[file] ?? |
There was a problem hiding this comment.
This prices a spec with no recorded time at seconds-per-test (1.72 s), while planLegs below prices the same spec at the median recorded time (about 9 s), and the lane itself prices it at the WebKit time, then its test count times the mean, then the median (estimateSeconds, costsFor). With two untimed specs the gap is under 20 s; at the 90% floor this case allows it is about 110 s the leg count never sees.
costsFor(specs, recorded, {fallback: durations['interaction-webkit'], testsOf, perTest}), as the case at line 1411 builds it, keeps the check honest to the planner it models.
Who this helps
Authors whose pull request runs the full Chromium interaction suite. Leg 5 of 6 in run 44389311720 (#12644) passed all of its tests in 13.6 minutes and was then cancelled at the 15-minute job limit. The planner had costed that leg at about 461 s plus 90 s of setup, but the times it planned from were recorded on 11/08 and no longer match the suite:
LightboxPaging.interaction.browser.spec.tswas recorded at 100.9 s and ran 403 s.LightboxZoomwas recorded at 95.1 s and ran 140 s.What changes
.github/playwright-leg-durations.json: theinteraction-chromiumtimes are re-recorded withnode .github/scripts/playwright-legs.mjs record --key interaction-chromium --project chromiumfrom all six Chromium legs of that full run (all 127 spec files, about 3,190 s of proofs; the cancelled leg had already finished its tests). The planner and its limits are unchanged: at 600 s a leg and 90 s of setup, the suite now plans 7 legs of about 456 s each (about 9 minutes with setup) instead of 6 legs it could not keep.playwright-legs.test.mjs: the record must time at least nine in ten of the spec files the suite runs (an untimed spec is costed at the mean time a test, which undercounts a slow one), and the whole suite planned from the record with the leg count job's limits must leave every leg within 12 minutes.No timeout changes.
Tests
playwright-legs.test.mjspasses, except one case that fails the same way on main on this machine (it lists specs through Playwright from a copy outside the checkout).CI impact
CI impact: a full Chromium interaction run takes 7 legs instead of 6, about 9 minutes each instead of up to 13.6 (and a cancelled leg). The same job-minutes in total, on the same runner class.
Overlap checked: none
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.