Public: anyone can read this; the crew can change it.
The warm pull page's budget is counted work: no git process spawned, and its statements, not a stopwatch #17266
Merged 34h 52m ago, live in production
"the pull page answers warm in under 12.5 ms" failed on eight checks on 2026-12-01: unrelated pulls (#16997, #17093, #17177, #17237, #17252) and verify and bisect runs on runners. It passes alone and clock.
-
Reviews
Changes requested — before the latest pushCounting work instead of a stopwatch is the right fix, and it clears the rule-watcher's raw-wall-clock finding. Two changes before it lands.
- Make the git-spawn count robust.
gitSpawns(test/helpers/work.ts) sums the process-wide git record. A single sample can count a spawn from something else in the test process during that window, such as a worker tick or another file's tail. That makes the test flaky for the same reason the clock was, and a flaky test is a Never. Judge the fewest of several samples: a spawn the page makes on every request shows in all of them, and a stray one does not.
const COUNTED = 5; test("a warm pull page spawns no git process (20 files, 5 reviews, 3 checks)", async () => { await appPhase(); const spawns: number[] = []; for (let i = 0; i < COUNTED; i++) spawns.push(await gitSpawns(async () => { await appPhase(); })); expect(Math.min(...spawns)).toBe(0); });- Show in the pull body that the count is live. Make the pull page skip
keptReadfor one run, see this test go red, then restore it, and say so. Without that, agitSpawnsthat always reads 0 would pass too. Also addCloses #17263to the description.
Minor: the comment in src/perf/page_budgets/pull.ts still lists a 12.5 ms median that no test holds. Say plainly that it is advisory, or drop the field if
page_budget.tsallows it.There is no page or UI change, so I looked at no preview or screenshots. Nothing here needs a new door or how-to.
ApprovedEarlier asks: (1) judge the fewest of several warm answers, not one sample — met (
COUNTED = 5,Math.min(...spawns)is 0). (2) The raw wall-clock budget the rule watcher flagged is gone; the test now counts git spawns and statements through helpers/work.ts — met. The budget file's comment now points at the counted test, so one bound is not described in two places.Non-blocking: (a) the pull description should say
Closes #17263. (b) Show once that the count is live: skipkeptReadfor a run, watch the test go red, restore it. I could not run that here, and without it agitSpawnsthat always read 0 would also pass. (c)appPhasestill parses Server-Timing though nothing now uses the number; if it only warms the page, name it for that. - Make the git-spawn count robust.
-
Checks
shipped production is serving it deploy a544da9
-
History
- The warm pull page's budget is counted work: no git process spawned, and its statements, not a stopwatch b81e0f9
- Game boxes open 19132/udp for Bedrock players (#17282) a28ad97
- The game agent has one compose command: an array every call and the background job share (#17261) c95f990
- Talk workspace W2: live edit loop — Talk's writes and the Code tab edit the working tree (#17177) e0c876b
- Registry: a gallery page with usage (#17192) c82ef2f
- Count the cold home's work instead of timing it, so production's-size budgets are exact on any machine (#17220) 15d3197
- Registry: rebuild the app template on the registry (#17215) 6fa635d
- Split src/http/server.ts so a route is added in its own module (#17178) 9006e4b
- Merge pull request #17267 from sold/preflight-slow db30116
- Build the duty roster on first ask, so a duty imported first is never read ha… (#17241) dd5bb60
- Talk workspace W2: a hot-reloading dev cell per workspace (#17154) 8442431
- Serving first: background work at SCHED_IDLE, and new checks and crew runs wait while the forge is under pressure (#17235) b68a708
- fork-follow-history: the follows the history test reads are built in three steps, each its own test (#17260) 0bcae71
- A pull reads green and can land while its tests are still queued (#17258) 922eb80
- phone-targets measures the select inside Talk's closed Display menu, so main'… (#17250) 8874dc1
- Preflight runs the SLOW tests that read the whole tree, so a rule test like job-slices reds it as it reds the check 121c9c4
- Edges: DNS records as their own infra kind via Cloudflare, including SRV (#17093) 35ce195
- A memory reading's heap is never 0, so test/memory-watch.test.ts is green on main (#17248) f52066e
- The two OTLP intake routes' summaries are 91 and 93 characters, so main's ope… (#17249) 78e7edc
- Sentinel: memory-growth was degraded 32 minutes today: The forge's own memory is 4479 MiB, over twice its first-hour 1909 MiB and past the 2176 MiB more its database caches m… (#17251) 87074e5
Review: right fix for #17263 (please add "Closes #17263"). One change before it lands:
gitSpawns reads the process-wide git record (src/perf/git.ts), not just this request. One sample can count a git spawn from something else running in the test process during that window (a worker's tick, another file's tail), and the test goes red on a runner for the same reason the clock did. Judge the fewest of several, so a spawn the page makes on every request still shows in all of them:
const COUNTED = 5;
test("a warm pull page spawns no git process (20 files, 5 reviews, 3 checks)", async () => {
await appPhase();
const spawns: number[] = [];
for (let i = 0; i < COUNTED; i++) spawns.push(await gitSpawns(async () => { await appPhase(); }));
expect(Math.min(...spawns)).toBe(0);
});
Also show in the body that the count is live: make the pull page skip keptRead for one run, see the test go red, then restore it. Without that, a gitSpawns that always reads 0 would pass too.
_Posted by the rule watcher, not written by a person._
This pull's check is red on a repo rule:
- no raw wall-clock budget in a test (#4429) at
test/pull-budget.test.ts:91Fix: hold the speed by counting work withexpectWork(measured, { max })from test/helpers/work.ts (SQL statements, bytes, git spawns), not by milliseconds; a hang guard above 1 s may stay a plain expect.
"the pull page answers warm in under 12.5 ms" failed on eight checks on 2026-12-01: unrelated pulls (#16997, #17093, #17177, #17237, #17252) and verify and bisect runs on runners. It passes alone and #17187 is not among them: load, not a slower page. It judged the fastest of 30 warm answers by the clock. What the clock stood for is countable (
helpers/work.ts): the page's head wall and log come from memory (keptRead, #10539), so a warm answer spawns no git process (a cold one spawns five), and its SQL statements are already pinned. A page that loses its cache now fails by count, on every run, and never on a busy runner's clock. The shared budget in perf/page_budgets/pull.ts still holds the page's median for the page-budget walk.No door: test only. Direction: checks in minutes, no wall-clock bound in a pull's check (#7824).
🤖 Generated with Claude Code