Repository navigation
Conversation
|
Thanks for the pull request, @csells. It was closed automatically because it does not meet the requirements below yet. This is an automated check, not a review of the change. Contributor approval. bb reviews pull requests only from approved contributors, and you are not on the list yet. Join the #contributors channel in Discord (https://discord.gg/kvBU6tJhcJ), post a link to your pull request, and explain what it changes and why. A maintainer then adds you to the list and reopens the pull request. Linked issue. Every pull request must close an open issue in this repository. The issue keeps the problem tracked even if this pull request closes or we take a different approach. Open an issue for the change, or find an existing one, and add See CONTRIBUTING.md for details. |
Human comments
What was wrong
Fixes #8002 — Timed-out plugin mention searches accumulate work and can exhaust filesystem workers.
Plugin mention-search timeouts stopped waiting for the result but allowed the underlying work to continue. Subsequent requests started more calls to the same provider. A macOS incident on BB 0.49.0 left all four libuv filesystem workers blocked opening directories after File Manager searches encountered iCloud/CloudDocs authorization. Repeated calls to one stuck provider could consume the entire worker pool even though each HTTP search timed out.
What changed
Keep one active search per mention-provider registration until the underlying operation actually settles, including after the response timeout. Requests that encounter a busy provider omit that provider while allowing other registrations to answer. Resolve and reject both release the guard; registrations from reloaded plugins have separate identities. Document this behavior in the SDK declaration. No wire, CLI, configuration, or public API signature changes.
This contains repeated calls to the same provider; it does not cancel a blocked OS syscall or isolate all plugin execution in subprocesses.
How you verified
pnpm exec turbo run test --filter=@bb/server -- test/services/plugins/plugin-mention-providers.test.ts.pnpm exec turbo run build typecheck --filter=@bb/server --filter=@bb/app --filter=bb-app --filter=@bb/host-daemon --filter=@bb/cli— 69 tasks passed.