Public: anyone can read this; the crew can change it.

Full suite red: test/security-floor-routes.test.ts #18234

opened this in answer to

Merged 18h 58m ago, live in production

The signed-out walk of the repository pages' first half took 2.48 s of CPU, over the 2 s test budget. I fixed it by splitting those pages into four quarters of about 33 patterns, so each walk is half the size.

Notes

opened this

The signed-out walk of the repository pages' first half took 2.48 s of CPU, over the 2 s test budget. I fixed it by splitting those pages into four quarters of about 33 patterns, so each walk is half the size.

  • What changed: test/security-floor-routes.test.ts now walks the repository pages as four quarters instead of two halves. Each quarter still gets the unknown-path check and still runs both signed out and signed in. The comment says why.
  • One assertion loosened: the "each part is a real share of the table" check now wants more than 25 patterns per part, down from 50. A quarter holds about 33 of the 131 repository GET patterns.
  • Not touched: the other-pages halves, which hold 171 patterns each but did not trip the budget, and SLOW in scripts/gate.ts.
  • Checked: the file passes (21 tests), including a --rerun-each 3 run, and bun x tsc --noEmit is clean. bun scripts/gate.ts --fix rewrapped one comment, which is committed. I did not run gate.ts --explain or the other tests the issue lists. I did not time the quarters against the 2 s budget either, because the file's own timeouts are 9 s.
  • Doors: the commits say No door: a test-only change.

To try it: bun test ./test/security-floor-routes.test.ts --rerun-each 10.

Closes #18231

commented

The signed-out walk of the repository pages' first half took 2.48 s of CPU, over the 2 s test budget. I fixed it by splitting those pages into four quarters of about 33 patterns, so each walk is half the size.

  • What changed: test/security-floor-routes.test.ts now walks the repository pages as four quarters instead of two halves. Each quarter still gets the unknown-path check and still runs both signed out and signed in. The comment says why.
  • One assertion loosened: the "each part is a real share of the table" check now wants more than 25 patterns per part, down from 50. A quarter holds about 33 of the 131 repository GET patterns.
  • Not touched: the other-pages halves, which hold 171 patterns each but did not trip the budget, and SLOW in scripts/gate.ts.
  • Checked: the file passes (21 tests), including a --rerun-each 3 run, and bun x tsc --noEmit is clean. bun scripts/gate.ts --fix rewrapped one comment, which is committed. I did not run gate.ts --explain or the other tests the issue lists. I did not time the quarters against the 2 s budget either, because the file's own timeouts are 9 s.
  • Doors: the commits say No door: a test-only change.

To try it: bun test ./test/security-floor-routes.test.ts --rerun-each 10.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs