-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(ci): align non-Linux Vitest unhandled-error handling across unit suites #10443
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
Show all changes
17 commits
Select commit
Hold shift + click to select a range
4c78916
fix(ci): extend the vitest RPC-timeout exemption to every unit suite …
qwen-code-dev-bot a7888a3
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot fb2e4fd
refactor(ci): collapse duplicated vitest exemption rationale to witne…
qwen-code-dev-bot 1aedd30
refactor(ci): extend vitest rationale pointer consolidation to remain…
qwen-code-dev-bot 137371c
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot a255ac8
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot 19dd7fb
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot 4986343
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot f6c711d
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot d64b692
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot f035ce0
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot a0ce123
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot 57faaf9
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot 44025dd
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot 7dbf485
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot b2cb164
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot b15a89e
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| /** | ||
| * @license | ||
| * Copyright 2026 Qwen Team | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| import { describe, expect, it } from 'vitest'; | ||
|
|
||
| import externalContextConfig from '../../integrations/external-context/vitest.config.js'; | ||
| import externalContextMem0Config from '../../integrations/external-context-mem0/vitest.config.js'; | ||
| import acpBridgeConfig from '../../packages/acp-bridge/vitest.config.js'; | ||
| import audioCaptureConfig from '../../packages/audio-capture/vitest.config.js'; | ||
| import channelsBaseConfig from '../../packages/channels/base/vitest.config.js'; | ||
| import dingtalkConfig from '../../packages/channels/dingtalk/vitest.config.js'; | ||
| import dwsConfig from '../../packages/channels/dws/vitest.config.js'; | ||
| import feishuConfig from '../../packages/channels/feishu/vitest.config.js'; | ||
| import githubConfig from '../../packages/channels/github/vitest.config.js'; | ||
| import gitlabConfig from '../../packages/channels/gitlab/vitest.config.js'; | ||
| import qqbotConfig from '../../packages/channels/qqbot/vitest.config.js'; | ||
| import telegramConfig from '../../packages/channels/telegram/vitest.config.js'; | ||
| import wecomConfig from '../../packages/channels/wecom/vitest.config.js'; | ||
| import weixinConfig from '../../packages/channels/weixin/vitest.config.js'; | ||
| import chromeExtensionConfig from '../../packages/chrome-extension/vitest.config.js'; | ||
| import cliConfig from '../../packages/cli/vitest.config.js'; | ||
| import coreConfig from '../../packages/core/vitest.config.js'; | ||
| import nodeReplConfig from '../../packages/node-repl/vitest.config.js'; | ||
| import sdkTypescriptConfig from '../../packages/sdk-typescript/vitest.config.js'; | ||
| import vscodeCompanionConfig from '../../packages/vscode-ide-companion/vitest.config.js'; | ||
| import webShellConfig from '../../packages/web-shell/vitest.config.js'; | ||
| import webuiConfig from '../../packages/webui/vite.config.js'; | ||
| import scriptsTestsConfig from './vitest.config.js'; | ||
|
|
||
| // Every vitest project that `npm run test:ci` runs on the Windows/macOS | ||
| // platform lanes carries the off-Linux unhandled-error exemption: vitest's | ||
| // worker->main `onTaskUpdate` RPC has a fixed 60s budget, and under runner | ||
| // resource pressure a stall longer than that exits an all-green run red | ||
| // (the nightly failure class behind #10438 and its predecessors). This | ||
| // witness pins the flag in every guarded config so removing it from any | ||
| // one of them fails the scripts suite on every platform. | ||
| type ExemptionConfig = { | ||
| test?: { dangerouslyIgnoreUnhandledErrors?: boolean }; | ||
| }; | ||
|
|
||
| const configs: Record<string, ExemptionConfig> = { | ||
| 'integrations/external-context': externalContextConfig, | ||
| 'integrations/external-context-mem0': externalContextMem0Config, | ||
| 'packages/acp-bridge': acpBridgeConfig, | ||
| 'packages/audio-capture': audioCaptureConfig, | ||
| 'packages/channels/base': channelsBaseConfig, | ||
| 'packages/channels/dingtalk': dingtalkConfig, | ||
| 'packages/channels/dws': dwsConfig, | ||
| 'packages/channels/feishu': feishuConfig, | ||
| 'packages/channels/github': githubConfig, | ||
| 'packages/channels/gitlab': gitlabConfig, | ||
| 'packages/channels/qqbot': qqbotConfig, | ||
| 'packages/channels/telegram': telegramConfig, | ||
| 'packages/channels/wecom': wecomConfig, | ||
| 'packages/channels/weixin': weixinConfig, | ||
| 'packages/chrome-extension': chromeExtensionConfig, | ||
| 'packages/cli': cliConfig, | ||
| 'packages/core': coreConfig, | ||
| 'packages/node-repl': nodeReplConfig, | ||
| 'packages/sdk-typescript': sdkTypescriptConfig, | ||
| 'packages/vscode-ide-companion': vscodeCompanionConfig, | ||
| 'packages/web-shell': webShellConfig, | ||
| 'scripts/tests': scriptsTestsConfig, | ||
| }; | ||
|
|
||
| describe('unhandled-error exemption on the platform lanes', () => { | ||
| for (const [name, config] of Object.entries(configs)) { | ||
| it(`keeps unhandled errors fatal only on Linux in ${name}`, () => { | ||
| // toBe, not toBeFalsy: a deleted flag is `undefined` and must fail | ||
| // this pin on every platform, including Linux where the value is false. | ||
| expect(config.test?.dangerouslyIgnoreUnhandledErrors).toBe( | ||
| process.platform !== 'linux', | ||
| ); | ||
| }); | ||
| } | ||
|
|
||
| it('keeps unhandled errors fatal only on Linux in packages/webui', async () => { | ||
| // webui's vitest configuration is the function-form vite.config.ts. | ||
| const config = await webuiConfig({ command: 'serve', mode: 'test' }); | ||
| expect(config.test?.dangerouslyIgnoreUnhandledErrors).toBe( | ||
| process.platform !== 'linux', | ||
| ); | ||
| }); | ||
| }); |
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] R1-1: This PR pastes one verbatim 8-line block — a 7-line rationale comment plus
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux'— into 20 config files, joining the 4 pre-existing copies inpackages/core,packages/cli,scripts/testsandintegration-tests: 24 copies of one rationale with no shared module owning it. The copies had already started drifting before this PR — theintegration-testsexemption also readsRUNNER_ENVIRONMENT, and the four pre-existing sites tell the story differently — and the new witness pins only the flag's boolean value, not the comment text or the expression form. When the exemption's rationale or condition next changes, a maintainer must locate and hand-edit all 24 sites in lockstep, and divergence between copies accumulates silently until then.Cheapest fix that keeps each config self-contained: collapse the 7-line comment in every config to a one-line pointer at the full rationale (the witness test's header comment owns it), keeping the flag line itself per-config. A shared preset/constant is the deeper variant; it must allow the
integration-testsoverride.Witness:
Any shared-module variant must stay loadable from
npm run test:ci --workspaces --if-present --parallel(rootpackage.json:48) and respect AGENTS.md's no-relative-imports-between-packages rule;integration-tests/vitest.config.ts:47legitimately uses a different expression, so a shared constant must allow that override.中文说明
本 PR 把一个逐字相同的 8 行块 —— 7 行理由注释加上
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux'—— 粘贴进 20 个配置文件,加上packages/core、packages/cli、scripts/tests和integration-tests中已有的 4 份副本:同一段理由共 24 份副本,没有任何共享模块拥有它。这些副本在本 PR 之前就已开始漂移 ——integration-tests的豁免还会读取RUNNER_ENVIRONMENT,四处既有站点的叙述各不相同 —— 而新的见证测试只钉住该标志的布尔值,不钉注释文本或表达式形式。当该豁免的理由或条件下次变更时,维护者必须同步手工编辑全部 24 处,副本间的分歧在此之前会悄悄累积。保持各配置自包含的最便宜修法:把每个配置中的 7 行注释折叠成指向完整理由的单行指引(完整理由由见证测试的头部注释拥有),标志行本身保留在各配置中。共享预设/常量是更深层的方案;它必须允许
integration-tests的覆盖。任何共享模块方案必须能从
npm run test:ci --workspaces --if-present --parallel(根package.json:48)加载,并遵守 AGENTS.md 的“包之间不得相对导入”规则;integration-tests/vitest.config.ts:47合理地使用了不同的表达式,因此共享常量必须允许该覆盖。— qwen3.8-max via Qwen Code /review (v0.22.3)