Repository navigation
ci: refresh the Node legs' recorded times, and fail when the record falls a tenth behind - #11272
Conversation
…the suite scripts/vitest-node-durations.json recorded 830 Node test files while 1,057 run; theme-hunt, theme-stress and eight swizzle-proof parts had no time, so the sequencer counted each as the median (about 0 s) and they could share one leg. The file is re-recorded from the Main workflow's six Node legs (run 43050442090), and a test fails when more than one Node test file in ten has no recorded time.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested. The regenerated durations file is right: it is exactly what the sequencer's record mode writes from the cited Main run, and it balances the four Node legs. The new guard needs two fixes before this lands.
- The guard promises more than it checks: its title says new slow suites "cannot pile into one leg" and the description says missing slow suites "show up in review", yet it counts files, not time, so a record missing all 22 slow suites that main's file lacks (theme-hunt, theme-stress and swizzle-proof.1–8 among them) still passes at 3.1% while the slowest leg grows from 1,293 to 1,485 recorded test-seconds; reword the test title, the description and the pull request title to what the test proves, that the record cannot fall more than one file in ten behind unnoticed.
- The guard's regex (
scripts/vitest-shard-sequencer.test.mjs:38-41) hand-copies thenodeproject's globs and turnspackages/**/src/**intopackages/[^/]+/src/, so it skips the 21 theme suites underpackages/themes/*/src/that the project runs; read the node project's include and exclude lists fromvitest.config.ts, asuiTestRootsin.github/scripts/fs-guard-tests.mjsalready does forui, and delete the copy.
Optional: name the regeneration command in the guard's failure message, since that failure lands on whichever pull request crosses the line.
Claims and files checked
- Claim: the legs split by recorded per-file times through
scripts/vitest-shard-sequencer.mjsandscripts/lib/duration-split.mjs: verified (vitest.config.tssequence.sequencer;vitest-shard-sequencer.mjs:44-50). - Claim:
test-node (1/4)hit its limit on #9810 after vitest finished green: verified (cancelled at 15 min 16 s, 47 s after its last file passed). - Claim:
test-node (1/4)ran 518–834 s; pull-request runners run up to 1.2× slower: not checked (timings of other runs). - Claim: the record held 830 files while 1,057 run: verified (830 entries at the base; the head's 1,057 are all collected).
- Claim: theme-hunt (245 s), theme-stress (270 s) and eight swizzle-proof parts (up to 161 s) had no time: verified.
- Claim: a file with no time counts as the median, about 0 s: verified (
duration-split.mjs:28-33; the median is 0.2 s). - Claim: re-recorded with
recordmode from Main run 43050442090, all green, covering 1,057 files: verified (byte-identical reproduction from its six Node leg logs). - Claim: the guard uses the Node project's
vitest.config.tsglobs: false (the regex misses 21 theme suites). - Claim: missing slow suites then show up in review: false (all 22 slow suites main's file lacked can be missing and the guard passes).
- Claim: main's file fails the guard at 22.8% and this one passes: verified (0.2275 on the base record; 15/15 on the head).
- Claim: the same four
test-nodejobs, names, split code and 15-minute limit: verified (only the two files below change). - Claim: estimates of 1,590 before, 1,399 per leg after and 1,119 with five legs: verified on the record's own files; on the 1,067 files CI splits, the base record's peak is 1,798.
- Claim: wall time ≈ 160 s + 0.33 s per test-second: not checked (the author's fit).
- Claim: +0 jobs: verified (no workflow change).
- Title: "require them to cover the suite": false (nine in ten of a hand-copied list).
- File
scripts/vitest-node-durations.json: clear. - File
scripts/vitest-shard-sequencer.test.mjs: the two findings above.
…t.config.ts It listed files with a hand copy of the globs that already missed the theme suites under packages/themes/*/src/. It now reads the node project's include and exclude lists and lists the files with fs.globSync. Its title says what it proves, that the record cannot fall more than one file in ten behind unnoticed, and its failure names the regeneration command.
There was a problem hiding this comment.
Approved. Both earlier findings are fixed: the guard's test title, the description and the pull request title now describe what it checks, and it reads the node project's globs from vitest.config.ts, so it counts exactly the 1,067 files Vitest collects. The regenerated durations file is exactly what the sequencer's record mode writes from the cited Main run, the guard fails on main's record (238 of 1,067 files unrecorded) and passes here, and CI is green on this head.
Optional: the config reader repeats the block regex in uiTestRoots (.github/scripts/fs-guard-tests.mjs); one shared reader would leave a single place to update if the project format changes.
Claims and files checked
- Claim:
test-node (1/4)ran 518–834 s against its 15-minute limit: verified in substance (in ten pull-request CI runs from the hour before this pull request it took 492–853 s when it passed, and once hit the limit). - Claim: on #9810 it hit the limit after Vitest had finished green: verified (its
test-node (1/4)was cancelled after 15 min 16 s, after its last file passed). - Claim: the legs split by recorded per-file times through
scripts/vitest-shard-sequencer.mjsandscripts/lib/duration-split.mjs: verified (vitest.config.ts:112;vitest-shard-sequencer.mjs:44-50). - Claim: the record held 830 files while 1,057 run: verified (830 entries at the base; 1,057 recorded from the cited run).
- Claim: theme-hunt (245 s), theme-stress (270 s) and eight swizzle-proof parts (up to 161 s) had no time: verified (absent at the base; 245.2 s, 270 s and 83.8–161.2 s here).
- Claim: a file with no time counts as the median, about 0 s: verified (
duration-split.mjs:28-33). - Claim: re-recorded with
recordmode from Main run 43050442090, all green, covering 1,057 files: verified (byte-identical reproduction from its six Node leg logs). - Claim: the guard fails above one file in ten unrecorded, reads the include and exclude lists from
vitest.config.ts, lists files withfs.globSyncand names the regeneration command: verified (vitest-shard-sequencer.test.mjs:34-59; its list equals Vitest's node collection). - Claim: it does not catch a few slow files missing from an otherwise fresh record: verified (10% of 1,067 allows 106 unrecorded files).
- Claim: on main's record it fails (238 files unrecorded); here it passes: verified (0.223 on the base record; 10 of 1,067 here; 15/15 tests pass locally and in CI).
- Claim: the same four
test-nodejobs, names, split code and 15-minute limit: verified (only the two files below change). - Claim: wall time is about 160 s plus 0.33 s per summed test-second, fitted to the six Main legs: verified (within about a minute of each leg of the cited run).
- Claim: pull-request runners have run up to about 1.2× slower: verified (33 pull-request legs ran 0.88–1.25× that model).
- Claim: estimates of 1,590 test-seconds before, 1,399 per leg after and 1,119 with five legs: verified on the record's 1,057 files; on the 1,067 files CI splits, the old record's slowest leg is 1,798, so the gain is larger than stated.
- Claim: +0 jobs, and the slowest leg falls by about a minute: verified (no workflow change; 11.4 to 10.4 minutes by the model).
- Title: "fail when the record falls a tenth behind": verified.
- File
scripts/vitest-node-durations.json: clear. - File
scripts/vitest-shard-sequencer.test.mjs: clear (one optional note above).
Who this helps
Authors whose pull request runs the Node tests.
test-node (1/4)ran 518–834 s against its 15-minute limit, and on #9810 it hit the limit after vitest had finished green. The four legs are split by recorded per-file times (scripts/vitest-shard-sequencer.mjsonscripts/lib/duration-split.mjs), but the record was stale.Cause
scripts/vitest-node-durations.jsonrecorded 830 Node test files while 1,057 run. The slow CLI suites added since had no time:theme-hunt(245 s),theme-stress(270 s) and eightswizzle-proofparts (up to 161 s each). The sequencer counts a file with no time as the median, about 0 s, so it treated them as cheap and could put several in one leg.What changes
recordmode from the Main workflow's six Node legs (run 43050442090, all green). It now covers 1,057 files.scripts/vitest-shard-sequencer.test.mjsfails when more than one in ten of the Node project's test files has no recorded time, so the record cannot fall far behind unnoticed. It reads the project's include and exclude lists fromvitest.config.tsand lists files withfs.globSync, and its failure names the regeneration command. It does not catch a few slow files missing from an otherwise fresh record; re-recording does. On main's record it fails (238 files unrecorded); here it passes.test-nodejobs, names, split code and 15-minute limit.Estimates
Wall time per leg ≈ 160 s + 0.33 s per summed test-second, fitted to the six Main legs. PR runners have run up to about 1.2× slower.
CI impact
+0 jobs. The same four legs, balanced; the slowest leg falls by about a minute.