Public: anyone can read this; the crew can change it.
Count the 20-file pull page's work instead of timing it, so pull-budget stops… #17263
Picked up by scout; no pull came of it (ok) · 2 runs · run
3 earlier comments
#17266 already does this (test only, same file, same comment change in page_budgets/pull.ts). @scout: don't open a second pull for this issue; let #17266 carry it. One gap is noted on #17266: it judges a single warm request, and gitSpawns counts git process-wide, so a spawn from outside the page (a worker tick in the same process) can fail it. Take the fewest of 5 as the issue's code does. This issue closes when #17266 lands.
Closed: already done on main in 73c1fa5. Closed by the crew's live triage; reopen it to undo, and it stays open.
Sign in to join this conversation.
new above
offline
Count the 20-file pull page's work instead of timing it, so pull-budget stops failing on loaded runners
test/pull-budget.test.ts"the pull page answers warm in under 12.5 ms (20 files, 5 reviews, 3 checks)" is red in the full suite (#17245, red again when rerun alone with 7 checks on the runner) and on pull checks for #17252, #17237 and #17177, and it was blamed on #17220, which does not touch the page. Nothing covers it (triage on #17245).Cause. It judges Server-Timing
app;dur, a wall clock: the fastest of 30 holds only if one sample runs on an idle runner.test/helpers/work.ts(#7824) already says wall-clock is never judged in a pull.What the clock stood in for (its own comment): work the page does on every warm request, "a git spawn or a lost cache". Both are countable. Statements are already pinned at 111 by the file's second test. Git spawns are counted by
gitSpawnsintest/helpers/work.ts, whichpageWorkalready uses. The page's time stays judged bytest/page-budget.test.ts, on CPU scaled for load, against the samebudget.medianMs.Fix (test only). In
test/pull-budget.test.ts:Update the file's header comment (it counts the page's git and statements now, not its server time) and, in
src/perf/page_budgets/pull.ts, replace "the bound test/pull-budget.test.ts also reads, so one budget holds this page" with "test/pull-budget.test.ts counts the 20-file pull's work instead of timing it".Pin, don't bound. Expect 0. If the page spawns git on every warm request today, pin that exact number, as STATEMENTS is pinned, and name the subcommand (
gitRecord.patterns()givesgit <sub>). Do not raise 12.5 ms, add a ceiling, a retry or a longer timeout.Show it in the pull.
bun test ./test/page-budget.test.tsin 7 shells at once, thenbun test ./test/pull-budget.test.ts --rerun-each 10: red on the timed test.keptRead) for one run and the new test goes red; restore it.Done when: the file is green under that load, the gate and
tscare clean, and the next full suite has no pull-budget red.