-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(integration-tests): stabilize async SDK MCP tool handler E2E (#8222) #8223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] This stabilized test is not exercised by any PR-gating CI check.
integration-tests/is outside every npm workspace, so the workspacenpm testnever collects it; the only workflow that runs it (e2e.yml) has nopull_requesttrigger and runs post-merge onmain, nightly, and on-demand. (The skippedIntegration Tests (CLI, No Sandbox)check runs theclisuite viatest:integration:cli:sandbox:none, not thesdk-typescriptsuite this file lives in, so it would not collect this test even when it runs.)Failure scenario: if the new assertion were defective — e.g.
MCP_DELAYED_RESPONSEnot matching the real tool name sotoolResultsis empty andtoBeGreaterThan(0)should fail — no PR check would catch it; the PR merges green and the failure surfaces only post-merge onmainor at the nightly run. (The assertion is in fact type-correct and the tool name matches — this is a verification gap, not a known defect.)Concrete step before merge: run the SDK suite on-demand against a live model —
npm run test:integration:sdk:sandbox:none(or target this file:QWEN_SANDBOX=false npx vitest run --root ./integration-tests sdk-typescript/sdk-mcp-server.test.ts).中文说明
[建议] 本次稳定化后的测试不会被任何 PR 门禁 CI 检查执行。
integration-tests/不在任何 npm workspace 内,因此 workspace 的npm test永远不会收集它;唯一运行它的 workflow(e2e.yml)没有pull_request触发器,仅在合并到main后、每夜定时以及手动触发时运行。(被跳过的Integration Tests (CLI, No Sandbox)检查通过test:integration:cli:sandbox:none运行的是cli套件,而非本文件所在的sdk-typescript套件,因此即便它运行也不会收集本测试。)失败场景:如果新断言存在缺陷——例如
MCP_DELAYED_RESPONSE与真实工具名不匹配,导致toolResults为空、toBeGreaterThan(0)本应失败——没有任何 PR 检查会捕获它;PR 会以绿色合并,失败只会在合并到main后或每夜运行时才显现。(事实上该断言类型正确、工具名也匹配——这是一个验证缺口,而非已知缺陷。)合并前的具体步骤:针对真实模型按需运行 SDK 套件——
npm run test:integration:sdk:sandbox:none(或只运行本文件:QWEN_SANDBOX=false npx vitest run --root ./integration-tests sdk-typescript/sdk-mcp-server.test.ts)。— qwen3.8-max-preview via Qwen Code /review