From 62deab536e3374e7846700137a12bc1669b403de Mon Sep 17 00:00:00 2001 From: JUN <243035832+lidge-jun@users.noreply.github.com> Date: Sat, 31 Oct 2026 09:10:05 +0900 Subject: [PATCH 1/2] test: give the Windows apply x64 fixture compile the shared spawn budget --- .../codex-cli-update-windows-apply-shared.test.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/codex-integration/codex-cli-update-windows-apply-shared.test.ts b/tests/codex-integration/codex-cli-update-windows-apply-shared.test.ts index 26496f34e5e..f922cade291 100644 --- a/tests/codex-integration/codex-cli-update-windows-apply-shared.test.ts +++ b/tests/codex-integration/codex-cli-update-windows-apply-shared.test.ts @@ -7,6 +7,7 @@ import { applyCodexCliUpdate } from "../../src/codex/cli-update-apply"; import { createCodexCliUpdatePlan } from "../../src/codex/cli-update-plan"; import { repoPath, repoRoot } from "../helpers/repo-root"; import { spawnTestChild } from "../helpers/spawn-test-child"; +import { SPAWN_BUDGET_MS } from "../helpers/test-budget"; import { startWindowsCliChild, type WindowsCliChild } from "../../src/codex/windows-cli-child"; import { windowsInstallNamespaceSupported } from "../../src/codex/cli-update-windows-observation"; import { createWindowsApplyFixtures, native, WINDOWS_APPLY_BUDGET_MS, WINDOWS_APPLY_CHILD_BUDGET_MS, mainRoot, backingRoot, write } from "../helpers/codex-cli-windows-apply-fixture"; @@ -31,9 +32,13 @@ native("Windows shared prefix preserves unrelated package and shims while execut ].join("\n")); const compiler = join(process.env.SystemRoot ?? "C:/Windows", "Microsoft.NET/Framework64/v4.0.30319/csc.exe"); expect(existsSync(compiler), "x64 fixture compiler must be available; do not substitute a synthetic PE").toBe(true); + // A cold .NET Framework compiler on a fresh runner can take seconds before it emits anything; + // it is a real external binary, so it gets the shared spawn budget (still well inside the test's). const compiled = await spawnTestChild([compiler, "/nologo", "/platform:x64", "/target:exe", `/out:${exe}`, source], - { cwd: build, env: process.env, deadlineMs: 10000 }); - expect(compiled.reaped && compiled.pipesClosed).toBe(true); expect(compiled.exitCode, compiled.stdout + compiled.stderr).toBe(0); + { cwd: build, env: process.env, deadlineMs: SPAWN_BUDGET_MS }); + const compileReport = JSON.stringify({ timedOut: compiled.timedOut, elapsedMs: compiled.elapsedMs, signal: compiled.signal }); + expect(compiled.reaped && compiled.pipesClosed).toBe(true); + expect(compiled.exitCode, `${compileReport}\n${compiled.stdout}${compiled.stderr}`).toBe(0); const f = await fixture(readFileSync(exe)); const unrelated = { "node_modules/unrelated/package.json": '{"name":"unrelated","version":"2.0.0","bin":"index.js"}', "node_modules/unrelated/index.js": '#!/usr/bin/env node\nconsole.log("unrelated");\n', From 7615dcac23f433b1dd1fce33410b8d0d6325ef67 Mon Sep 17 00:00:00 2001 From: JUN <243035832+lidge-jun@users.noreply.github.com> Date: Sat, 31 Oct 2026 09:17:27 +0900 Subject: [PATCH 2/2] test: report the compile deadline state on the reap assertion too --- .../codex-cli-update-windows-apply-shared.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/codex-integration/codex-cli-update-windows-apply-shared.test.ts b/tests/codex-integration/codex-cli-update-windows-apply-shared.test.ts index f922cade291..69679995562 100644 --- a/tests/codex-integration/codex-cli-update-windows-apply-shared.test.ts +++ b/tests/codex-integration/codex-cli-update-windows-apply-shared.test.ts @@ -37,7 +37,7 @@ native("Windows shared prefix preserves unrelated package and shims while execut const compiled = await spawnTestChild([compiler, "/nologo", "/platform:x64", "/target:exe", `/out:${exe}`, source], { cwd: build, env: process.env, deadlineMs: SPAWN_BUDGET_MS }); const compileReport = JSON.stringify({ timedOut: compiled.timedOut, elapsedMs: compiled.elapsedMs, signal: compiled.signal }); - expect(compiled.reaped && compiled.pipesClosed).toBe(true); + expect(compiled.reaped && compiled.pipesClosed, compileReport).toBe(true); expect(compiled.exitCode, `${compileReport}\n${compiled.stdout}${compiled.stderr}`).toBe(0); const f = await fixture(readFileSync(exe)); const unrelated = { "node_modules/unrelated/package.json": '{"name":"unrelated","version":"2.0.0","bin":"index.js"}',