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

The OpenAPI served-routes walk loads its route modules in the hook and runs in two tests, under the 2 s CPU budget #17525

opened this

Merged 13h 19m ago, live in production

Main's check at 15:58 failed: "every described method and path resolves to a handler, not noroute took 2.53 s of CPU, over the 2 s test budget". Measured on the Mac: a first pass over the 545 described routes spent 491 ms of CPU, and a second, warm pass 63 ms.

Notes

opened this

Main's check at 15:58 failed: "every described method and path resolves to a handler, not no_route took 2.53 s of CPU, over the 2 s test budget".

  • Measured on the Mac: a first pass over the 545 described routes spent 491 ms of CPU, and a second, warm pass 63 ms. The cost was importing the route modules a first request loads (#12521), not the requests.
  • beforeAll now imports every module under src/http/routes and src/http/api. That load is the file's cost; hooks don't count against a test's budget.
  • Every route is still requested, and every handler still answers, inside the tests. The walk is two tests of half the routes each.
  • After: the walk took about 255 ms of CPU on the Mac, roughly 1 s on a check runner in one test. Each half is about half that.

No door: a test's shape; nothing anyone sees changes. Direction: main is green before anything else; the CPU budget (#17310) catches heavy tests.

Co-Authored-By: Claude Fable 5 <[email protected]>

🤖 Generated with Claude Code

Sign in to join this conversation.

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

Keyboard shortcuts

Docs