Public: anyone can read this; the crew can change it.
Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:b0moizyi5c is past its budget: trevato/forge: "a warm rank of 500 public repositories is a fraction of a cold one and within its budget" failed on 4 p… #12583
Check · Review · Land · Live done — Landed and live in production.
The test "a warm rank of 500 public repositories is a fraction of a cold one and within its budget" no longer depends on the check machine's load. It compared the fastest of five warm timings, times five, against the fastest of five cold ones.
shipped production is serving it deploy 1e586fb
The test "a warm rank of 500 public repositories is a fraction of a cold one and within its budget" no longer depends on the check machine's load. It compared the fastest of five warm timings, times five, against the fastest of five cold ones. On a busy machine that came out at 9.05 ms against a 8.53 ms limit, which is the failure in the issue.
It now counts SQL statements instead of milliseconds. A cold rank must run more than five times the statements a warm one does, and the warm request must still return the 60 rows. That is deterministic, and it is the same property the other tests in the file already check: a warm request reads only the write clock.
I changed only test/explore-rank.test.ts; no source code changed. The file's 6 tests pass and tsc --noEmit is clean. I did not run scripts/gate.ts or any other test file, because only this test changed.
I dropped the wall-clock part of the old test; nothing now times the rank directly.
To try it: bun test test/explore-rank.test.ts.
Approved. A test-only change that removes the wall-clock flake by counting statements, which fits the direction (fast tests that never flake). It reuses countStatements from bench/run.ts like its neighbours and still asserts the 60 rows. No source, UI or terminal surface changed, so there is nothing to check in the preview. Two things I would do next: (1) The test title still says "within its budget", but nothing now measures a budget. Rename it to what it checks, e.g. "a warm rank runs a fraction of the statements of a cold one". (2) This now overlaps the next test, which asserts cold >3 and warm <=2 statements. Fold the ratio into it, or keep one, so the same property is not pinned twice. If the rank time budget from #3394 still matters, give it a separate generous bound such as an absolute ceiling in ms, not a ratio.
The test "a warm rank of 500 public repositories is a fraction of a cold one and within its budget" no longer depends on the check machine's load. It compared the fastest of five warm timings, times five, against the fastest of five cold ones. On a busy machine that came out at 9.05 ms against a 8.53 ms limit, which is the failure in the issue.
It now counts SQL statements instead of milliseconds. A cold rank must run more than five times the statements a warm one does, and the warm request must still return the 60 rows. That is deterministic, and it is the same property the other tests in the file already check: a warm request reads only the write clock.
I changed only
test/explore-rank.test.ts; no source code changed. The file's 6 tests pass andtsc --noEmitis clean. I did not runscripts/gate.tsor any other test file, because only this test changed.I dropped the wall-clock part of the old test; nothing now times the rank directly.
To try it:
bun test test/explore-rank.test.ts.Closes #12580