From bfeca6756c2ed014bded0e4c85efe207b427f894 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 2 Oct 2026 09:17:01 -0700 Subject: [PATCH] fix(release): apply 2026.9.8 live shard waivers (#163621) --- scripts/test-live-shard.mts | 35 +++++++++++++++++++++++++++- test/scripts/test-live-shard.test.ts | 14 +++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/scripts/test-live-shard.mts b/scripts/test-live-shard.mts index 55bb33381c27..ebaac06290dd 100644 --- a/scripts/test-live-shard.mts +++ b/scripts/test-live-shard.mts @@ -317,6 +317,39 @@ function isMoonshotLiveTest(file: string) { return file.startsWith("extensions/moonshot/"); } +// The frozen 2026.9.8 candidate retains three intentionally skipped single-case +// live files. The trusted tooling checkout owns shard selection, so omit those +// candidate files here rather than weakening the per-file passing-assertion guard. +const RELEASE_2026_9_8_WAIVED_LIVE_FILES = new Set([ + "src/gateway/gateway-progress-refresh.live.test.ts", + "src/agents/embedded-agent-runner.responses-output-limit.live.test.ts", + "test/gateway-subagent-restart.live.test.ts", +]); +const RELEASE_WAIVED_LIVE_FILES = new Map>([ + ["2026.9.8", RELEASE_2026_9_8_WAIVED_LIVE_FILES], +]); + +export function withoutReleaseWaivedLiveFiles( + files: string[], + candidateVersion: string | undefined, +) { + const waived = candidateVersion ? RELEASE_WAIVED_LIVE_FILES.get(candidateVersion) : undefined; + return waived ? files.filter((file) => !waived.has(file)) : files; +} + +function readCandidateVersion(repoRoot = process.cwd()) { + try { + const manifest: unknown = JSON.parse( + fs.readFileSync(path.join(repoRoot, "package.json"), "utf8"), + ); + return isUnknownRecord(manifest) && typeof manifest.version === "string" + ? manifest.version + : undefined; + } catch { + return undefined; + } +} + /** * Selects the live test files belonging to one shard name. */ @@ -781,7 +814,7 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me let files; try { - files = selectLiveShardFiles(shard); + files = withoutReleaseWaivedLiveFiles(selectLiveShardFiles(shard), readCandidateVersion()); } catch (error) { console.error(error instanceof Error ? error.message : String(error)); usage(); diff --git a/test/scripts/test-live-shard.test.ts b/test/scripts/test-live-shard.test.ts index 6f761f899151..9cd92b140f5d 100644 --- a/test/scripts/test-live-shard.test.ts +++ b/test/scripts/test-live-shard.test.ts @@ -28,6 +28,7 @@ import { resolveLiveShardPreparation, selectLiveShardFiles, validateLiveShardReportPayload, + withoutReleaseWaivedLiveFiles, } from "../../scripts/test-live-shard.mts"; import { resolveRuntimeWorkerUrl } from "../../src/infra/runtime-worker-url.js"; import { expectNoReaddirSyncDuring } from "../../src/test-utils/fs-scan-assertions.js"; @@ -37,6 +38,19 @@ import { preparedScriptWrapperEnv } from "./prepared-script-wrapper.test-support describe("scripts/test-live-shard", () => { const allFiles = collectAllLiveTestFiles(); + it("drops release-waived single-case live files only for the waived candidate version", () => { + const files = [ + "src/gateway/gateway-progress-refresh.live.test.ts", + "src/gateway/gateway-codex-harness.live.test.ts", + "test/gateway-subagent-restart.live.test.ts", + ]; + expect(withoutReleaseWaivedLiveFiles(files, "2026.9.8")).toEqual([ + "src/gateway/gateway-codex-harness.live.test.ts", + ]); + expect(withoutReleaseWaivedLiveFiles(files, "2026.9.9")).toEqual(files); + expect(withoutReleaseWaivedLiveFiles(files, undefined)).toEqual(files); + }); + it("discovers live tests without scanning source roots in-process", () => { expectNoReaddirSyncDuring(() => { const files = collectAllLiveTestFiles();