From b648ed75c9244135eae710274eff8002a7641c7c Mon Sep 17 00:00:00 2001 From: Chinesezjc Date: Wed, 26 Aug 2026 17:43:57 +0800 Subject: [PATCH] test: unify the last Windows spawn budgets to the 90s pattern The built-bin help/usage case still used a win32-conditional 60/30s outer budget while serializing six runBuiltBin calls, and startProfileLifecycle lacked the execa timeout/killSignal the sibling helper has; the tool-ralph cases pinned 20-30s explicit timeouts that the 90s lane default cannot override. Align all of them to the SPAWN_TIMEOUT_MS + 30s (or 90s) pattern. --- apps/cli/tests/built-bin.e2e.ts | 4 +++- packages/workflow/tool-ralph/tests/integration.spec.ts | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/cli/tests/built-bin.e2e.ts b/apps/cli/tests/built-bin.e2e.ts index c133320ace..2a688b5b00 100644 --- a/apps/cli/tests/built-bin.e2e.ts +++ b/apps/cli/tests/built-bin.e2e.ts @@ -150,6 +150,8 @@ function startProfileLifecycle(fixture: ProfileLifecycleFixture, args: readonly return execa(process.execPath, [dshBin, '--profile', 'lifecycle', ...args], { cwd: fixture.home, input: '', + timeout: SPAWN_TIMEOUT_MS, + killSignal: 'SIGKILL', reject: false, env: { DSH_HOME: fixture.home, @@ -396,7 +398,7 @@ describe.skipIf(!existsSync(dshBin))('dsh BUILT bin (node lib/bin.js, no tsx)', } finally { rmSync(home, { recursive: true, force: true }) } - }, process.platform === 'win32' ? 60_000 : 30_000) + }, SPAWN_TIMEOUT_MS + 30_000) it('reports SDK startup failure when stdin reaches EOF first', async () => { const home = mkdtempSync(join(tmpdir(), 'dsh-built-sdk-startup-failure-')) diff --git a/packages/workflow/tool-ralph/tests/integration.spec.ts b/packages/workflow/tool-ralph/tests/integration.spec.ts index 124364e7b4..8b4d4e4e42 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', { timeout: 30_000 }, async () => { + it('uses distinct empty-seed children, shared cwd, and only the prior bounded handoff', { timeout: 90_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', { timeout: 30_000 }, async () => { + it('reports the failed round and last good handoff when a child fails', { timeout: 90_000 }, async () => { const firstReport = { status: 'continue', summary: 'ROUND_ONE_HANDOFF', @@ -235,7 +235,7 @@ describe('dsh-tool-ralph over the real spawn and worker-thread stack', () => { await parentHandle.dispose() }) - it('cancels the real worker and fresh child to quiescence', { timeout: 20_000 }, async () => { + it('cancels the real worker and fresh child to quiescence', { timeout: 90_000 }, async () => { const { ctx, parent, parentHandle } = await mountRalph(['hang'], { maxRounds: 2 }) const children: Agent[] = [] const outcomes: string[] = []