From a404edf3b1de8515dc6944023d6a9b286166f81b Mon Sep 17 00:00:00 2001 From: Chinesezjc Date: Tue, 25 Aug 2026 18:45:21 +0800 Subject: [PATCH] test: widen windows-hosted subprocess budgets in two web-stack specs The self-hosted Windows coverage pool (16 shards x 12 workers on 192 threads) pushes real subprocess boots past their vitest deadlines: the tool-pwsh Loader smoke reaches ~40s against a 30s process cap, and the tool-ralph worker-thread cases exceed the 5s default. Give the pwsh smoke a 90s process deadline (the subprocess keeps the assembled boot, the vitest deadline stays at 120s), and give the two un-budgeted ralph cases 30s each, matching the existing 20s quiescence case. --- packages/shell/tool-pwsh/tests/loader.spec.ts | 15 ++++++++++----- .../workflow/tool-ralph/tests/integration.spec.ts | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/shell/tool-pwsh/tests/loader.spec.ts b/packages/shell/tool-pwsh/tests/loader.spec.ts index 9a01315516..ab4c1f1925 100644 --- a/packages/shell/tool-pwsh/tests/loader.spec.ts +++ b/packages/shell/tool-pwsh/tests/loader.spec.ts @@ -12,7 +12,7 @@ import { join } from 'node:path' import { fileURLToPath } from 'node:url' import { spawnSync } from 'node:child_process' import { describe, expect, it } from 'vitest' -import { LOADER_SMOKE_TEST_TIMEOUT_MS, runLoaderSmoke } from '@deepseek-ai/dsh-loader-smoke' +import { runLoaderSmoke } from '@deepseek-ai/dsh-loader-smoke' import { resolvePwshPath } from '@deepseek-ai/dsh-pwsh-local' // The probe follows the executor's own resolution (Program Files installs on @@ -37,6 +37,11 @@ interface PwshLoaderReport { } describe.skipIf(!hasPwsh)('tool-pwsh through a real Loader composition', () => { + // Self-hosted Windows runners reach ~40s for this smoke under the full + // coverage load (measured on the 192-thread CI pool), against the + // 30s default process deadline. Give the subprocess headroom so the + // assembled boot completes instead of being SIGKILLed mid-load. + const processTimeoutMs = 90_000 it('registers the pwsh surface and renders real foreground and background results', async () => { let report: PwshLoaderReport | undefined const { stderr } = await runLoaderSmoke({ @@ -46,9 +51,7 @@ describe.skipIf(!hasPwsh)('tool-pwsh through a real Loader composition', () => { libBinScript: driver, configPath, tsconfigPath: repoTsconfig, - // The self-hosted Windows pool can take roughly 40 seconds to boot this - // real Loader composition under the full CI load. - processTimeoutMs: 90_000, + processTimeoutMs, inspect: async (cwd) => { report = JSON.parse(await readFile(join(cwd, 'pwsh-loader-report.json'), 'utf8')) as PwshLoaderReport }, @@ -62,5 +65,7 @@ describe.skipIf(!hasPwsh)('tool-pwsh through a real Loader composition', () => { expect(report?.foregroundText).toBe('loader-ok\n') expect(report?.backgroundText).toContain('loader-bg-ok') expect(report?.backgroundText).toContain('[status: completed, exit code: 0]') - }, LOADER_SMOKE_TEST_TIMEOUT_MS + 75_000) + // 15s of vitest headroom past the subprocess deadline, mirroring + // LOADER_SMOKE_TEST_TIMEOUT_MS's margin over its process window. + }, processTimeoutMs + 15_000) }) diff --git a/packages/workflow/tool-ralph/tests/integration.spec.ts b/packages/workflow/tool-ralph/tests/integration.spec.ts index e6de6c38ef..8b3629ffe7 100644 --- a/packages/workflow/tool-ralph/tests/integration.spec.ts +++ b/packages/workflow/tool-ralph/tests/integration.spec.ts @@ -35,7 +35,7 @@ async function mountRalph(script: MockScript, config: toolRalph.Config) { } describe('dsh-tool-ralph over the real spawn and worker-thread stack', () => { - it('uses distinct empty-seed children, shared cwd, and only the prior bounded handoff', async () => { + it('uses distinct empty-seed children, shared cwd, and only the prior bounded handoff', { timeout: 30_000 }, async () => { const firstReport = { status: 'continue', summary: 'ROUND_ONE_HANDOFF', @@ -115,7 +115,7 @@ describe('dsh-tool-ralph over the real spawn and worker-thread stack', () => { await parentHandle.dispose() }) - it('reports the failed round and last good handoff when a child fails', async () => { + it('reports the failed round and last good handoff when a child fails', { timeout: 30_000 }, async () => { const firstReport = { status: 'continue', summary: 'ROUND_ONE_HANDOFF',