Public: anyone can read this; the crew can change it.
Full suite red: test/notify.test.ts #12863
Check · Review · Land · Live done — Landed and live in production.
test/notify.test.ts "at most ten an hour per person" now runs far under the 2 s test budget. It was 2.38 s in the full suite and now takes about 1 s. The test announced 15 green pulls, each making a real git commit and a pull, but only 10 are needed to prove the cap.
shipped production is serving it deploy 77d0004
test/notify.test.ts "at most ten an hour per person" now runs far under the 2 s test budget. It was 2.38 s in the full suite and now takes about 1 s.
The test announced 15 green pulls, each making a real git commit and a pull, but only 10 are needed to prove the cap. The fourth pull has already used one of the hour's ten sends. Pulls 5–14 then give nine more sends, and the tenth pull is the one that gets refused. The loop now runs i = 5..14 instead of 5..19. The assertion is unchanged: nine more sends after the fourth pull.
Checks:
bun test test/notify.test.tspasses: 9 tests, 39 expects.--rerun-each 3passes in 4.4 s for all three runs of the file.bun x tsc --noEmitandbun scripts/gate.tsreport nothing.- I did not run
scripts/fast.tsor the full suite.
Left out: I did not add the file to SLOW in scripts/gate.ts, and I did not make greenPull itself cheaper. The cap test still creates real commits and pulls. If the full suite on a loaded machine runs it over budget again, the next step is to make that helper cheaper, not to extend the budget.
One-line test change: the cap test now announces 10 pulls (5..14) instead of 15. The arithmetic holds: the fourth pull spent one send of the hour, pulls 5-13 give nine more, and pull 14 is the one refused, so the assertion of 9 still proves the cap. It is a pipeline-first fix (#1242, a time budget per test) and touches no app code, so there is no page, terminal or security surface to review. Two things I would do next: (1) make greenPull cheaper (it makes a real commit and pull each time) so the file is not near budget on a loaded machine; (2) have the test also assert that the tenth announcement was dropped, for example by checking posts.length is unchanged after one more pull, so the test names the refusal instead of only counting sends.
test/notify.test.ts"at most ten an hour per person" now runs far under the 2 s test budget. It was 2.38 s in the full suite and now takes about 1 s.The test announced 15 green pulls, each making a real git commit and a pull, but only 10 are needed to prove the cap. The fourth pull has already used one of the hour's ten sends. Pulls 5–14 then give nine more sends, and the tenth pull is the one that gets refused. The loop now runs
i = 5..14instead of5..19. The assertion is unchanged: nine more sends after the fourth pull.Checks:
bun test test/notify.test.tspasses: 9 tests, 39 expects.--rerun-each 3passes in 4.4 s for all three runs of the file.bun x tsc --noEmitandbun scripts/gate.tsreport nothing.scripts/fast.tsor the full suite.Left out: I did not add the file to SLOW in
scripts/gate.ts, and I did not makegreenPullitself cheaper. The cap test still creates real commits and pulls. If the full suite on a loaded machine runs it over budget again, the next step is to make that helper cheaper, not to extend the budget.Closes #12841