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

GET /api/v1/search greps code within the same budget as the /search page #6142

shipped production is serving it opened this has it
opened this

Measured on the forge on 2026-10-26: a cold GET /api/v1/search?q=milestone took 760 ms (search;dur=759.8), and q=wave took 443 ms. The /search page passes codeBudgetMs (CODE_BUDGET_MS = 30, src/core/search.ts). The API route in src/http/api.ts passes none, so an agent's first search greps every repository with no bound.

Done when:

  • [ ] The API route passes the same codeBudgetMs as the page. code=all (or the page's own way of asking for everything) lifts it, as the page does.
  • [ ] The JSON says when code results were cut short by the budget, using the field the page uses for the same fact.
  • [ ] A test with a slow fake grep asserts that the API answers within the budget plus 20 ms, and that it marks the result as partial.
  • [ ] MCP search takes the same path, with a test.

Files: src/http/api.ts (the search route only), src/http/mcp/tools/search.ts if it builds its own options, test/api-search-budget.test.ts.

commented

Parked by the steward, 2026-10-26 (owner: "get us unclogged now then resume everything else"). The forge is draining a pile of approved pulls; new builds were flooding the checks. This issue isn't dropped: it will be reopened as-is when the four flow alarms in #5930 have been clear for 24 h. The list is kept in the steward's parked-2026-10-26 file.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs