Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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 Aug 28, 2026
a7888a3
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 29, 2026
fb2e4fd
refactor(ci): collapse duplicated vitest exemption rationale to witne…
qwen-code-dev-bot Aug 29, 2026
1aedd30
refactor(ci): extend vitest rationale pointer consolidation to remain…
qwen-code-dev-bot Aug 29, 2026
137371c
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 29, 2026
a255ac8
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 29, 2026
19dd7fb
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 29, 2026
4986343
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 29, 2026
f6c711d
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 29, 2026
d64b692
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 30, 2026
f035ce0
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 30, 2026
a0ce123
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 30, 2026
57faaf9
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 30, 2026
44025dd
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 30, 2026
7dbf485
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 31, 2026
b2cb164
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 31, 2026
b15a89e
Merge branch 'main' into autofix/issue-10438
qwen-code-dev-bot Aug 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions integrations/external-context-mem0/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,13 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
});
8 changes: 8 additions & 0 deletions integrations/external-context/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,13 @@ import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
});
8 changes: 8 additions & 0 deletions packages/acp-bridge/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ export default defineConfig({
test: {
reporters: ['default'],
silent: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
coverage: {
enabled: false,
provider: 'v8',
Expand Down
8 changes: 8 additions & 0 deletions packages/audio-capture/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,13 @@ export default defineConfig({
test: {
environment: 'node',
include: ['src/**/*.test.ts'],
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
});
8 changes: 8 additions & 0 deletions packages/channels/base/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@ export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
globals: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
});
8 changes: 8 additions & 0 deletions packages/channels/dingtalk/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
globals: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
resolve: {
alias: {
Expand Down
8 changes: 8 additions & 0 deletions packages/channels/dws/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
globals: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
resolve: {
alias: {
Expand Down
8 changes: 8 additions & 0 deletions packages/channels/feishu/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
globals: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
resolve: {
alias: {
Expand Down
8 changes: 8 additions & 0 deletions packages/channels/github/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@ export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
globals: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
});
8 changes: 8 additions & 0 deletions packages/channels/gitlab/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@ export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
globals: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
});
8 changes: 8 additions & 0 deletions packages/channels/qqbot/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
globals: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
server: {
deps: {
inline: ['@qwen-code/channel-base'],
Expand Down
8 changes: 8 additions & 0 deletions packages/channels/telegram/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@ export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
globals: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
});
8 changes: 8 additions & 0 deletions packages/channels/wecom/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
globals: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
resolve: {
alias: {
Expand Down
8 changes: 8 additions & 0 deletions packages/channels/weixin/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ export default defineConfig({
test: {
include: ['src/**/*.test.ts'],
globals: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
resolve: {
alias: {
Expand Down
8 changes: 8 additions & 0 deletions packages/chrome-extension/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,13 @@ export default defineConfig({
include: ['src/**/*.test.ts', 'scripts/**/*.test.js'],
environment: 'jsdom',
globals: true,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
});
8 changes: 8 additions & 0 deletions packages/node-repl/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,13 @@ export default defineConfig({
// Kernel integration tests spawn real Node child processes.
testTimeout: 60_000,
hookTimeout: 60_000,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
});
8 changes: 8 additions & 0 deletions packages/sdk-typescript/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ export default defineConfig({
},
testTimeout: testTimeoutMs,
hookTimeout: 10000,
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
resolve: {
alias: {
Expand Down
8 changes: 8 additions & 0 deletions packages/vscode-ide-companion/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ export default defineConfig({
globals: true,
environment: 'node',
include: ['src/**/*.test.ts', 'src/**/*.test.tsx', 'scripts/**/*.test.js'],
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'clover'],
Expand Down
8 changes: 8 additions & 0 deletions packages/web-shell/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ export default defineConfig({
outputFile: {
junit: '../junit.xml',
},
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
coverage: {
provider: 'v8',
reportsDirectory: '../coverage',
Expand Down
12 changes: 11 additions & 1 deletion packages/webui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { defineConfig } from 'vite';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
import { resolve } from 'path';
Expand Down Expand Up @@ -74,4 +74,14 @@ export default defineConfig(({ command }) => ({
minify: false,
cssCodeSplit: false,
},
test: {
// The worker->main `onTaskUpdate` RPC runs on a 60s budget; under the
// resource pressure of the Windows/macOS runners a stall longer than
// that surfaces as an unhandled error and exits an all-green run red
// (the same failure class the core, cli, and scripts suites hit on
// these lanes). Test failures still fail the run; only unhandled
// errors stop being fatal, and only off Linux — the ubuntu lane and
// Linux local runs keep the unhandled-error signal.
dangerouslyIgnoreUnhandledErrors: process.platform !== 'linux',
},
}));
87 changes: 87 additions & 0 deletions scripts/tests/unit-vitest-configs.test.ts
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',
);
});
});
Loading