Skip to content

fix(dsh-weknora): isolate concurrent scope lookup cancellation - #5580

Open
Ymmcc wants to merge 1 commit into
Tencent:mainfrom
Ymmcc:fix/dsh-isolate-scope-cancellation
Open

Ymmcc wants to merge 1 commit into
Tencent:mainfrom
Ymmcc:fix/dsh-isolate-scope-cancellation

Conversation

@Ymmcc

@Ymmcc Ymmcc commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Description

Unscoped dsh-weknora searches cache the in-flight knowledge base listing with the first caller's AbortSignal. If that tool is cancelled while the listing is pending, an independent search waiting on the shared promise fails with the same cancellation.

Cache the resolved list. On a cold cache, concurrent lookups each keep their own cancellation signal. Later calls reuse the first successful result.

Testing

The regression invokes the real search tool and client with two concurrent unscoped searches. Cancelling the first caused both to fail on main. With the fix, the second search proceeds, and a third search reuses its cached scope. The plugin suite passed all 59 tests and its type check passed.

AI assistance: OpenAI Codex traced the shared-promise failure, implemented the fix and ran the regression.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant