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.
This commit is contained in:
Chinesezjc
2026-08-25 22:11:11 +08:00
parent 553b8c35da
commit a404edf3b1
2 changed files with 12 additions and 7 deletions
+10 -5
View File
@@ -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)
})
@@ -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',