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

/search answers under 80 ms signed out, Server-Timing names repos, issues and code, finished from pull #7064's branch #7112

shipped production is serving it opened this has it
opened this

Second of two pieces split from #6221. Start from pull #7064's branch, scout/6221-search-answers-under-80-ms-signed-out-fo, rebased on main once the grep slots land.

Done:

  • [ ] Server-Timing on /search and GET /api/v1/search splits search into repos, issues and code. The preview already shows this on the branch.
  • [ ] A signed-out /search?q=sqlite over the branch's seed answers with app time under 80 ms. Greps still running at the budget keep their slots from src/search/grep_slots.ts until they settle.
  • [ ] The budget test is deterministic. It injects a grep that never settles rather than timing real greps, and awaits the abandoned promises rather than sleeping. It asserts the exact repositories kept, and at least one row, so dropping everything fails it.

Files: src/core/search.ts, test/search-budget.test.ts

If the check fails in a test this pull does not touch, name it in the pull rather than widening the change.

Before pushing: bun x tsc --noEmit and the tests this names.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs