v1.108.92 — Progress-notification flood control + response drain (#359)
Full-repo index_folder over MCP stdio could lose its tool result on large repos: the indexer emitted one notifications/progress per file (~2,000 in ~4s on a 2,000-file walk), and fire-and-forget scheduling let notifications trail the response — which strict MCP clients treat as a protocol error.
Fixed
- Progress notifications are throttled: at most one per 1% of forward progress and one per 100ms of wall clock; the final 100% send always goes out. A 2,000-file walk now emits ~20-40 notifications instead of ~2,000.
- The dispatcher drains all in-flight notifications before the tool response is written, on every success and error path, so a notification can never trail its response.
No behavior change for clients that don't send a progressToken. No index-schema bump — existing indexes work as-is.
Reported in #359 on a 2,118-file TypeScript monorepo; reproduced and wire-verified against a raw stdio driver (result delivered, 17 notifications, zero stragglers). Full suite: 5005 passed / 8 skipped.