diff --git a/src/adb/AdbProvider.test.ts b/src/adb/AdbProvider.test.ts index 239baa8875..5d950e0490 100644 --- a/src/adb/AdbProvider.test.ts +++ b/src/adb/AdbProvider.test.ts @@ -191,7 +191,7 @@ fi`, await Promise.allSettled([inspection, closing]); await provider.close(); } -}, 15_000); +}); it("fails closed when adb exits successfully without a recognized version", async () => { const stdout = `unexpected adb output ${"x".repeat(700)}\n`; diff --git a/src/apktool/ApktoolVersionProbe.lifecycle.test.ts b/src/apktool/ApktoolVersionProbe.lifecycle.test.ts index 5b645a101a..f88f37bce7 100644 --- a/src/apktool/ApktoolVersionProbe.lifecycle.test.ts +++ b/src/apktool/ApktoolVersionProbe.lifecycle.test.ts @@ -58,7 +58,6 @@ it.skipIf(process.platform === "win32")( await fixture.cleanup([probe]); } }, - 30_000, ); let commands = new ApktoolCommandCleanup(); diff --git a/src/application/McpRegistrationCatalog.test.ts b/src/application/McpRegistrationCatalog.test.ts index 7e116aa0ec..40d0812769 100644 --- a/src/application/McpRegistrationCatalog.test.ts +++ b/src/application/McpRegistrationCatalog.test.ts @@ -284,133 +284,137 @@ const REVIEWED_CLIENT_IDS = [ "amp", ]; -it("resolves selected-environment paths and scopes without external catalog readers", async () => { - const home = await createTestTempDirectory("rea-registration-catalog-"); - const processes = createTestProcessRegistry(); - try { - await mkdir(join(home, "config")); - const child = await processes.run( - process.execPath, - ["--import", "tsx", "--input-type=module", "--eval", CATALOG_PROGRAM], - { - timeoutMs: 50_000, - env: { - PATH: process.env.PATH, - SystemRoot: process.env.SystemRoot, - WINDIR: process.env.WINDIR, - TMPDIR: process.env.TMPDIR, - TMP: process.env.TMP, - TEMP: process.env.TEMP, - HOME: home, - USERPROFILE: home, - XDG_CONFIG_HOME: join(home, "config"), - XDG_DATA_HOME: join(home, "data"), - XDG_CACHE_HOME: join(home, "cache"), - XDG_STATE_HOME: join(home, "state"), - APPDATA: join(home, "appdata"), - LOCALAPPDATA: join(home, "localappdata"), +it( + "resolves selected-environment paths and scopes without external catalog readers", + { tags: ["long-running"] }, + async () => { + const home = await createTestTempDirectory("rea-registration-catalog-"); + const processes = createTestProcessRegistry(); + try { + await mkdir(join(home, "config")); + const child = await processes.run( + process.execPath, + ["--import", "tsx", "--input-type=module", "--eval", CATALOG_PROGRAM], + { + timeoutMs: 50_000, + env: { + PATH: process.env.PATH, + SystemRoot: process.env.SystemRoot, + WINDIR: process.env.WINDIR, + TMPDIR: process.env.TMPDIR, + TMP: process.env.TMP, + TEMP: process.env.TEMP, + HOME: home, + USERPROFILE: home, + XDG_CONFIG_HOME: join(home, "config"), + XDG_DATA_HOME: join(home, "data"), + XDG_CACHE_HOME: join(home, "cache"), + XDG_STATE_HOME: join(home, "state"), + APPDATA: join(home, "appdata"), + LOCALAPPDATA: join(home, "localappdata"), + }, }, - }, - ); - expect(child.exitCode, child.stderr).toBe(0); - const result = catalogObservationsSchema.parse(JSON.parse(child.stdout)); - assertKiloNativeLayers(result, home); - expect(result.empty.ok).toBe(true); - if (!result.empty.ok) throw new Error(result.empty.error.message); - expect(result.empty.value.map((client) => client.id)).toEqual( - REVIEWED_CLIENT_IDS, - ); - expect(result.layeredKilo.ok).toBe(true); - if (!result.layeredKilo.ok) - throw new Error(result.layeredKilo.error.message); - const kiloLayers = [ - "config.json", - "kilo.json", - "kilo.jsonc", - "opencode.json", - "opencode.jsonc", - ].map((name) => join(home, "layered", "kilo", name)); - expect(result.layeredKilo.value[0]).toMatchObject({ - configPath: kiloLayers.at(-1), - configPaths: kiloLayers, - }); - expect(result.layeredOpenCode.ok).toBe(true); - if (!result.layeredOpenCode.ok) - throw new Error(result.layeredOpenCode.error.message); - expect(result.layeredOpenCode.value[0]?.configPaths).toEqual( - ["config.json", "opencode.json", "opencode.jsonc"].map((name) => - join(home, "config", "opencode", name), - ), - ); - expect(result.explicit.ok).toBe(true); - if (!result.explicit.ok) throw new Error(result.explicit.error.message); - expect(result.explicit.value.map((client) => client.id)).toEqual([ - "codex", - "amp", - "gemini-cli", - "fx", - "windsurf", - ]); - expect(result.explicit.value[0]?.configPath).toBe( - join(home, "selected-codex", "config.toml"), - ); - expect( - result.explicit.value.find((client) => client.id === "fx"), - ).toMatchObject({ format: "fx", privateProfile: true }); - expect(result.detected.ok).toBe(true); - if (!result.detected.ok) throw new Error(result.detected.error.message); - expect(result.detected.value.map((client) => client.id)).toEqual([ - "claude-code", - "cursor", - "amp", - ]); - expect(result.project.ok, JSON.stringify(result.project)).toBe(true); - if (!result.project.ok) throw new Error(result.project.error.message); - expect(result.project.value[0]?.format).toBe("copilot_cli_project"); - expect( - result.project.value.map(({ configPath, scope }) => ({ - configPath, - scope, - })), - ).toEqual([ - { - configPath: join(home, "project", ".github", "mcp.json"), - scope: "project", - }, - ...(process.platform === "win32" - ? [] - : [ - { - configPath: join(home, "project", ".kilocode", "kilo.jsonc"), - scope: "project", - }, - ]), - { - configPath: join(home, "project", "opencode.jsonc"), - scope: "project", - }, - ]); - for (const refused of [ - result.onlyGlobal, - result.defaultProject, - result.projectAmp, - result.unknown, - ...(result.blockedCandidate === null ? [] : [result.blockedCandidate]), - result.unknownDetection, - ]) { - expect(refused.ok).toBe(false); - if (refused.ok) throw new Error("Expected preflight refusal."); - expect(refused.error.tag).toBe("ConfigurationError"); + ); + expect(child.exitCode, child.stderr).toBe(0); + const result = catalogObservationsSchema.parse(JSON.parse(child.stdout)); + assertKiloNativeLayers(result, home); + expect(result.empty.ok).toBe(true); + if (!result.empty.ok) throw new Error(result.empty.error.message); + expect(result.empty.value.map((client) => client.id)).toEqual( + REVIEWED_CLIENT_IDS, + ); + expect(result.layeredKilo.ok).toBe(true); + if (!result.layeredKilo.ok) + throw new Error(result.layeredKilo.error.message); + const kiloLayers = [ + "config.json", + "kilo.json", + "kilo.jsonc", + "opencode.json", + "opencode.jsonc", + ].map((name) => join(home, "layered", "kilo", name)); + expect(result.layeredKilo.value[0]).toMatchObject({ + configPath: kiloLayers.at(-1), + configPaths: kiloLayers, + }); + expect(result.layeredOpenCode.ok).toBe(true); + if (!result.layeredOpenCode.ok) + throw new Error(result.layeredOpenCode.error.message); + expect(result.layeredOpenCode.value[0]?.configPaths).toEqual( + ["config.json", "opencode.json", "opencode.jsonc"].map((name) => + join(home, "config", "opencode", name), + ), + ); + expect(result.explicit.ok).toBe(true); + if (!result.explicit.ok) throw new Error(result.explicit.error.message); + expect(result.explicit.value.map((client) => client.id)).toEqual([ + "codex", + "amp", + "gemini-cli", + "fx", + "windsurf", + ]); + expect(result.explicit.value[0]?.configPath).toBe( + join(home, "selected-codex", "config.toml"), + ); + expect( + result.explicit.value.find((client) => client.id === "fx"), + ).toMatchObject({ format: "fx", privateProfile: true }); + expect(result.detected.ok).toBe(true); + if (!result.detected.ok) throw new Error(result.detected.error.message); + expect(result.detected.value.map((client) => client.id)).toEqual([ + "claude-code", + "cursor", + "amp", + ]); + expect(result.project.ok, JSON.stringify(result.project)).toBe(true); + if (!result.project.ok) throw new Error(result.project.error.message); + expect(result.project.value[0]?.format).toBe("copilot_cli_project"); + expect( + result.project.value.map(({ configPath, scope }) => ({ + configPath, + scope, + })), + ).toEqual([ + { + configPath: join(home, "project", ".github", "mcp.json"), + scope: "project", + }, + ...(process.platform === "win32" + ? [] + : [ + { + configPath: join(home, "project", ".kilocode", "kilo.jsonc"), + scope: "project", + }, + ]), + { + configPath: join(home, "project", "opencode.jsonc"), + scope: "project", + }, + ]); + for (const refused of [ + result.onlyGlobal, + result.defaultProject, + result.projectAmp, + result.unknown, + ...(result.blockedCandidate === null ? [] : [result.blockedCandidate]), + result.unknownDetection, + ]) { + expect(refused.ok).toBe(false); + if (refused.ok) throw new Error("Expected preflight refusal."); + expect(refused.error.tag).toBe("ConfigurationError"); + } + expect(result.cancelled).toMatchObject({ + ok: false, + error: { tag: "AnalysisCancelledError" }, + }); + } finally { + await processes.shutdown(); + await rm(home, { recursive: true, force: true }); } - expect(result.cancelled).toMatchObject({ - ok: false, - error: { tag: "AnalysisCancelledError" }, - }); - } finally { - await processes.shutdown(); - await rm(home, { recursive: true, force: true }); - } -}, 60_000); + }, +); const assertKiloNativeLayers = ( result: z.infer, diff --git a/src/application/desktop/DesktopApplicationCapture.test.ts b/src/application/desktop/DesktopApplicationCapture.test.ts index 272d952f01..1740804ae8 100644 --- a/src/application/desktop/DesktopApplicationCapture.test.ts +++ b/src/application/desktop/DesktopApplicationCapture.test.ts @@ -353,7 +353,6 @@ it.skipIf(process.platform !== "linux")( spy.mockRestore(); } }, - 30_000, ); describe.skipIf(process.platform !== "linux")( @@ -416,7 +415,7 @@ describe.skipIf(process.platform !== "linux")( expect( JSON.parse(await readFile(join(output, "capture.json"), "utf8")), ).toEqual(JSON.parse(JSON.stringify(evidence))); - }, 30_000); + }); it("keeps a baseline-only capture when cancelled before any checkpoint", async () => { const { root, home, environment } = await fixture(); @@ -517,7 +516,7 @@ describe.skipIf(process.platform !== "linux")( after: expect.objectContaining({ sha256: sha256("count=2\n") }), }), ]); - }, 30_000); + }); }, ); @@ -589,7 +588,7 @@ describe.skipIf(process.platform !== "linux")( { name: "stop", trigger: "stop" }, { name: "exit", trigger: "exit" }, ]); - }, 30_000); + }); }, ); @@ -644,7 +643,6 @@ describe.skipIf(process.platform !== "linux")( details: { cleanup: "incomplete", resources: [statePath] }, }); }, - 30_000, ); }, ); @@ -678,7 +676,7 @@ describe.skipIf(process.platform !== "linux")( expect(await readdir(root)).toEqual( expect.arrayContaining(["group-term", "setsid-term"]), ); - }, 30_000); + }); it("stops the application gracefully and removes retained content when the session fails", async () => { const { root, home, environment } = await fixture(); @@ -703,7 +701,7 @@ describe.skipIf(process.platform !== "linux")( expect(await readdir(root)).toEqual( expect.arrayContaining(["group-term", "setsid-term"]), ); - }, 30_000); + }); }, ); @@ -774,7 +772,7 @@ describe.skipIf(process.platform !== "linux")( expect(capture.limitations).toContainEqual( expect.stringMatching(/^The window list could not be read in [34] /u), ); - }, 30_000); + }); }, ); diff --git a/src/artifacts/ReleaseExposureReader.test.ts b/src/artifacts/ReleaseExposureReader.test.ts index 14b5a1a0ae..32361f42a9 100644 --- a/src/artifacts/ReleaseExposureReader.test.ts +++ b/src/artifacts/ReleaseExposureReader.test.ts @@ -693,25 +693,31 @@ describe("ReleaseExposureReader limits", () => { } }); - it("counts members past the package entry cap and marks coverage unknown", async () => { - const root = await createTestTempDirectory("rea-release-exposure-entries-"); - const files = [ - ...Array.from({ length: 4096 }, (_, index) => ({ - path: `f${String(index)}.bin`, - bytes: Buffer.from("x"), - })), - { path: "hidden.js.map", bytes: Buffer.from("{not json") }, - { path: "secret.txt", bytes: Buffer.from("hello\n") }, - ]; - await writeFile(join(root, "app.dll"), dotnetBundleFixture(files).bytes); - const scanned = await inspect(root); - expect(scanned.coverage).toBe("unknown"); - expect(scanned.source_maps.skipped).toBeGreaterThan(0); - expect(scanned.text_members.skipped).toBeGreaterThan(0); - expect(scanned.omitted.map((item) => item.subject)).toEqual( - expect.arrayContaining(["source maps", "text members"]), - ); - }, 60_000); + it( + "counts members past the package entry cap and marks coverage unknown", + { tags: ["long-running"] }, + async () => { + const root = await createTestTempDirectory( + "rea-release-exposure-entries-", + ); + const files = [ + ...Array.from({ length: 4096 }, (_, index) => ({ + path: `f${String(index)}.bin`, + bytes: Buffer.from("x"), + })), + { path: "hidden.js.map", bytes: Buffer.from("{not json") }, + { path: "secret.txt", bytes: Buffer.from("hello\n") }, + ]; + await writeFile(join(root, "app.dll"), dotnetBundleFixture(files).bytes); + const scanned = await inspect(root); + expect(scanned.coverage).toBe("unknown"); + expect(scanned.source_maps.skipped).toBeGreaterThan(0); + expect(scanned.text_members.skipped).toBeGreaterThan(0); + expect(scanned.omitted.map((item) => item.subject)).toEqual( + expect.arrayContaining(["source maps", "text members"]), + ); + }, + ); it("does not drop native images before the service samples them", async () => { const root = await createTestTempDirectory("rea-release-exposure-natives-"); @@ -1500,28 +1506,34 @@ describe("ReleaseExposureReader member allowances", () => { }, ); - it("keeps a later source map readable after many large binary members", async () => { - const root = await createTestTempDirectory("rea-release-exposure-budget-"); - const binary = Buffer.alloc(MAX_RELEASE_EXPOSURE_TEXT_MEMBER_BYTES); - const oversizedScript = Buffer.alloc( - MAX_RELEASE_EXPOSURE_TEXT_MEMBER_BYTES + 1, - 0x20, - ); - await writeFile( - join(root, "app.asar"), - asarArchive([ - ...Array.from({ length: 160 }, (_, index) => ({ - name: `a${String(index)}.bin`, - bytes: binary, - })), - { name: "b.js", bytes: oversizedScript }, - { name: "z.js.map", bytes: embeddedSourceMap() }, - ]), - ); - const scanned = await inspect(join(root, "app.asar")); - expect(scanned.source_maps).toMatchObject({ embedded: 1, skipped: 1 }); - expect(scanned.extractable.readable_members).toBe(162); - }, 60_000); + it( + "keeps a later source map readable after many large binary members", + { tags: ["long-running"] }, + async () => { + const root = await createTestTempDirectory( + "rea-release-exposure-budget-", + ); + const binary = Buffer.alloc(MAX_RELEASE_EXPOSURE_TEXT_MEMBER_BYTES); + const oversizedScript = Buffer.alloc( + MAX_RELEASE_EXPOSURE_TEXT_MEMBER_BYTES + 1, + 0x20, + ); + await writeFile( + join(root, "app.asar"), + asarArchive([ + ...Array.from({ length: 160 }, (_, index) => ({ + name: `a${String(index)}.bin`, + bytes: binary, + })), + { name: "b.js", bytes: oversizedScript }, + { name: "z.js.map", bytes: embeddedSourceMap() }, + ]), + ); + const scanned = await inspect(join(root, "app.asar")); + expect(scanned.source_maps).toMatchObject({ embedded: 1, skipped: 1 }); + expect(scanned.extractable.readable_members).toBe(162); + }, + ); it("reports an oversized linker map as a debug companion wherever it ships", async () => { const root = await createTestTempDirectory("rea-release-exposure-link-"); diff --git a/src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts b/src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts index 8e64174828..d1643aaac3 100644 --- a/src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts +++ b/src/artifacts/apple/AppleAssetCatalogAnalysis.test.ts @@ -366,7 +366,7 @@ describe("Apple asset catalog and Interface Builder concurrency", () => { }, }); expect(result.catalogs).toHaveLength(1); - }, 5_000); + }); it("cancels the Interface Builder analysis and reports a catalog failure", async () => { let cancelled = false; diff --git a/src/browser/CdpAgentHints.integration.test.ts b/src/browser/CdpAgentHints.integration.test.ts index f6da762eee..d3963ed6e0 100644 --- a/src/browser/CdpAgentHints.integration.test.ts +++ b/src/browser/CdpAgentHints.integration.test.ts @@ -90,7 +90,6 @@ it.each(["", "h:"])( await browser.close(); } }, - 30_000, ); it.each(["progress", "enable", "terminal", "complete"] as const)( diff --git a/src/browser/CdpCaptureDocuments.baseUrl.test.ts b/src/browser/CdpCaptureDocuments.baseUrl.test.ts index 5836c2d20e..71adb9f679 100644 --- a/src/browser/CdpCaptureDocuments.baseUrl.test.ts +++ b/src/browser/CdpCaptureDocuments.baseUrl.test.ts @@ -1367,5 +1367,5 @@ describe("XML namespace resolution ordering and capacity", () => { expect(result.urls).toEqual([ approvedHref(elements.length, `${origin}/deep`), ]); - }, 30_000); + }); }); diff --git a/src/desktop/AgentEnvSolveHelper.test.ts b/src/desktop/AgentEnvSolveHelper.test.ts index 4b8ce44a45..f9645279b5 100644 --- a/src/desktop/AgentEnvSolveHelper.test.ts +++ b/src/desktop/AgentEnvSolveHelper.test.ts @@ -86,7 +86,7 @@ describe("runSolveHelper", () => { stop.abort(); await Promise.allSettled([started, solved]); } - }, 30_000); + }); it("records a helper stopped at its deadline without a report as a failed solve of unknown cost, its cleanup known", async () => { const runner = await fakeAgentEnvSolves([SOLVE]); @@ -109,7 +109,7 @@ describe("runSolveHelper", () => { }); expect(report.error).toMatch(/stopped \(SIG[A-Z]+\) without a report/u); expect(retained).toHaveLength(0); - }, 30_000); + }); it("keeps a helper whose cleanup failed, so closing can retry it, and reports what is left", async () => { const runner = await fakeAgentEnvSolves([SOLVE]); @@ -146,7 +146,7 @@ describe("runSolveHelper", () => { status: "verified-cleanup", }); retained[0]?.dispose(); - }, 30_000); + }); }); it("retains a reported sandbox on failed removal, then retries that exact sandbox", async () => { @@ -184,7 +184,7 @@ it("retains a reported sandbox on failed removal, then retries that exact sandbo expect(failure.cleanupIncomplete).toBe(false); expect(failure.cleanupResources).toEqual([]); retained[0]?.dispose(); -}, 30_000); +}); it("retains a completed report if cancellation arrives during final cleanup", async () => { const runner = await fakeAgentEnvSolves([SOLVE]); @@ -211,7 +211,7 @@ it("retains a completed report if cancellation arrives during final cleanup", as cause: reason, report: { outcome: "passed", turns: 3, usd: 0.1 }, }); -}, 30_000); +}); it("retains an unrecognized sandbox root entry and retries after it is repaired", async () => { const runner = await fakeAgentEnvSolves([SOLVE]); @@ -240,7 +240,7 @@ it("retains an unrecognized sandbox root entry and retries after it is repaired" if (!(failure instanceof ProviderCleanupError)) throw failure; expect(failure.cleanupIncomplete).toBe(false); retained[0]?.dispose(); -}, 30_000); +}); it("retains root cleanup and the spawn failure when admission fails", async () => { const runner = await fakeAgentEnvSolves([SOLVE]); @@ -274,4 +274,4 @@ it("retains root cleanup and the spawn failure when admission fails", async () = expect(failure.cleanupIncomplete).toBe(false); expect(failure.cleanupResources).toEqual([]); retained[0]?.dispose(); -}, 30_000); +}); diff --git a/src/desktop/DesktopApplicationSession.test.ts b/src/desktop/DesktopApplicationSession.test.ts index 6f34e5c770..3f0105b4e4 100644 --- a/src/desktop/DesktopApplicationSession.test.ts +++ b/src/desktop/DesktopApplicationSession.test.ts @@ -157,7 +157,7 @@ describe.skipIf(process.platform !== "linux")("runDesktopSession", () => { await expect(runDesktopSession(plan)).rejects.toBe(failure); expect(checkpoints).toEqual(["stop", "exit"]); expect(vi.mocked(terminateTokenOwnedProcesses)).toHaveBeenCalledTimes(1); - }, 30_000); + }); it("launches the application without the agent environment's variables", async () => { const root = await createTestTempDirectory("desktop-session-env-"); @@ -184,7 +184,7 @@ describe.skipIf(process.platform !== "linux")("runDesktopSession", () => { "REA_PROCESS_RUN_ID", ]), ); - }, 30_000); + }); }); describe.skipIf(process.platform !== "linux")( @@ -209,7 +209,7 @@ describe.skipIf(process.platform !== "linux")( entry.pid !== outcome.session.launch_pid, ).length, ).toBeGreaterThan(0); - }, 30_000); + }); it("does not take samples whose window list was unreadable as the application having exited", async () => { const root = await createTestTempDirectory("desktop-session-unread-"); @@ -230,7 +230,7 @@ describe.skipIf(process.platform !== "linux")( expect(outcome.session.end_reason).toBe("application_exited"); expect(outcome.unreadableWindowSamples).toBe(4); expect(samples).toBeGreaterThanOrEqual(6); - }, 30_000); + }); }, ); @@ -385,7 +385,7 @@ describe.skipIf(process.platform === "win32")( expect(stderr).not.toContain("runtime 0 of 400"); expect(Buffer.byteLength(stderr)).toBeLessThanOrEqual(8 * 1024); expect(stderr_truncated).toBe(true); - }, 30_000); + }); it("gives each checkpoint the titles the app's own windows have shown so far", async () => { const root = await createTestTempDirectory("desktop-session-titles-"); @@ -422,7 +422,7 @@ describe.skipIf(process.platform === "win32")( }); expect(seen.at(-1)).toEqual(["today.txt - Notes"]); - }, 30_000); + }); it("launches the app with glibc's fatal errors sent to its stderr, not its terminal", async () => { const root = await createTestTempDirectory("desktop-session-libc-"); @@ -435,6 +435,6 @@ describe.skipIf(process.platform === "win32")( ); expect(outcome.session.stderr).toContain("LIBC_FATAL_STDERR_=1"); - }, 30_000); + }); }, ); diff --git a/src/domain/analysisView/environmentStateWriteComposed.test.ts b/src/domain/analysisView/environmentStateWriteComposed.test.ts index c34caebb1a..c8d7c6d2c7 100644 --- a/src/domain/analysisView/environmentStateWriteComposed.test.ts +++ b/src/domain/analysisView/environmentStateWriteComposed.test.ts @@ -272,34 +272,30 @@ describe("compositions serving could not keep", () => { ); }); -it( - "indexes a wide body's repeated values once, and only when a string is left to compose", - { timeout: 5_000 }, - () => { - const n = 8_000; - const shared = `https://shared.example.test/${"x".repeat(64)}`; - const body: JsonObject = Object.fromEntries( - Array.from({ length: n }, (_, index) => [`e${String(index)}`, shared]), - ); - const rules: FieldRule[] = Array.from({ length: n }, (_, index) => ({ - field: `e${String(index)}`, - rule: "echo", - })); - let reads = 0; - const counted = new Proxy(body, { - get: (target, key) => { - reads += 1; - return Reflect.get(target, key); - }, - }); - const composer = createdComposer(counted, rules, []); - expect(reads).toBe(0); - expect(composer("e0")).toBeUndefined(); - expect(composer("e1")).toBeUndefined(); - // One read per source to index them, once, and one per composed field. - expect(reads).toBe(n + 2); - }, -); +it("indexes a wide body's repeated values once, and only when a string is left to compose", () => { + const n = 8_000; + const shared = `https://shared.example.test/${"x".repeat(64)}`; + const body: JsonObject = Object.fromEntries( + Array.from({ length: n }, (_, index) => [`e${String(index)}`, shared]), + ); + const rules: FieldRule[] = Array.from({ length: n }, (_, index) => ({ + field: `e${String(index)}`, + rule: "echo", + })); + let reads = 0; + const counted = new Proxy(body, { + get: (target, key) => { + reads += 1; + return Reflect.get(target, key); + }, + }); + const composer = createdComposer(counted, rules, []); + expect(reads).toBe(0); + expect(composer("e0")).toBeUndefined(); + expect(composer("e1")).toBeUndefined(); + // One read per source to index them, once, and one per composed field. + expect(reads).toBe(n + 2); +}); describe("slug spellings", () => { it("spells & in a slug part as the word only when the part says so", () => { diff --git a/src/domain/analysisView/environmentStateWriteCopies.test.ts b/src/domain/analysisView/environmentStateWriteCopies.test.ts index 1ad8fe9585..3c92f675a0 100644 --- a/src/domain/analysisView/environmentStateWriteCopies.test.ts +++ b/src/domain/analysisView/environmentStateWriteCopies.test.ts @@ -85,38 +85,34 @@ describe("members a created field derives from", () => { }); }); -it( - "finds the echoed members a wide body's constants hold without searching each text for each", - { timeout: 5_000 }, - () => { - const n = 8_000; - const body = Object.fromEntries( - Array.from({ length: n }, (_, index) => [ - `e${String(index)}`, - `echoed value ${String(index).padStart(6, "0")}`, - ]), - ); - const constants = Object.fromEntries( - Array.from({ length: n }, (_, index) => [ - `k${String(index)}`, - `constant text ${String(index)}`, - ]), - ); - const result = create( - { - id: 1, - ...body, - ...constants, - last: `see ${body[`e${String(n - 1)}`]!}`, - }, - body, - () => [], - ); - expect(result.fixed).toEqual([ - { member: `e${String(n - 1)}`, sent: body[`e${String(n - 1)}`] }, - ]); - }, -); +it("finds the echoed members a wide body's constants hold without searching each text for each", () => { + const n = 8_000; + const body = Object.fromEntries( + Array.from({ length: n }, (_, index) => [ + `e${String(index)}`, + `echoed value ${String(index).padStart(6, "0")}`, + ]), + ); + const constants = Object.fromEntries( + Array.from({ length: n }, (_, index) => [ + `k${String(index)}`, + `constant text ${String(index)}`, + ]), + ); + const result = create( + { + id: 1, + ...body, + ...constants, + last: `see ${body[`e${String(n - 1)}`]!}`, + }, + body, + () => [], + ); + expect(result.fixed).toEqual([ + { member: `e${String(n - 1)}`, sent: body[`e${String(n - 1)}`] }, + ]); +}); describe("coincidences no member derives a created field from", () => { it.each([ diff --git a/src/domain/analysisView/environmentStateWriteExplain.test.ts b/src/domain/analysisView/environmentStateWriteExplain.test.ts index 2624c33e2d..744ded77f0 100644 --- a/src/domain/analysisView/environmentStateWriteExplain.test.ts +++ b/src/domain/analysisView/environmentStateWriteExplain.test.ts @@ -922,66 +922,58 @@ it.each<[string, string, boolean]>([ expect(prefixRelated(right, left)).toBe(related); }); -it( - "explains many copied and slugged fields of a wide body without searching it again for each", - { timeout: 5_000 }, - () => { - const n = 8_000; - const value = (index: number) => `value-${String(index).padStart(6, "0")}`; - const nested = Object.fromEntries( - Array.from({ length: n }, (_, index) => [ - `g${String(index)}`, - { s: value(index) }, - ]), - ); - const copies = Object.fromEntries( - Array.from({ length: n }, (_, index) => [ - `c${String(index)}`, - value(index), - ]), - ); - const copied = explainCreate(created({ id: 1, ...copies }, nested)); - expect(ruleFor(copied.rules, `c${String(n - 1)}`)).toEqual({ - field: `c${String(n - 1)}`, - rule: "copy", - from: `/g${String(n - 1)}/s`, - }); - // Strings no member slugs to, in a body of many members, each tried as a slug. - const flat = Object.fromEntries( - Array.from({ length: n }, (_, index) => [ - `m${String(index)}`, - `Member ${String(index)}`, - ]), - ); - const others = Object.fromEntries( - Array.from({ length: n }, (_, index) => [ - `o${String(index)}`, - `x${String(index)}`, - ]), - ); - const slugged = explainCreate( - created({ id: 1, ...others, s: "member-7" }, flat), - ); - expect(ruleFor(slugged.rules, "s")).toEqual({ - field: "s", - rule: "slug", - from: "m7", - }); - }, -); +it("explains many copied and slugged fields of a wide body without searching it again for each", () => { + const n = 8_000; + const value = (index: number) => `value-${String(index).padStart(6, "0")}`; + const nested = Object.fromEntries( + Array.from({ length: n }, (_, index) => [ + `g${String(index)}`, + { s: value(index) }, + ]), + ); + const copies = Object.fromEntries( + Array.from({ length: n }, (_, index) => [ + `c${String(index)}`, + value(index), + ]), + ); + const copied = explainCreate(created({ id: 1, ...copies }, nested)); + expect(ruleFor(copied.rules, `c${String(n - 1)}`)).toEqual({ + field: `c${String(n - 1)}`, + rule: "copy", + from: `/g${String(n - 1)}/s`, + }); + // Strings no member slugs to, in a body of many members, each tried as a slug. + const flat = Object.fromEntries( + Array.from({ length: n }, (_, index) => [ + `m${String(index)}`, + `Member ${String(index)}`, + ]), + ); + const others = Object.fromEntries( + Array.from({ length: n }, (_, index) => [ + `o${String(index)}`, + `x${String(index)}`, + ]), + ); + const slugged = explainCreate( + created({ id: 1, ...others, s: "member-7" }, flat), + ); + expect(ruleFor(slugged.rules, "s")).toEqual({ + field: "s", + rule: "slug", + from: "m7", + }); +}); -it( - "searches a wide request body for a copied value in linear time", - { timeout: 5_000 }, - () => { - // Shifting each value off the queue made one fruitless search over 500,000 zeros take about a minute. - const wide = Array.from({ length: 500_000 }, () => 0); - const result = explainCreate( - created({ id: 1, note: "not anywhere in the body" }, { items: wide }), - ); - expect(ruleFor(result.rules, "note")).toBeUndefined(); - }, -); +it("searches a wide request body for a copied value in linear time", () => { + // Shifting each value off the queue made one fruitless search over 500,000 zeros take about a minute. + const wide = Array.from({ length: 500_000 }, () => 0); + const result = explainCreate( + created({ id: 1, note: "not anywhere in the body" }, { items: wide }), + ); + expect(ruleFor(result.rules, "note")).toBeUndefined(); +}); const ID = (n: number): string => `00000000-0000-4000-8000-${String(n).padStart(12, "0")}`; diff --git a/src/domain/callPath.test.ts b/src/domain/callPath.test.ts index 4186bf419f..a49d83e15b 100644 --- a/src/domain/callPath.test.ts +++ b/src/domain/callPath.test.ts @@ -275,7 +275,7 @@ describe("call path topology and capacity", () => { expect(result.status).toBe("unknown"); expect(result.search_scope.exhaustive).toBe(false); expect(result.limitations).toEqual(limitations); - }, 30_000); + }); it("retains every shortest path through merging branches and cycles", () => { const result = run([ diff --git a/src/domain/javascript/javascriptSemanticAnalysis.getter_aliases.test.ts b/src/domain/javascript/javascriptSemanticAnalysis.getter_aliases.test.ts index 1eeaec3503..3a80daa239 100644 --- a/src/domain/javascript/javascriptSemanticAnalysis.getter_aliases.test.ts +++ b/src/domain/javascript/javascriptSemanticAnalysis.getter_aliases.test.ts @@ -124,7 +124,7 @@ describe("private receiver field ownership", () => { status: "literal", value: 1, }); - }, 1000); + }); it.each([ [ diff --git a/src/domain/javascript/javascriptSemanticAnalysis.member_mutations.test.ts b/src/domain/javascript/javascriptSemanticAnalysis.member_mutations.test.ts index d3b3f9c136..4ede75e190 100644 --- a/src/domain/javascript/javascriptSemanticAnalysis.member_mutations.test.ts +++ b/src/domain/javascript/javascriptSemanticAnalysis.member_mutations.test.ts @@ -1076,7 +1076,7 @@ describe("property mutation collection on minified bundles", () => { { value: { status: "unknown" } }, ], }); - }, 30000); + }); }); describe("results of methods on an escaped receiver", () => { @@ -1112,7 +1112,7 @@ describe("results of methods on an escaped receiver", () => { status: "array", items: [{ value: { status: "unknown" } }], }); - }, 30000); + }); }); it.each([ diff --git a/src/domain/javascript/javascriptSemanticAnalysis.reference_lifetimes.test.ts b/src/domain/javascript/javascriptSemanticAnalysis.reference_lifetimes.test.ts index ed98d2626f..c327b5b785 100644 --- a/src/domain/javascript/javascriptSemanticAnalysis.reference_lifetimes.test.ts +++ b/src/domain/javascript/javascriptSemanticAnalysis.reference_lifetimes.test.ts @@ -26,7 +26,7 @@ describe("bounded paths through dynamic selectors and class origins", () => { value: 42, }); expect(performance.now() - start).toBeLessThan(2000); - }, 30000); + }); it("retains effects through class getter aliases while bounding loop paths", () => { expect( @@ -65,7 +65,7 @@ describe("bounded paths through dynamic selectors and class origins", () => { "unknown", ); expect(performance.now() - start).toBeLessThan(2000); - }, 30000); + }); it("retains shared-child mutations reached by dynamic-key alias loops", () => { expect( @@ -103,7 +103,7 @@ describe("bounded member path propagation", () => { ); expect(callable.returnSites[0]?.value.status).toBe("unknown"); expect(performance.now() - start).toBeLessThan(2000); - }, 30000); + }); it("preserves Array prototype effects through an otherwise unknown alias", () => { expect( @@ -125,7 +125,7 @@ describe("bounded member path propagation", () => { ), ).toEqual({ status: "literal", value: 3 }); expect(performance.now() - start).toBeLessThan(2000); - }, 30000); + }); // A dynamic self alias escapes its repeated prefix, which conservatively // covers every child; a static key without that slot keeps the literal. @@ -144,7 +144,6 @@ describe("bounded member path propagation", () => { expect(performance.now() - start).toBeLessThan(2000); expect(value?.status).toBe(status); }, - 30000, ); it.each([ @@ -196,7 +195,6 @@ describe("bounded member path propagation", () => { expect(performance.now() - start).toBeLessThan(2000); expect(value?.status).toBe(status); }, - 30000, ); it.each([ @@ -282,7 +280,7 @@ describe("reference lifetimes across calls and shallow copies", () => { `const alias0 = [1]; ${declarations} const ${pattern} = alias9; return alias0[0];`, ); expect(performance.now() - start).toBeLessThan(2000); - }, 30000); + }); it("bounds conditional shallow-copy traversal while retaining shared children", () => { const declarations = Array.from( @@ -297,7 +295,7 @@ describe("reference lifetimes across calls and shallow copies", () => { )?.status, ).toBe("unknown"); expect(performance.now() - start).toBeLessThan(2000); - }, 30000); + }); it.each([ ["child: {}", "child: {}", "literal"], diff --git a/src/dotnet/ManagedArtifactInspector.test.ts b/src/dotnet/ManagedArtifactInspector.test.ts index f3a7fd8fd9..5c877a1786 100644 --- a/src/dotnet/ManagedArtifactInspector.test.ts +++ b/src/dotnet/ManagedArtifactInspector.test.ts @@ -580,7 +580,7 @@ describe("managed artifact coded indexes", () => { (attribute) => attribute.type_name === "Fixture.LookupAttribute", ), ).toBe(true); - }, 30_000); + }); }); it.each([false, true])( diff --git a/src/evm/EvmBytecodeCarrier.test.ts b/src/evm/EvmBytecodeCarrier.test.ts index 69ae9b388a..bd291cbf6e 100644 --- a/src/evm/EvmBytecodeCarrier.test.ts +++ b/src/evm/EvmBytecodeCarrier.test.ts @@ -40,7 +40,7 @@ it("rejects a long interior separator run without pathological backtracking", as killSignal: "SIGKILL", }, ); -}, 20_000); +}); it("distinguishes raw bytes, empty code and malformed UTF-8", () => { const bytes = Uint8Array.from([0xff, 0x00]); const decoded = decodeEvmBytecodeCarrier(bytes, "raw"); diff --git a/src/ghidra/extensions/nativeaot/NativeAotProducer.test.ts b/src/ghidra/extensions/nativeaot/NativeAotProducer.test.ts index 32cf250260..c2789c525e 100644 --- a/src/ghidra/extensions/nativeaot/NativeAotProducer.test.ts +++ b/src/ghidra/extensions/nativeaot/NativeAotProducer.test.ts @@ -5,6 +5,7 @@ import { validateNativeAotReport } from "./NativeAotReport.js"; it.skipIf(!process.env.JAVA_HOME || !process.env.GSON_JAR)( "accepts transaction reports from the Java producer with controlled APIs", + { tags: ["long-running"] }, async () => { const output = await runOwnedCommand( { @@ -37,5 +38,4 @@ it.skipIf(!process.env.JAVA_HOME || !process.env.GSON_JAR)( }), ).toBeNull(); }, - 90_000, ); diff --git a/src/ida/IdaSessionClient.test.ts b/src/ida/IdaSessionClient.test.ts index 158c9699b4..d0a15d47a6 100644 --- a/src/ida/IdaSessionClient.test.ts +++ b/src/ida/IdaSessionClient.test.ts @@ -781,7 +781,6 @@ describe("attached IDA regex supervision", () => { await client.close(); } }, - 15_000, ); it("bounds regex matching without caller cancellation and preserves subsequent searches", async () => { const { producer, client } = await fixture(); @@ -827,7 +826,7 @@ describe("attached IDA regex supervision", () => { } finally { await client.close(); } - }, 15_000); + }); }); describe("attached IDA function failure handling", () => { diff --git a/src/javascript/analysis/JavaScriptAnalysisTransfer.worker.test.ts b/src/javascript/analysis/JavaScriptAnalysisTransfer.worker.test.ts index e0548f3d45..44a3caf812 100644 --- a/src/javascript/analysis/JavaScriptAnalysisTransfer.worker.test.ts +++ b/src/javascript/analysis/JavaScriptAnalysisTransfer.worker.test.ts @@ -45,6 +45,7 @@ it.each([ "utf8-cleanup-retry", ] as const)( "authenticates the physical worker transfer at the source-analysis port: %s", + { tags: ["long-running"] }, async (mode) => { const controller = new AbortController(); const cancellation = { reason: "cancel after physical transfer failure" }; @@ -153,5 +154,4 @@ it.each([ if (root === undefined) throw new Error("Worker root was not acquired"); await expect(lstat(root)).rejects.toMatchObject({ code: "ENOENT" }); }, - 40_000, ); diff --git a/src/native/hardening/BinaryHardeningParsers.test.ts b/src/native/hardening/BinaryHardeningParsers.test.ts index d92673743a..3f7db3d8e1 100644 --- a/src/native/hardening/BinaryHardeningParsers.test.ts +++ b/src/native/hardening/BinaryHardeningParsers.test.ts @@ -1089,14 +1089,18 @@ it("leaves GNU property rows unknown behind a compressed note section", () => { }); }); -it("admits a hostile section table without rescanning every span", () => { - const started = performance.now(); - const image = readElfHardening( - elfHardeningFixture({ disjointNoteSections: 65000 }), - ); - expect(performance.now() - started).toBeLessThan(5000); - expect(findRow(image.rows, "cet_ibt_shstk").state).toBe("unknown"); -}, 60000); +it( + "admits a hostile section table without rescanning every span", + { tags: ["long-running"] }, + () => { + const started = performance.now(); + const image = readElfHardening( + elfHardeningFixture({ disjointNoteSections: 65000 }), + ); + expect(performance.now() - started).toBeLessThan(5000); + expect(findRow(image.rows, "cet_ibt_shstk").state).toBe("unknown"); + }, +); it("cites a non-ASCII import name by its source bytes", () => { const name = "__\u00ff_chk"; diff --git a/src/native/initializers/NativeInitializersParsers.test.ts b/src/native/initializers/NativeInitializersParsers.test.ts index c8814da972..2ed1730533 100644 --- a/src/native/initializers/NativeInitializersParsers.test.ts +++ b/src/native/initializers/NativeInitializersParsers.test.ts @@ -921,45 +921,49 @@ describe("ELF section lookups", () => { ]); }); - it("resolves a full slot budget against a near-maximal section table in one pass", async () => { - const base = elf64PieInitializers(); - const slots = MAX_NATIVE_INITIALIZER_ENTRIES; - const payload = Buffer.alloc(slots * 8); - for (let slot = 0; slot < slots; slot += 1) - payload.writeBigUInt64LE(0x100n, slot * 8); - // Allocated, unnamed sections that cover every slot and target address. - const extra = Buffer.alloc((0xffff - 12) * 64); - for (let at = 0; at < extra.length; at += 64) { - extra.writeUInt32LE(1, at + 4); - extra.writeBigUInt64LE(2n, at + 8); - extra.writeBigUInt64LE(0x100000n, at + 32); - } - const bytes = Buffer.concat([ - base, - payload, - base.subarray(0x800, 0x800 + 12 * 64), - extra, - ]); - bytes.writeBigUInt64LE(BigInt(base.length + payload.length), 40); - bytes.writeUInt16LE(0xffff, 60); - // The single PT_LOAD maps the whole file; DT_INIT_ARRAY moves to the payload. - bytes.writeBigUInt64LE(BigInt(bytes.length), 64 + 32); - bytes.writeBigUInt64LE(BigInt(bytes.length), 64 + 40); - bytes.writeBigUInt64LE(BigInt(base.length), 0x300 + 2 * 16 + 8); - bytes.writeBigUInt64LE(BigInt(slots * 8), 0x300 + 3 * 16 + 8); - const started = performance.now(); - const report = await read(bytes); - // A per-lookup header walk is about 4e9 comparisons here; the index is a few hundred ms. - expect(performance.now() - started).toBeLessThan(10_000); - expect(report.coverage.examined_entries).toBe(slots); - const slot = report.entries.find((entry) => entry.kind === "init_array"); - expect(slot).toMatchObject({ - value_va: "0x100", - slot_section: null, - section: { name: ".text" }, - symbol: { name: "ctor_a" }, - }); - }, 180_000); + it( + "resolves a full slot budget against a near-maximal section table in one pass", + { tags: ["long-running"] }, + async () => { + const base = elf64PieInitializers(); + const slots = MAX_NATIVE_INITIALIZER_ENTRIES; + const payload = Buffer.alloc(slots * 8); + for (let slot = 0; slot < slots; slot += 1) + payload.writeBigUInt64LE(0x100n, slot * 8); + // Allocated, unnamed sections that cover every slot and target address. + const extra = Buffer.alloc((0xffff - 12) * 64); + for (let at = 0; at < extra.length; at += 64) { + extra.writeUInt32LE(1, at + 4); + extra.writeBigUInt64LE(2n, at + 8); + extra.writeBigUInt64LE(0x100000n, at + 32); + } + const bytes = Buffer.concat([ + base, + payload, + base.subarray(0x800, 0x800 + 12 * 64), + extra, + ]); + bytes.writeBigUInt64LE(BigInt(base.length + payload.length), 40); + bytes.writeUInt16LE(0xffff, 60); + // The single PT_LOAD maps the whole file; DT_INIT_ARRAY moves to the payload. + bytes.writeBigUInt64LE(BigInt(bytes.length), 64 + 32); + bytes.writeBigUInt64LE(BigInt(bytes.length), 64 + 40); + bytes.writeBigUInt64LE(BigInt(base.length), 0x300 + 2 * 16 + 8); + bytes.writeBigUInt64LE(BigInt(slots * 8), 0x300 + 3 * 16 + 8); + const started = performance.now(); + const report = await read(bytes); + // A per-lookup header walk is about 4e9 comparisons here; the index is a few hundred ms. + expect(performance.now() - started).toBeLessThan(10_000); + expect(report.coverage.examined_entries).toBe(slots); + const slot = report.entries.find((entry) => entry.kind === "init_array"); + expect(slot).toMatchObject({ + value_va: "0x100", + slot_section: null, + section: { name: ".text" }, + symbol: { name: "ctor_a" }, + }); + }, + ); }); describe("Mach-O symbol tables", () => { diff --git a/src/process/ExecFileOutput.test.ts b/src/process/ExecFileOutput.test.ts index 2a126a5789..8d386e85e9 100644 --- a/src/process/ExecFileOutput.test.ts +++ b/src/process/ExecFileOutput.test.ts @@ -207,7 +207,6 @@ describe("execFileOutput", () => { await execution; } }, - 10_000, ); it.skipIf(process.platform === "win32")( @@ -562,7 +561,7 @@ describe.skipIf(process.platform === "win32")( killFailure = await stopOwnedDescendant(pid, finished); } if (killFailure !== undefined) throw killFailure; - }, 15_000); + }); it("keeps scratch files until an inherited-pipe descendant closes them", async () => { const directory = await createTestTempDirectory("rea-exec-inherited-"); diff --git a/src/process/capture/ProcessCaptureLifecycle.test.ts b/src/process/capture/ProcessCaptureLifecycle.test.ts index 781ae11c59..4fa526f8d3 100644 --- a/src/process/capture/ProcessCaptureLifecycle.test.ts +++ b/src/process/capture/ProcessCaptureLifecycle.test.ts @@ -291,7 +291,7 @@ it("records no exit code when no exit was observed", async () => { result.finalization?.exit_code, "an unobserved exit has no code to record", ).toBeNull(); -}, 10_000); +}); it("records every delivery result and publishes attempts incrementally", async () => { snapshots.length = 0; @@ -422,7 +422,7 @@ it("stops waiting for a hung delivery once the exit is observed", async () => { }, ]); expect(exit.signal, "the observed exit is kept").toBe(0); -}, 10_000); +}); it("retains a thrown signal error as an unverified delivery reason", async () => { const fake = fakeTerminal( @@ -491,7 +491,7 @@ it("stops waiting when the escalation delivery never settles and no exit arrives reason: "delivery did not settle within 1000 ms", }); expect(result.finalization?.elapsed_ms, "no exit was observed").toBeNull(); -}, 10_000); +}); const activeTimers = (): number => process.getActiveResourcesInfo().filter((name) => name === "Timeout").length; diff --git a/src/server/http/serveStreamableHttp.test.ts b/src/server/http/serveStreamableHttp.test.ts index a16ce5926a..f47df71ffe 100644 --- a/src/server/http/serveStreamableHttp.test.ts +++ b/src/server/http/serveStreamableHttp.test.ts @@ -785,7 +785,7 @@ it("answers an oversized sessionless POST promptly instead of stalling on the pr { type: "text", text: "still served" }, ]); await client.close(); -}, 20_000); +}); it("closes the connection after a reply sent before the request body was read, on a keep-alive client", async () => { const { served } = await start(); diff --git a/tests/acceptance/analysisSettingsMcp.test.ts b/tests/acceptance/analysisSettingsMcp.test.ts index dbae94f312..5e2bb51de0 100644 --- a/tests/acceptance/analysisSettingsMcp.test.ts +++ b/tests/acceptance/analysisSettingsMcp.test.ts @@ -80,7 +80,7 @@ it("recovers expanded ASAR listing admission on the same MCP connection independ } finally { await client.close(); } -}, 30000); +}); it("advertises exact contracts and recovers a full large-index archive over one MCP connection", async () => { const root = await createTestTempDirectory("rea-runtime-settings-"); @@ -214,7 +214,7 @@ it("advertises exact contracts and recovers a full large-index archive over one } finally { await client.close(); } -}, 30000); +}); it.each(["0", "2147483648"])( "keeps invalid JADX launch timeout %s local and repairable through MCP", @@ -279,7 +279,6 @@ it.each(["0", "2147483648"])( await client.close(); } }, - 30000, ); it("lowers, restores and seeds the native matching allowance over MCP", async () => { @@ -427,7 +426,7 @@ it("lowers, restores and seeds the native matching allowance over MCP", async () } finally { await invalid.client.close(); } -}, 30000); +}); it("starts with invalid runtime seeds and recovers ASAR and capture work on the same connection", async () => { const root = await createTestTempDirectory("rea-invalid-runtime-seeds-"); @@ -517,7 +516,7 @@ it("starts with invalid runtime seeds and recovers ASAR and capture work on the } finally { await client.close(); } -}, 30000); +}); it.skipIf(process.platform === "win32")( "ignores Windows ChangeTime launch settings on other hosts", @@ -539,5 +538,4 @@ it.skipIf(process.platform === "win32")( await client.close(); } }, - 30000, ); diff --git a/tests/acceptance/appleIpsCli.test.ts b/tests/acceptance/appleIpsCli.test.ts index 1fc118e568..6d6f44bac2 100644 --- a/tests/acceptance/appleIpsCli.test.ts +++ b/tests/acceptance/appleIpsCli.test.ts @@ -44,7 +44,6 @@ cliTest( ).toBe(createHash("sha256").update(name).digest("hex")); expect(evidence.normalized_result.coverage.status).toBe("complete"); }, - 45000, ); cliTest( diff --git a/tests/acceptance/applications/appBundleEncodingCli.test.ts b/tests/acceptance/applications/appBundleEncodingCli.test.ts index f0cafe53d7..28c6740e97 100644 --- a/tests/acceptance/applications/appBundleEncodingCli.test.ts +++ b/tests/acceptance/applications/appBundleEncodingCli.test.ts @@ -171,7 +171,6 @@ describe.skipIf(process.platform !== "darwin")( } } }, - 45_000, ); }, ); diff --git a/tests/acceptance/applications/applicationWorkflowCli.test.ts b/tests/acceptance/applications/applicationWorkflowCli.test.ts index 799db70b8b..6b79a53c24 100644 --- a/tests/acceptance/applications/applicationWorkflowCli.test.ts +++ b/tests/acceptance/applications/applicationWorkflowCli.test.ts @@ -534,7 +534,7 @@ it("preserves complete line-comment source-map URLs through CLI and MCP", async ); } expect((await analyzeThroughStdioMcp(root)).graph).toEqual(graph); -}, 20_000); +}); it("resolves source-map URL paths once without changing their declarations", async () => { const root = await createTestTempDirectory("rea-source-map-encoding-cli-"); @@ -654,7 +654,7 @@ it("resolves source-map URL paths once without changing their declarations", asy ), ).toBe(false); expect((await analyzeThroughStdioMcp(root)).graph).toEqual(graph); -}, 20_000); +}); describe("JavaScript application path CLI", () => { it("retains the admitted relative CLI selection and canonical artifact identity", async () => { @@ -683,7 +683,7 @@ describe("JavaScript application path CLI", () => { }, subject: { local_path: absolute.value.subject?.local_path }, }); - }, 20_000); + }); it("returns the self-import graph consistently through CLI and stdio MCP", async () => { const root = await createTestTempDirectory( @@ -706,7 +706,7 @@ describe("JavaScript application path CLI", () => { expect(mcpResult.semantic_graph).toEqual( result.normalized_result.semantic_graph, ); - }, 20_000); + }); it("preserves canonical Electron API aliases through CLI and stdio MCP", async () => { const root = await createTestTempDirectory("rea-electron-api-alias-"); @@ -758,7 +758,7 @@ describe("JavaScript application path CLI", () => { expect(mcpResult.summary).toEqual(cliResult.summary); expect(mcpResult.graph).toEqual(cliResult.graph); expect(mcpResult.semantic_graph).toEqual(cliResult.semantic_graph); - }, 20_000); + }); }); describe("application workflow CLI parity", () => { @@ -857,7 +857,7 @@ describe("application workflow CLI parity", () => { }, }, }); - }, 20_000); + }); it("traces the same authenticated semantic graph through the CLI", async () => { const root = await createTestTempDirectory("rea-semantic-cli-"); @@ -897,7 +897,7 @@ describe("application workflow CLI parity", () => { source_graph_id: result.semantic_graph.graph_id, }, }); - }, 20_000); + }); }); it("traces all endpoint carriers and their response consumers through CLI and MCP", async () => { @@ -1018,7 +1018,7 @@ it("traces all endpoint carriers and their response consumers through CLI and MC coverage: { status: "partial" }, }); expect(await readFile(sourcePath, "utf8")).toBe(source); -}, 20_000); +}); describe("rest parameter semantic trace CLI", () => { it("traces each ordinary rest argument to its parameter through public application Evidence", async () => { @@ -1068,7 +1068,7 @@ describe("rest parameter semantic trace CLI", () => { }, }); } - }, 20_000); + }); }); describe("empty property key application CLI", () => { @@ -1100,7 +1100,6 @@ describe("empty property key application CLI", () => { }, }); }, - 20_000, ); }); @@ -1251,7 +1250,7 @@ describe("Webpack factory CommonJS export keys", () => { expectBundleExports(evidence, "5", []); expectBundleExports(evidence, "6", ["__proto__"]); } - }, 20_000); + }); }); describe("application workflow CLI input", () => { @@ -1411,7 +1410,7 @@ describe("application workflow CLI copy boundaries", () => { ), }, }); - }, 20_000); + }); }); describe("application workflow CLI and MCP capture lifetimes", () => { @@ -1521,7 +1520,7 @@ describe("application workflow CLI and MCP capture lifetimes", () => { await runCli(["compare-javascript-export-shapes", inputPath, "--json"]), ).toMatchObject(expected); expect(await compareThroughStdioMcp(input)).toMatchObject(expected); - }, 20_000); + }); }); describe("application workflow CLI export Evidence", () => { @@ -1568,7 +1567,7 @@ describe("application workflow CLI export Evidence", () => { ), ).toMatchObject(expected); expect(await compareThroughStdioMcp(input)).toMatchObject(expected); - }, 20_000); + }); it("preserves uncertainty after a helper can mutate an awaited return object", async () => { const root = await createTestTempDirectory("rea-awaited-export-shape-cli-"); @@ -1604,7 +1603,7 @@ describe("application workflow CLI export Evidence", () => { ]), }, }); - }, 20_000); + }); it("compares exact export shapes from file-backed Evidence", async () => { const root = await createTestTempDirectory("rea-export-shape-cli-"); @@ -1663,7 +1662,7 @@ describe("application workflow CLI export Evidence", () => { ]), }, }); - }, 20_000); + }); }); describe("application workflow CLI export property presence", () => { @@ -1759,7 +1758,7 @@ describe("application workflow CLI export property presence", () => { ]), }, }); - }, 20_000); + }); }); describe("application workflow CLI validation", () => { @@ -1794,7 +1793,7 @@ describe("application workflow CLI validation", () => { ]), }, }); - }, 20_000); + }); }); const compareThroughStdioMcp = async ( diff --git a/tests/acceptance/applications/artifactComparisonCoverage.test.ts b/tests/acceptance/applications/artifactComparisonCoverage.test.ts index 83e5ecc6bf..7b1693dbd4 100644 --- a/tests/acceptance/applications/artifactComparisonCoverage.test.ts +++ b/tests/acceptance/applications/artifactComparisonCoverage.test.ts @@ -432,7 +432,6 @@ cliTest( await assertCoverageControls({ left, right, inventory, compare }); }, - 30_000, ); cliTest.skipIf(process.platform === "win32")( @@ -469,7 +468,6 @@ cliTest.skipIf(process.platform === "win32")( ], }); }, - 30_000, ); cliTest.skipIf(process.platform === "win32")( @@ -521,7 +519,6 @@ cliTest.skipIf(process.platform === "win32")( ]), }); }, - 30_000, ); cliTest.skipIf(process.platform === "win32")( @@ -579,7 +576,6 @@ cliTest.skipIf(process.platform === "win32")( ); } }, - 30_000, ); cliTest( @@ -620,7 +616,6 @@ cliTest( ]), }); }, - 30_000, ); cliTest( diff --git a/tests/acceptance/applications/assetCatalogResourceKeys.test.ts b/tests/acceptance/applications/assetCatalogResourceKeys.test.ts index 42f69ecf22..2006614220 100644 --- a/tests/acceptance/applications/assetCatalogResourceKeys.test.ts +++ b/tests/acceptance/applications/assetCatalogResourceKeys.test.ts @@ -170,5 +170,4 @@ cliTest.skipIf(process.platform !== "darwin")( }); } }, - 30_000, ); diff --git a/tests/acceptance/applications/binaryPlistDates.test.ts b/tests/acceptance/applications/binaryPlistDates.test.ts index 010d128f7e..30883607c5 100644 --- a/tests/acceptance/applications/binaryPlistDates.test.ts +++ b/tests/acceptance/applications/binaryPlistDates.test.ts @@ -225,7 +225,6 @@ cliTest( ibResult.documents[0]?.archive_sha256, ); }, - 60_000, ); cliTest( @@ -278,5 +277,4 @@ cliTest( expect(mcpResult).toEqual(cliResult); expect(Buffer.compare(await readFile(archivePath), bytes)).toBe(0); }, - 60_000, ); diff --git a/tests/acceptance/applications/electronInvalidPaths.test.ts b/tests/acceptance/applications/electronInvalidPaths.test.ts index 31724ce058..65a155179c 100644 --- a/tests/acceptance/applications/electronInvalidPaths.test.ts +++ b/tests/acceptance/applications/electronInvalidPaths.test.ts @@ -176,6 +176,7 @@ cliTest.skipIf(isWindows)( cliTest.skipIf(isWindows)( "returns a typed failure when an executable exits before Electron starts and keeps the MCP server and its Evidence", + { tags: ["long-running"] }, async ({ cli }) => { const root = await createTestTempDirectory("rea-electron-early-exit-"); const application = await createElectronApplication(root); @@ -229,7 +230,6 @@ cliTest.skipIf(isWindows)( expect(session.isError, JSON.stringify(session)).not.toBe(true); expect(await retained()).toEqual(before); }, - 180_000, ); cliTest( diff --git a/tests/acceptance/applications/erlangBeamViews.test.ts b/tests/acceptance/applications/erlangBeamViews.test.ts index b8778311c3..be76c49e6f 100644 --- a/tests/acceptance/applications/erlangBeamViews.test.ts +++ b/tests/acceptance/applications/erlangBeamViews.test.ts @@ -103,7 +103,6 @@ const checkSelectors = async ( cliTest( "queries same-name BEAM export arities through CLI/MCP after deleting the source", - { timeout: 60_000 }, async ({ cli }) => { const root = await createTestTempDirectory("rea-beam-views-"); const path = join(root, "app.beam"); diff --git a/tests/acceptance/applications/interfaceBuilderClassNameIdentity.test.ts b/tests/acceptance/applications/interfaceBuilderClassNameIdentity.test.ts index 919c290e19..76f7271eba 100644 --- a/tests/acceptance/applications/interfaceBuilderClassNameIdentity.test.ts +++ b/tests/acceptance/applications/interfaceBuilderClassNameIdentity.test.ts @@ -142,5 +142,4 @@ cliTest( }); expect(withoutAuthoredField?.attributes).not.toHaveProperty("className"); }, - 60_000, ); diff --git a/tests/acceptance/applications/javascriptAnalysisLimits.test.ts b/tests/acceptance/applications/javascriptAnalysisLimits.test.ts index 94399944aa..7cd732937c 100644 --- a/tests/acceptance/applications/javascriptAnalysisLimits.test.ts +++ b/tests/acceptance/applications/javascriptAnalysisLimits.test.ts @@ -147,7 +147,7 @@ it("preserves MCP analysis limits in retained Evidence and an exported bundle ro const imported = await call("import_evidence_bundle", { path }); expect(imported.isError, JSON.stringify(imported.content)).not.toBe(true); expect(await getBundle(call)).toEqual(retained); -}, 60_000); +}); cliTest( "retains caller limits and applicable file scopes after an actual analysis timeout", @@ -261,7 +261,6 @@ cliTest( expectFileAnalysisApplicability(evidence, interrupted); await client.ping(); }, - 60_000, ); cliTest( diff --git a/tests/acceptance/applications/javascriptBuiltinDefaultsCli.test.ts b/tests/acceptance/applications/javascriptBuiltinDefaultsCli.test.ts index 96a18ae8cd..ab8352944a 100644 --- a/tests/acceptance/applications/javascriptBuiltinDefaultsCli.test.ts +++ b/tests/acceptance/applications/javascriptBuiltinDefaultsCli.test.ts @@ -124,7 +124,7 @@ it("preserves earlier and sibling effects without inventing replaced cached-modu expect(response.isError, JSON.stringify(response)).not.toBe(true); expect(response.structuredContent).toEqual(evidence); await client.ping(); -}, 60000); +}); it("excludes monkey-patched CommonJS effects from CLI and MCP evidence", async () => { const root = await createTestTempDirectory("rea-builtin-mutated-"); @@ -175,7 +175,7 @@ it("excludes monkey-patched CommonJS effects from CLI and MCP evidence", async ( expect(response.isError, JSON.stringify(response)).not.toBe(true); expect(response.structuredContent).toEqual(evidence); await client.ping(); -}, 60000); +}); it("retains CommonJS builtin effects and handle links through CLI and MCP", async () => { const root = await createTestTempDirectory("rea-builtin-commonjs-"); @@ -252,7 +252,7 @@ it("retains CommonJS builtin effects and handle links through CLI and MCP", asyn expect(response.isError, JSON.stringify(response)).not.toBe(true); expect(response.structuredContent).toEqual(evidence); await client.ping(); -}, 60000); +}); it.each([ "import fs from 'node:fs';", @@ -294,7 +294,6 @@ it.each([ ]), ); }, - 20_000, ); it("keeps only direct logical defaults and actual argv elements in the public CLI graph", async () => { @@ -399,4 +398,4 @@ function shadowed(process) { return process.argv[3]; }`, }, ), ).toHaveLength(1); -}, 20_000); +}); diff --git a/tests/acceptance/applications/javascriptCallLiteralTransfer.test.ts b/tests/acceptance/applications/javascriptCallLiteralTransfer.test.ts index 90ceba64dd..7af4447cba 100644 --- a/tests/acceptance/applications/javascriptCallLiteralTransfer.test.ts +++ b/tests/acceptance/applications/javascriptCallLiteralTransfer.test.ts @@ -57,5 +57,4 @@ cliTest( ]), ); }, - 90_000, ); diff --git a/tests/acceptance/applications/javascriptCapturedParameters.test.ts b/tests/acceptance/applications/javascriptCapturedParameters.test.ts index 164048e35c..5aaf88ad19 100644 --- a/tests/acceptance/applications/javascriptCapturedParameters.test.ts +++ b/tests/acceptance/applications/javascriptCapturedParameters.test.ts @@ -67,7 +67,6 @@ cliTest( }, ); }, - 120_000, ); cliTest( @@ -133,7 +132,6 @@ console.log(JSON.stringify([captured(5),assigned(5),between(5),intermediate(5),n ); }); }, - 120_000, ); cliTest( @@ -180,7 +178,6 @@ console.log(JSON.stringify([delayed(),incoming(5),delayedPrivate(),staticField() ); }); }, - 120_000, ); cliTest( @@ -246,7 +243,6 @@ console.log(JSON.stringify([optionalCall(null),optionalCall(receiver),optionalCa "app.ts", ); }, - 120_000, ); cliTest( @@ -310,7 +306,6 @@ console.log(JSON.stringify([objectOrder(),bothSides(),arrayOrder(),computedOrder ); }); }, - 120_000, ); cliTest( @@ -361,7 +356,6 @@ console.log(JSON.stringify([read(),captured(object=>{object.value=3;})]));`, ); }); }, - 120_000, ); cliTest( @@ -431,7 +425,6 @@ console.log(JSON.stringify([objectPresent(),objectMissing(),arrayPresent(),array ); }); }, - 120_000, ); cliTest( @@ -508,5 +501,4 @@ cliTest( await harness.close(); } }, - 120_000, ); diff --git a/tests/acceptance/applications/javascriptCheckpointReserveCli.test.ts b/tests/acceptance/applications/javascriptCheckpointReserveCli.test.ts index 51935ae178..eb85110b6e 100644 --- a/tests/acceptance/applications/javascriptCheckpointReserveCli.test.ts +++ b/tests/acceptance/applications/javascriptCheckpointReserveCli.test.ts @@ -60,7 +60,6 @@ cliTest.skipIf(process.versions.bun !== undefined).for([ { laterSources: 1, heapMb: 448, methodsCount: 600, retainGraph: false }, ])( "preserves evidence with $laterSources later checkpoints and a $heapMb MiB parent heap", - { timeout: 90_000 }, async ({ laterSources, heapMb, methodsCount, retainGraph }, { cli }) => { const root = await createTestTempDirectory("rea-js-checkpoint-reserve-"); const source = Array.from( @@ -173,7 +172,6 @@ cliTest.skipIf(process.versions.bun !== undefined).for([ cliTest.skipIf(process.versions.bun !== undefined)( "keeps every source's static facts after semantic results use the parent result budget", - { timeout: 90_000 }, async ({ cli }) => { const root = await createTestTempDirectory("rea-js-static-capacity-"); // Plain functions produce semantic graphs large enough to use the result diff --git a/tests/acceptance/applications/javascriptChildHandleOwnership.test.ts b/tests/acceptance/applications/javascriptChildHandleOwnership.test.ts index 19fc88ab95..5b55e7dc73 100644 --- a/tests/acceptance/applications/javascriptChildHandleOwnership.test.ts +++ b/tests/acceptance/applications/javascriptChildHandleOwnership.test.ts @@ -99,7 +99,7 @@ stable.kill(); family === "child-process" && reason === "ambiguous-target", ), ).toHaveLength(2); -}, 60000); +}); it("keeps deferred instance field child ownership uncertain through CLI and MCP", async () => { const evidence = await analyzeThroughCliAndMcp( @@ -140,4 +140,4 @@ stable.kill(); family === "child-process" && reason === "ambiguous-target", ), ).toHaveLength(1); -}, 60000); +}); diff --git a/tests/acceptance/applications/javascriptEndpointCandidateCli.test.ts b/tests/acceptance/applications/javascriptEndpointCandidateCli.test.ts index dd09dca96e..a853f7f35d 100644 --- a/tests/acceptance/applications/javascriptEndpointCandidateCli.test.ts +++ b/tests/acceptance/applications/javascriptEndpointCandidateCli.test.ts @@ -160,7 +160,7 @@ it("reports a candidate endpoint through the worker boundary in the public CLI", ({ target_node_id }) => target_node_id === endpoint?.node_id, ); expect(edge?.properties).toMatchObject({ interpretation: "candidate" }); -}, 20_000); +}); it("preserves SQLite constructor certainty through the public worker and graph", async () => { const root = await createTestTempDirectory("rea-storage-candidate-cli-"); @@ -218,4 +218,4 @@ it("preserves SQLite constructor certainty through the public worker and graph", ]), }, }); -}, 20_000); +}); diff --git a/tests/acceptance/applications/javascriptEndpointPayload.test.ts b/tests/acceptance/applications/javascriptEndpointPayload.test.ts index e43d146687..da98b32848 100644 --- a/tests/acceptance/applications/javascriptEndpointPayload.test.ts +++ b/tests/acceptance/applications/javascriptEndpointPayload.test.ts @@ -157,7 +157,6 @@ cliTest( await transport.close(); } }, - 120_000, ); interface EndpointWorkflowInput { diff --git a/tests/acceptance/applications/javascriptEventPayload.test.ts b/tests/acceptance/applications/javascriptEventPayload.test.ts index fbe3a9422a..05c2b97d7d 100644 --- a/tests/acceptance/applications/javascriptEventPayload.test.ts +++ b/tests/acceptance/applications/javascriptEventPayload.test.ts @@ -160,7 +160,6 @@ cliTest( await transport.close(); } }, - 120_000, ); cliTest( @@ -221,5 +220,4 @@ cliTest( ); expect(new Set(trace.seed_node_ids)).toEqual(retained); }, - 120_000, ); diff --git a/tests/acceptance/applications/javascriptFactoryCompletion.test.ts b/tests/acceptance/applications/javascriptFactoryCompletion.test.ts index fb348085ab..fdc6ff1d4c 100644 --- a/tests/acceptance/applications/javascriptFactoryCompletion.test.ts +++ b/tests/acceptance/applications/javascriptFactoryCompletion.test.ts @@ -417,7 +417,6 @@ cliTest( } } }, - 120_000, ); cliTest( @@ -500,5 +499,4 @@ cliTest( ); } }, - 30_000, ); diff --git a/tests/acceptance/applications/javascriptFailureEvidenceOutput.test.ts b/tests/acceptance/applications/javascriptFailureEvidenceOutput.test.ts index 1c5cd6430a..801fc1f979 100644 --- a/tests/acceptance/applications/javascriptFailureEvidenceOutput.test.ts +++ b/tests/acceptance/applications/javascriptFailureEvidenceOutput.test.ts @@ -119,7 +119,6 @@ cliTest( Buffer.byteLength(inline.stdout), ); }, - 60_000, ); cliTest( @@ -152,7 +151,6 @@ cliTest( }); expect(await readFile(output, "utf8")).toBe("kept"); }, - 60_000, ); // A one-line module finishes well within 5 s; a string-array-style module of @@ -227,7 +225,6 @@ cliTest( ]), ); }, - 120_000, ); // Drive the real staged publication of the partial Evidence across its @@ -305,7 +302,6 @@ cliTest( }); expect(staging).toHaveLength(1); }, - 60_000, ); cliTest( @@ -327,7 +323,6 @@ cliTest( }); expect(staging).toEqual([]); }, - 60_000, ); cliTest( @@ -356,5 +351,4 @@ cliTest( }); expect(staging).toEqual([]); }, - 60_000, ); diff --git a/tests/acceptance/applications/javascriptFunctionNameCli.test.ts b/tests/acceptance/applications/javascriptFunctionNameCli.test.ts index b402c5d7f3..c05ca69de9 100644 --- a/tests/acceptance/applications/javascriptFunctionNameCli.test.ts +++ b/tests/acceptance/applications/javascriptFunctionNameCli.test.ts @@ -61,5 +61,4 @@ it.each([ ); expect(targets).toEqual(targetLine === null ? [] : [targetLine]); }, - 20_000, ); diff --git a/tests/acceptance/applications/javascriptIterationAliases.test.ts b/tests/acceptance/applications/javascriptIterationAliases.test.ts index a7f039eb83..bb9246c6a9 100644 --- a/tests/acceptance/applications/javascriptIterationAliases.test.ts +++ b/tests/acceptance/applications/javascriptIterationAliases.test.ts @@ -72,5 +72,4 @@ const assertReturns = (fields: JavaScriptReturnFields): void => { cliTest( "preserves yielded-object mutation uncertainty through CLI and stdio MCP", ({ cli }) => verifyJavaScriptReturnShapes(cli, source, assertReturns), - 120_000, ); diff --git a/tests/acceptance/applications/javascriptPartialEndpointsCli.test.ts b/tests/acceptance/applications/javascriptPartialEndpointsCli.test.ts index 168364905b..9513e1fd98 100644 --- a/tests/acceptance/applications/javascriptPartialEndpointsCli.test.ts +++ b/tests/acceptance/applications/javascriptPartialEndpointsCli.test.ts @@ -57,5 +57,4 @@ cliTest( ), ).toBe(true); }, - 20_000, ); diff --git a/tests/acceptance/applications/javascriptReturnedReferenceCycles.test.ts b/tests/acceptance/applications/javascriptReturnedReferenceCycles.test.ts index 74b7a8a478..1b834f13a2 100644 --- a/tests/acceptance/applications/javascriptReturnedReferenceCycles.test.ts +++ b/tests/acceptance/applications/javascriptReturnedReferenceCycles.test.ts @@ -141,5 +141,4 @@ fetch("/copied-module");`, expect(analyzed.isError, JSON.stringify(analyzed.content)).not.toBe(true); verify(analyzed.structuredContent); }, - 90_000, ); diff --git a/tests/acceptance/applications/javascriptReturnedReferences.test.ts b/tests/acceptance/applications/javascriptReturnedReferences.test.ts index 8ad3a8da1a..a1ed7a89f2 100644 --- a/tests/acceptance/applications/javascriptReturnedReferences.test.ts +++ b/tests/acceptance/applications/javascriptReturnedReferences.test.ts @@ -210,7 +210,6 @@ cliTest( assertReturns(fields); assertWideReturns(fields); }), - 120_000, ); cliTest( @@ -224,5 +223,4 @@ cliTest( assertWideReturns, ); }, - 120_000, ); diff --git a/tests/acceptance/applications/javascriptSlotStores.test.ts b/tests/acceptance/applications/javascriptSlotStores.test.ts index 3af7e3eeed..d9c9e7f532 100644 --- a/tests/acceptance/applications/javascriptSlotStores.test.ts +++ b/tests/acceptance/applications/javascriptSlotStores.test.ts @@ -94,5 +94,4 @@ const assertReturns = (fields: JavaScriptReturnFields): void => { cliTest( "does not report stale literals after storing references in member slots", ({ cli }) => verifyJavaScriptReturnShapes(cli, source, assertReturns), - 120_000, ); diff --git a/tests/acceptance/applications/javascriptSourceSelectionCli.test.ts b/tests/acceptance/applications/javascriptSourceSelectionCli.test.ts index e152f300c0..4ff9d06605 100644 --- a/tests/acceptance/applications/javascriptSourceSelectionCli.test.ts +++ b/tests/acceptance/applications/javascriptSourceSelectionCli.test.ts @@ -20,7 +20,6 @@ cliTest.for([ { format: "asar", command: "analyze-javascript-application" }, ])( "analyzes selected $format sources through $command with complete artifact identity", - { timeout: 60_000 }, async ({ format, command }, { cli }) => { const directory = await createTestTempDirectory("rea-js-source-selection-"); const files = await writeJavaScriptSourceSelectionFixture(directory); @@ -202,7 +201,6 @@ cliTest.for([ }, ])( "appends $source --source-paths-json selections for $format through $command", - { timeout: 60_000 }, async ({ command, source, format }, { cli }) => { const directory = await createTestTempDirectory( "rea-js-source-paths-json-", @@ -324,7 +322,6 @@ cliTest( cliTest( "accepts legal ASAR JSON whitespace while preserving selected-source identity", - { timeout: 60_000 }, async ({ cli }) => { const root = await createTestTempDirectory("rea-js-asar-whitespace-"); await writeJavaScriptSourceSelectionFixture(root); diff --git a/tests/acceptance/applications/javascriptUnknownCapacity.test.ts b/tests/acceptance/applications/javascriptUnknownCapacity.test.ts index 6af4858728..2a0500b782 100644 --- a/tests/acceptance/applications/javascriptUnknownCapacity.test.ts +++ b/tests/acceptance/applications/javascriptUnknownCapacity.test.ts @@ -88,5 +88,4 @@ cliTest( } } }, - 30_000, ); diff --git a/tests/acceptance/applications/mobileDirectoryComponents.test.ts b/tests/acceptance/applications/mobileDirectoryComponents.test.ts index eb68d8ebb3..7e5917251c 100644 --- a/tests/acceptance/applications/mobileDirectoryComponents.test.ts +++ b/tests/acceptance/applications/mobileDirectoryComponents.test.ts @@ -140,7 +140,6 @@ const fixtures = [ cliTest.for(fixtures)( "preserves entry kinds in $family projections through CLI and stdio MCP", - { timeout: 60_000 }, async (fixture, { cli }) => { const root = await createTestTempDirectory("rea-mobile-directory-"); const environment = { HOME: root, USERPROFILE: root }; @@ -320,7 +319,6 @@ cliTest.for([ }, ])( "preserves encrypted $family path facts through CLI and stdio MCP", - { timeout: 60_000 }, async (fixture, { cli }) => { const root = await createTestTempDirectory("rea-mobile-encrypted-paths-"); const environment = { HOME: root, USERPROFILE: root }; diff --git a/tests/acceptance/applications/mobileFrameworkConventions.test.ts b/tests/acceptance/applications/mobileFrameworkConventions.test.ts index 4a9242e7a8..3a8d3e3870 100644 --- a/tests/acceptance/applications/mobileFrameworkConventions.test.ts +++ b/tests/acceptance/applications/mobileFrameworkConventions.test.ts @@ -138,5 +138,4 @@ cliTest( } } }, - 30_000, ); diff --git a/tests/acceptance/applications/nativeExportsVersionRequirements.test.ts b/tests/acceptance/applications/nativeExportsVersionRequirements.test.ts index ba3bbea7cc..c733cb0943 100644 --- a/tests/acceptance/applications/nativeExportsVersionRequirements.test.ts +++ b/tests/acceptance/applications/nativeExportsVersionRequirements.test.ts @@ -72,7 +72,6 @@ cliTest( }, ); }, - 30_000, ); cliTest( @@ -113,5 +112,4 @@ cliTest( }, ); }, - 30_000, ); diff --git a/tests/acceptance/applications/nativeExportsViews.test.ts b/tests/acceptance/applications/nativeExportsViews.test.ts index 83b1199410..8adf5b7eaf 100644 --- a/tests/acceptance/applications/nativeExportsViews.test.ts +++ b/tests/acceptance/applications/nativeExportsViews.test.ts @@ -20,7 +20,6 @@ const viewContract = toolContract("inspect_analysis_view"); cliTest.for(["pe", "elf"] as const)( "queries retained %s exports through CLI and actual stdio MCP after the source is deleted", - { timeout: 60_000 }, async (format, { cli }) => { const root = await createTestTempDirectory("rea-export-views-"); const path = join(root, `library.${format}`); diff --git a/tests/acceptance/applications/nativePlistBinaryScalars.test.ts b/tests/acceptance/applications/nativePlistBinaryScalars.test.ts index 0b17b4b893..176437ff78 100644 --- a/tests/acceptance/applications/nativePlistBinaryScalars.test.ts +++ b/tests/acceptance/applications/nativePlistBinaryScalars.test.ts @@ -189,7 +189,6 @@ describe.skipIf(process.platform !== "darwin")( expect(Buffer.compare(await readFile(binaryPath), binaryBytes)).toBe(0); expect(Buffer.compare(await readFile(xmlPath), xmlBytes)).toBe(0); }, - 60_000, ); }, ); diff --git a/tests/acceptance/applications/nativePlistNesting.test.ts b/tests/acceptance/applications/nativePlistNesting.test.ts index 816d481ce7..9ad448625f 100644 --- a/tests/acceptance/applications/nativePlistNesting.test.ts +++ b/tests/acceptance/applications/nativePlistNesting.test.ts @@ -169,7 +169,6 @@ describe.skipIf(process.platform !== "darwin")( ).toBe(false); } }, - 60_000, ); }, ); diff --git a/tests/acceptance/applications/nibFieldIdentity.test.ts b/tests/acceptance/applications/nibFieldIdentity.test.ts index 44c31f5315..b752c65f17 100644 --- a/tests/acceptance/applications/nibFieldIdentity.test.ts +++ b/tests/acceptance/applications/nibFieldIdentity.test.ts @@ -196,5 +196,4 @@ cliTest( ); expect(Buffer.compare(await readFile(path), archive)).toBe(0); }, - 60_000, ); diff --git a/tests/acceptance/applications/peResources.test.ts b/tests/acceptance/applications/peResources.test.ts index c347c7084b..c7120557b5 100644 --- a/tests/acceptance/applications/peResources.test.ts +++ b/tests/acceptance/applications/peResources.test.ts @@ -531,5 +531,4 @@ cliTest( } } }, - 30_000, ); diff --git a/tests/acceptance/applications/pythonPycViews.test.ts b/tests/acceptance/applications/pythonPycViews.test.ts index 788d006ee2..a816ebdb24 100644 --- a/tests/acceptance/applications/pythonPycViews.test.ts +++ b/tests/acceptance/applications/pythonPycViews.test.ts @@ -70,7 +70,6 @@ const assertSparseSelectors = async ( cliTest( "queries same-name pyc objects through CLI/MCP after deleting the source", - { timeout: 60_000 }, async ({ cli }) => { const root = await createTestTempDirectory("rea-pyc-views-"); const path = join(root, "module.pyc"); diff --git a/tests/acceptance/applications/runtime.test.ts b/tests/acceptance/applications/runtime.test.ts index c8dedddf63..a05e667696 100644 --- a/tests/acceptance/applications/runtime.test.ts +++ b/tests/acceptance/applications/runtime.test.ts @@ -145,7 +145,7 @@ describe("production stdio runtime", () => { ); expect(stderr).not.toContain("HOPPER_LOADER_ARGS_JSON"); expect(stderr).not.toContain(fixturePath); - }, 15_000); + }); it.runIf(process.platform === "darwin")( "returns the selected document on macOS through MCP and structured logs", @@ -175,7 +175,6 @@ describe("production stdio runtime", () => { expect(stderr).not.toContain("HOPPER_LOADER_ARGS_JSON"); expect(stderr).not.toContain(fixturePath); }, - 15_000, ); // Use the suite's bounded acceptance deadline, including its coverage allowance. @@ -315,6 +314,5 @@ describe("production stdio saved-database admission", () => { ), ).toBe(false); }, - 15_000, ); }); diff --git a/tests/acceptance/artifactDmgAttachmentRecoveryCli.test.ts b/tests/acceptance/artifactDmgAttachmentRecoveryCli.test.ts index ace76f9e32..19c75f80f9 100644 --- a/tests/acceptance/artifactDmgAttachmentRecoveryCli.test.ts +++ b/tests/acceptance/artifactDmgAttachmentRecoveryCli.test.ts @@ -140,5 +140,4 @@ cliTest.skipIf(process.platform !== "darwin")( }); expect(await attachedImagePaths()).not.toContain(resolvedImage); }, - 60_000, ); diff --git a/tests/acceptance/binaryHardeningCli.test.ts b/tests/acceptance/binaryHardeningCli.test.ts index 643708e121..cca2caa678 100644 --- a/tests/acceptance/binaryHardeningCli.test.ts +++ b/tests/acceptance/binaryHardeningCli.test.ts @@ -83,5 +83,4 @@ cliTest( expect(response.isError).toBe(true); expect(parseMcpToolError(response)).toEqual({ error: rejected.json }); }, - 60_000, ); diff --git a/tests/acceptance/browser/webBundleSchemaCoverageCliMcp.test.ts b/tests/acceptance/browser/webBundleSchemaCoverageCliMcp.test.ts index 3990e8f490..69f4f3596a 100644 --- a/tests/acceptance/browser/webBundleSchemaCoverageCliMcp.test.ts +++ b/tests/acceptance/browser/webBundleSchemaCoverageCliMcp.test.ts @@ -131,5 +131,4 @@ cliTest( await browser.close(); } }, - 120_000, ); diff --git a/tests/acceptance/browserScenarioReferenceDiagnostics.test.ts b/tests/acceptance/browserScenarioReferenceDiagnostics.test.ts index f7af9c2997..ecb2595c84 100644 --- a/tests/acceptance/browserScenarioReferenceDiagnostics.test.ts +++ b/tests/acceptance/browserScenarioReferenceDiagnostics.test.ts @@ -19,7 +19,6 @@ cliTest.for([ ["stdio MCP", "cookie"], ] as const)( "reports undeclared references through %s for a wide %s list", - { timeout: 60_000 }, async ([surface, placement], { cli }) => { const home = await createTestTempDirectory("rea-scenario-reference-"); const input = browserScenarioReferences(placement, 130_000); diff --git a/tests/acceptance/bunPathBudgetCli.test.ts b/tests/acceptance/bunPathBudgetCli.test.ts index c2a69fd4d0..e8ece793ba 100644 --- a/tests/acceptance/bunPathBudgetCli.test.ts +++ b/tests/acceptance/bunPathBudgetCli.test.ts @@ -56,4 +56,4 @@ for (const shared of [false, true]) )?.evidence.normalized_result; expect(graph).toMatchObject({ manifest: { occurrence_count: 1001 } }); } - }, 120_000); + }); diff --git a/tests/acceptance/dotnetBundleJourney.test.ts b/tests/acceptance/dotnetBundleJourney.test.ts index 7a48589d15..c21d16181a 100644 --- a/tests/acceptance/dotnetBundleJourney.test.ts +++ b/tests/acceptance/dotnetBundleJourney.test.ts @@ -219,7 +219,7 @@ for (const format of ["dotnet-bundle", "pyinstaller"] as const) { outputs.map((output) => rm(output, { recursive: true, force: true })), ); } - }, 120_000); + }); } test("reports excessive bundle path depth as a public CLI limit", async ({ diff --git a/tests/acceptance/goBinaryCli.test.ts b/tests/acceptance/goBinaryCli.test.ts index 33d65fe226..cd3800e17e 100644 --- a/tests/acceptance/goBinaryCli.test.ts +++ b/tests/acceptance/goBinaryCli.test.ts @@ -79,7 +79,6 @@ cliTest( } await client.ping(); }, - 60000, ); cliTest( @@ -191,7 +190,6 @@ cliTest( } await client.ping(); }, - 60000, ); cliTest( @@ -250,7 +248,6 @@ cliTest( details: { issues: [{ path: ["evidence_output"] }] }, }); }, - 30000, ); cliTest( @@ -280,7 +277,6 @@ cliTest( expect(parseMcpToolError(response).error).toMatchObject(expected); await client.ping(); }, - 30000, ); cliTest( @@ -307,7 +303,6 @@ cliTest( expect(infos[1]).toEqual(infos[0]); await client.ping(); }, - 30000, ); for (const bits of [32, 64] as const) { @@ -357,7 +352,6 @@ for (const bits of [32, 64] as const) { expect(buildInfos[1]).toEqual(buildInfos[0]); await client.ping(); }, - 30000, ); } } @@ -413,7 +407,6 @@ cliTest( } await client.ping(); }, - 30000, ); for (const expectedErrno of ["ELOOP", "ENAMETOOLONG"] as const) { @@ -717,5 +710,4 @@ cliTest( expectCliMcpEvidenceParity(evidence, mcpReply.structuredContent, path); await client.ping(); }, - 60000, ); diff --git a/tests/acceptance/goBinaryPointerMappingsCli.test.ts b/tests/acceptance/goBinaryPointerMappingsCli.test.ts index cc858ccbe8..bc092902d5 100644 --- a/tests/acceptance/goBinaryPointerMappingsCli.test.ts +++ b/tests/acceptance/goBinaryPointerMappingsCli.test.ts @@ -76,5 +76,4 @@ cliTest( expect(parseMcpToolError(response)).toEqual({ error: rejected.json }); await client.ping(); }, - 60000, ); diff --git a/tests/acceptance/godotPck.test.ts b/tests/acceptance/godotPck.test.ts index 0e69243b97..bb0d56e9f9 100644 --- a/tests/acceptance/godotPck.test.ts +++ b/tests/acceptance/godotPck.test.ts @@ -383,7 +383,6 @@ cliTest( }), ]); }, - 30000, ); cliTest( @@ -424,5 +423,4 @@ cliTest( } } }, - 30000, ); diff --git a/tests/acceptance/harmonyArtifactJourney.test.ts b/tests/acceptance/harmonyArtifactJourney.test.ts index 2b383e292c..571e2cd27c 100644 --- a/tests/acceptance/harmonyArtifactJourney.test.ts +++ b/tests/acceptance/harmonyArtifactJourney.test.ts @@ -234,4 +234,4 @@ test("preserves Harmony archive formats through the public CLI/MCP lifecycle", a } finally { await client.close(); } -}, 120_000); +}); diff --git a/tests/acceptance/il2cppMetadataCli.test.ts b/tests/acceptance/il2cppMetadataCli.test.ts index 595968ad3b..3960d59585 100644 --- a/tests/acceptance/il2cppMetadataCli.test.ts +++ b/tests/acceptance/il2cppMetadataCli.test.ts @@ -109,7 +109,6 @@ cliTest( }); await client.ping(); }, - 30000, ); cliTest( @@ -176,7 +175,6 @@ cliTest( } } }, - 30000, ); cliTest( @@ -238,7 +236,6 @@ cliTest( } } }, - 30000, ); cliTest( @@ -312,7 +309,6 @@ cliTest( expect(Buffer.compare(await readFile(path), fixture.bytes)).toBe(0); } }, - 30000, ); cliTest( @@ -431,7 +427,6 @@ cliTest( } await client.ping(); }, - 30000, ); cliTest( @@ -487,7 +482,6 @@ cliTest( } await client.ping(); }, - 30000, ); cliTest( @@ -562,7 +556,6 @@ cliTest( } await client.ping(); }, - 30000, ); const metadataPageReader = @@ -750,7 +743,7 @@ it("queries compact retained metadata through the real SDK with exact row identi }); expect(parseMcpToolError(invalid).error.code).toBe("invalid_request"); await client.ping(); -}, 30000); +}); it("imports historical metadata Evidence with unavailable member collections without inventing empty results", async () => { const root = await createTestTempDirectory("rea-il2cpp-history-"), @@ -827,7 +820,7 @@ it("imports historical metadata Evidence with unavailable member collections wit view: { kind: "il2cpp-metadata", collection: "parameters" }, }); expect(parseMcpToolError(unavailable).error.code).toBe("invalid_request"); -}, 30000); +}); cliTest( "exports complete metadata Evidence for compact CLI delivery and portable selected reads", @@ -906,7 +899,6 @@ cliTest( parent_evidence_id: evidence.evidence_id, }); }, - 30000, ); cliTest.skipIf(process.platform === "win32")( @@ -950,7 +942,6 @@ cliTest.skipIf(process.platform === "win32")( expect(read.exitCode, read.stderr).toBe(0); expect(read.stdout).toContain(saved.value.records[0]?.evidence_id); }, - 30000, ); cliTest( @@ -1042,7 +1033,6 @@ cliTest( ); await client.ping(); }, - 30000, ); cliTest( @@ -1088,7 +1078,6 @@ cliTest( ).toEqual(report.method_addresses); await client.ping(); }, - 30000, ); cliTest( @@ -1157,7 +1146,6 @@ cliTest( } await client.ping(); }, - 30000, ); cliTest( @@ -1218,7 +1206,6 @@ cliTest( } await client.ping(); }, - 30000, ); cliTest( @@ -1301,7 +1288,6 @@ cliTest( } await client.ping(); }, - 30000, ); cliTest( @@ -1339,7 +1325,6 @@ cliTest( ), ).toBe(true); }, - 30000, ); cliTest( @@ -1653,5 +1638,4 @@ cliTest( ).toEqual(entry.methods); } }, - 60000, ); diff --git a/tests/acceptance/il2cppStructuralExtentsCli.test.ts b/tests/acceptance/il2cppStructuralExtentsCli.test.ts index d2754a2c15..6cbe54c3aa 100644 --- a/tests/acceptance/il2cppStructuralExtentsCli.test.ts +++ b/tests/acceptance/il2cppStructuralExtentsCli.test.ts @@ -57,5 +57,4 @@ cliTest( expect(parseMcpToolError(result).error).toMatchObject(expected); } }, - 30000, ); diff --git a/tests/acceptance/javascriptAsyncChunkBudget.test.ts b/tests/acceptance/javascriptAsyncChunkBudget.test.ts index 4939f7bf9d..59b807b156 100644 --- a/tests/acceptance/javascriptAsyncChunkBudget.test.ts +++ b/tests/acceptance/javascriptAsyncChunkBudget.test.ts @@ -10,7 +10,6 @@ import { cliTest } from "../support/cli/cliFixture.js"; cliTest( "reports the complete-fact ceiling for wide async chunk metadata", - { timeout: 60_000 }, async ({ cli }) => { // This bounded public control exceeds the complete-fact allowance. The // forked boundary regression separately owns call-argument capacity. diff --git a/tests/acceptance/javascriptRoutesCli.test.ts b/tests/acceptance/javascriptRoutesCli.test.ts index 0d5a3ea18b..786ff5253c 100644 --- a/tests/acceptance/javascriptRoutesCli.test.ts +++ b/tests/acceptance/javascriptRoutesCli.test.ts @@ -607,7 +607,6 @@ cliTest( await browser.close(); } }, - 120000, ); it("keeps a large source's partial route facts queryable through SDK delivery", async () => { @@ -662,4 +661,4 @@ it("keeps a large source's partial route facts queryable through SDK delivery", expect( routeViewFromEvidence(unknowns.structuredContent).items.length, ).toBeGreaterThan(0); -}, 60000); +}); diff --git a/tests/acceptance/mcpInputCapacityPcap.test.ts b/tests/acceptance/mcpInputCapacityPcap.test.ts index 4d2bbc1f9e..e97e87a84c 100644 --- a/tests/acceptance/mcpInputCapacityPcap.test.ts +++ b/tests/acceptance/mcpInputCapacityPcap.test.ts @@ -92,5 +92,4 @@ it.skipIf( .digest("hex"), ).toBe(digest); }, - 90_000, ); diff --git a/tests/acceptance/nativeDispatchSnapshot.test.ts b/tests/acceptance/nativeDispatchSnapshot.test.ts index c819ed2ea5..4906a329c8 100644 --- a/tests/acceptance/nativeDispatchSnapshot.test.ts +++ b/tests/acceptance/nativeDispatchSnapshot.test.ts @@ -117,7 +117,6 @@ cliTest.skipIf(process.platform !== "darwin")( expect(Buffer.compare(await readFile(first), Buffer.from(bytes))).toBe(0); expect(Buffer.compare(await readFile(second), Buffer.from(bytes))).toBe(0); }, - 30000, ); cliTest.skipIf(process.platform !== "darwin")( @@ -174,7 +173,6 @@ cliTest.skipIf(process.platform !== "darwin")( expect(Buffer.compare(await readFile(target), bytes)).toBe(0); await client.ping(); }, - 30000, ); cliTest.skipIf(process.platform !== "darwin")( @@ -308,7 +306,6 @@ cliTest.skipIf(process.platform !== "darwin")( expect(Buffer.compare(await readFile(target), Buffer.from(bytes))).toBe(0); await client.ping(); }, - 30000, ); cliTest.skipIf(process.platform !== "darwin")( diff --git a/tests/acceptance/nativeElfArchitecture.test.ts b/tests/acceptance/nativeElfArchitecture.test.ts index 22c91e2ff6..e9fa56b141 100644 --- a/tests/acceptance/nativeElfArchitecture.test.ts +++ b/tests/acceptance/nativeElfArchitecture.test.ts @@ -88,5 +88,4 @@ cliTest( } await client.ping(); }, - 30000, ); diff --git a/tests/acceptance/pcapCredentialErrorsCliMcp.test.ts b/tests/acceptance/pcapCredentialErrorsCliMcp.test.ts index 61123d5477..1d3ea05bc1 100644 --- a/tests/acceptance/pcapCredentialErrorsCliMcp.test.ts +++ b/tests/acceptance/pcapCredentialErrorsCliMcp.test.ts @@ -89,7 +89,6 @@ cliTest.skipIf(missingNative)( .digest("hex"), ).toBe(before); }, - 120_000, ); it.skipIf(missingNative)( @@ -141,5 +140,4 @@ it.skipIf(missingNative)( } } }, - 120_000, ); diff --git a/tests/acceptance/pcapVerifier.test.ts b/tests/acceptance/pcapVerifier.test.ts index d2f739c24b..e6df5f86f8 100644 --- a/tests/acceptance/pcapVerifier.test.ts +++ b/tests/acceptance/pcapVerifier.test.ts @@ -58,5 +58,4 @@ it.skipIf( ); } }, - 120_000, ); diff --git a/tests/acceptance/process/processFinalization.test.ts b/tests/acceptance/process/processFinalization.test.ts index 75abe7f582..f3317d9a89 100644 --- a/tests/acceptance/process/processFinalization.test.ts +++ b/tests/acceptance/process/processFinalization.test.ts @@ -276,7 +276,6 @@ const expectIgnoringFinalization = (outcome: CaptureOutcome): void => { cliCaptureTest.for(["CLI", "MCP"] as const)( "captures a cooperative finalizer through the compiled %s workflow", - { timeout: 20_000 }, async (adapter, { cli }) => { const root = await createTestTempDirectory("rea-finalization-accept-"); const scenario = captureScenario("cooperative", root, { @@ -293,7 +292,6 @@ cliCaptureTest.for(["CLI", "MCP"] as const)( cliCaptureTest.for(["CLI", "MCP"] as const)( "records the non-zero exit code of a finalizer through the compiled %s workflow", - { timeout: 20_000 }, async (adapter, { cli }) => { const root = await createTestTempDirectory("rea-finalization-accept-"); const scenario = captureScenario( @@ -312,7 +310,6 @@ cliCaptureTest.for(["CLI", "MCP"] as const)( cliCaptureTest.for(["CLI", "MCP"] as const)( "forces SIGKILL after the finalization interval through the compiled %s workflow", - { timeout: 20_000 }, async (adapter, { cli }) => { const root = await createTestTempDirectory("rea-finalization-accept-"); const scenario = captureScenario("ignoring", root, { @@ -386,12 +383,10 @@ captureTest( observeProcessStartIdentity(childPid), ).resolves.toBeUndefined(); }, - 20_000, ); cliCaptureTest.for(["CLI", "MCP"] as const)( "keeps the default identity through the compiled %s workflow without finalization_ms", - { timeout: 20_000 }, async (adapter, { cli }) => { const root = await createTestTempDirectory("rea-finalization-default-"); const scenario = captureScenario("ignoring", root, { timeout_ms: 500 }); @@ -583,5 +578,4 @@ captureTest( "MCP cancellation does not wait for the grace interval", ).toBeLessThan(8_000); }, - 20_000, ); diff --git a/tests/acceptance/process/processSensitiveInput.test.ts b/tests/acceptance/process/processSensitiveInput.test.ts index 83f9105054..9825b59c28 100644 --- a/tests/acceptance/process/processSensitiveInput.test.ts +++ b/tests/acceptance/process/processSensitiveInput.test.ts @@ -68,7 +68,6 @@ cliTest.skipIf(CAPTURE_SKIP_REASON)( expect(result.stderr).not.toContain(literal); verify(result.json); }, - 30_000, ); itWithCaptureCapability( diff --git a/tests/acceptance/process/processSignalExit.test.ts b/tests/acceptance/process/processSignalExit.test.ts index 6ea4499395..b51ff99a86 100644 --- a/tests/acceptance/process/processSignalExit.test.ts +++ b/tests/acceptance/process/processSignalExit.test.ts @@ -66,7 +66,6 @@ cliCaptureTest( expect(capture.exit, name).toMatchObject(expected); } }, - 60_000, ); captureTest( @@ -94,5 +93,4 @@ captureTest( reason: "exited", }); }, - 30_000, ); diff --git a/tests/acceptance/providers/hopperStartupRecovery.test.ts b/tests/acceptance/providers/hopperStartupRecovery.test.ts index e9121b54d0..12414d930e 100644 --- a/tests/acceptance/providers/hopperStartupRecovery.test.ts +++ b/tests/acceptance/providers/hopperStartupRecovery.test.ts @@ -61,7 +61,6 @@ const closeWithLateBridge = async ( test.for(["target", "loader"] as const)( "preserves a prepared target or refuses literal-unsafe %s before handoff", - { timeout: 90_000 }, async (source, { workspace, cli }) => { const target = workspace.path( source === "target" ? 'quoted"target' : "loader-target", @@ -244,7 +243,6 @@ test("recovers a denied Hopper launch through the same stdio MCP session and CLI test.for(["handoff", "not-found"] as const)( "preserves an unconfirmed %s handoff and closes only a late bridge with matching run identity", - { timeout: 60_000 }, async (launchMode, { workspace }) => { const target = workspace.path("target"); await copyFile("/usr/bin/true", target); diff --git a/tests/acceptance/releaseExposureCli.test.ts b/tests/acceptance/releaseExposureCli.test.ts index d1c0b821a3..e63469238c 100644 --- a/tests/acceptance/releaseExposureCli.test.ts +++ b/tests/acceptance/releaseExposureCli.test.ts @@ -14,57 +14,44 @@ if (releaseExposureContract === undefined) throw new Error("Missing release exposure contract"); const outputSchema = releaseExposureContract.outputSchema; -cliTest( - "exits 3 when a shipped source map embeds sources", - async ({ cli }) => { - const root = await createTestTempDirectory("rea-release-exposure-cli-"); - await writeFile(join(root, "app.js"), "export const value = 1;\n"); - await writeFile( - join(root, "app.js.map"), - JSON.stringify({ - version: 3, - file: "app.js", - sources: ["app.js"], - names: [], - mappings: "", - sourcesContent: [`export const value = "${PLANTED_SOURCE}";\n`], - }), - ); - const clean = await cli.run({ - arguments: ["audit-release-exposure", root, "--json"], - }); - expect(clean.exitCode, clean.stderr).toBe(0); - const evidence = outputSchema.parse(clean.json); - const report = evidence.normalized_result; - expect( - report.checks.find( - (check) => check.id === "javascript.source_map_sources", - ), - ).toMatchObject({ status: "exposed", severity: "high" }); - expect( - report.checks.find((check) => check.id === "electron.run_as_node") - ?.status, - ).toBe("unknown"); - expect( - report.checks.find((check) => check.id === "native.pdb_path")?.status, - ).toBe("not_applicable"); - expect( - report.checks.find((check) => check.id === "go.build_paths")?.status, - ).toBe("not_applicable"); - expect(JSON.stringify(evidence)).not.toContain(PLANTED_SOURCE); - const gated = await cli.run({ - arguments: [ - "audit-release-exposure", - root, - "--fail_on", - "high", - "--json", - ], - }); - expect(gated.exitCode, gated.stderr).toBe(3); - }, - 60_000, -); +cliTest("exits 3 when a shipped source map embeds sources", async ({ cli }) => { + const root = await createTestTempDirectory("rea-release-exposure-cli-"); + await writeFile(join(root, "app.js"), "export const value = 1;\n"); + await writeFile( + join(root, "app.js.map"), + JSON.stringify({ + version: 3, + file: "app.js", + sources: ["app.js"], + names: [], + mappings: "", + sourcesContent: [`export const value = "${PLANTED_SOURCE}";\n`], + }), + ); + const clean = await cli.run({ + arguments: ["audit-release-exposure", root, "--json"], + }); + expect(clean.exitCode, clean.stderr).toBe(0); + const evidence = outputSchema.parse(clean.json); + const report = evidence.normalized_result; + expect( + report.checks.find((check) => check.id === "javascript.source_map_sources"), + ).toMatchObject({ status: "exposed", severity: "high" }); + expect( + report.checks.find((check) => check.id === "electron.run_as_node")?.status, + ).toBe("unknown"); + expect( + report.checks.find((check) => check.id === "native.pdb_path")?.status, + ).toBe("not_applicable"); + expect( + report.checks.find((check) => check.id === "go.build_paths")?.status, + ).toBe("not_applicable"); + expect(JSON.stringify(evidence)).not.toContain(PLANTED_SOURCE); + const gated = await cli.run({ + arguments: ["audit-release-exposure", root, "--fail_on", "high", "--json"], + }); + expect(gated.exitCode, gated.stderr).toBe(3); +}); cliTest( "gates a marker in a text file outside the extension list", @@ -98,7 +85,6 @@ cliTest( ], }); }, - 60_000, ); cliTest( @@ -120,5 +106,4 @@ cliTest( expect(report.summary.no_exposure_observed_in_assessed_checks).toBe(true); expect(report.summary.by_status.not_assessed).toBe(3); }, - 60_000, ); diff --git a/tests/acceptance/rustBinaryCli.test.ts b/tests/acceptance/rustBinaryCli.test.ts index a81e6cc818..0be0aa41fb 100644 --- a/tests/acceptance/rustBinaryCli.test.ts +++ b/tests/acceptance/rustBinaryCli.test.ts @@ -74,7 +74,6 @@ cliTest( } await client.ping(); }, - 30000, ); cliTest( @@ -240,7 +239,6 @@ cliTest( } await client.ping(); }, - 30000, ); cliTest("returns null metadata when .dep-v0 is absent", async ({ cli }) => { @@ -427,7 +425,6 @@ cliTest( }); await client.ping(); }, - 30000, ); cliTest( @@ -485,7 +482,6 @@ cliTest( expectCliMcpEvidenceParity(evidence, response.structuredContent, path); await client.ping(); }, - 30000, ); cliTest( @@ -532,7 +528,6 @@ cliTest( expect(parseMcpToolError(response).error).toMatchObject(expectedFailure); await client.ping(); }, - 30000, ); cliTest( @@ -689,7 +684,6 @@ cliTest( } await client.ping(); }, - 30000, ); cliTest( diff --git a/tests/acceptance/rustDependencyViews.test.ts b/tests/acceptance/rustDependencyViews.test.ts index c7802653ec..612d5d2aff 100644 --- a/tests/acceptance/rustDependencyViews.test.ts +++ b/tests/acceptance/rustDependencyViews.test.ts @@ -309,7 +309,6 @@ cliTest( ).toMatchObject({ code: "invalid_request" }); } }, - 60000, ); cliTest( @@ -451,5 +450,4 @@ cliTest( } expect((await readFile(path)).length).toBeGreaterThan(0); }, - 30000, ); diff --git a/tests/acceptance/setup/qwenProfileSetup.test.ts b/tests/acceptance/setup/qwenProfileSetup.test.ts index c14c915131..17855e78dc 100644 --- a/tests/acceptance/setup/qwenProfileSetup.test.ts +++ b/tests/acceptance/setup/qwenProfileSetup.test.ts @@ -86,5 +86,4 @@ cliTest( code: "ENOENT", }); }, - 120_000, ); diff --git a/tests/acceptance/setup/registrationRuntimeEnvironmentCli.test.ts b/tests/acceptance/setup/registrationRuntimeEnvironmentCli.test.ts index 25de44f969..e9f2a777a0 100644 --- a/tests/acceptance/setup/registrationRuntimeEnvironmentCli.test.ts +++ b/tests/acceptance/setup/registrationRuntimeEnvironmentCli.test.ts @@ -139,7 +139,6 @@ cliTest( }); expect(await readFile(config, "utf8")).toBe(updatedConfiguration); }, - 120_000, ); cliTest( @@ -767,7 +766,6 @@ cliTest( }, }); }, - 120_000, ); for (const [client, provider] of [ @@ -903,7 +901,6 @@ for (const [client, provider] of [ }); } }, - 120_000, ); for (const invalidSetting of [ @@ -955,7 +952,6 @@ for (const invalidSetting of [ code: "ENOENT", }); }, - 120_000, ); cliTest( @@ -1018,5 +1014,4 @@ cliTest( code: "ENOENT", }); }, - 120_000, ); diff --git a/tests/acceptance/tools/historicalCaptureResources.test.ts b/tests/acceptance/tools/historicalCaptureResources.test.ts index b38bafca93..2b4adf2814 100644 --- a/tests/acceptance/tools/historicalCaptureResources.test.ts +++ b/tests/acceptance/tools/historicalCaptureResources.test.ts @@ -194,5 +194,4 @@ it.skipIf( error: { code: "invalid_request" }, }); }, - 60_000, ); diff --git a/tests/acceptance/tools/inspectorFileUrlIdentity.test.ts b/tests/acceptance/tools/inspectorFileUrlIdentity.test.ts index a465ce02b8..619866d86e 100644 --- a/tests/acceptance/tools/inspectorFileUrlIdentity.test.ts +++ b/tests/acceptance/tools/inspectorFileUrlIdentity.test.ts @@ -131,4 +131,4 @@ it("preserves file URL scheme spelling and script identity after real Inspector expect(original.predicate_type).toBe(first.predicate_type); expect(original.normalized_result).toEqual(first.normalized_result); expect(await readFile(source, "utf8")).toBe(sourceText); -}, 30_000); +}); diff --git a/tests/acceptance/tools/inspectorLifecycle.test.ts b/tests/acceptance/tools/inspectorLifecycle.test.ts index 02aa53cf14..cebeef7db7 100644 --- a/tests/acceptance/tools/inspectorLifecycle.test.ts +++ b/tests/acceptance/tools/inspectorLifecycle.test.ts @@ -122,4 +122,4 @@ it("observes a real Node Inspector and releases attachments after cancellation a details: { reason: "endpoint_unreachable" }, }, }); -}, 30_000); +}); diff --git a/tests/acceptance/tools/localToolContracts.test.ts b/tests/acceptance/tools/localToolContracts.test.ts index 2b4b29446e..2eec0250cf 100644 --- a/tests/acceptance/tools/localToolContracts.test.ts +++ b/tests/acceptance/tools/localToolContracts.test.ts @@ -413,7 +413,7 @@ it("rejects OS-invalid local inputs through the real advertised MCP contracts", ], }, }); -}, 60_000); +}); const ignoredOptions = [ { terminal: { columns: 80, row: 12 } }, @@ -583,9 +583,6 @@ captureTest( }, }); }, - // 22 malformed requests plus two filesystem errors each start a fresh CLI. - // Cache compilation, but allow for startup at the bounded fanout of two. - 120_000, ); captureTest.each(["untruncated", "truncated"] as const)( diff --git a/tests/acceptance/tools/nativeFunctionMatching.test.ts b/tests/acceptance/tools/nativeFunctionMatching.test.ts index 50bab5153b..bdbdb61caf 100644 --- a/tests/acceptance/tools/nativeFunctionMatching.test.ts +++ b/tests/acceptance/tools/nativeFunctionMatching.test.ts @@ -240,7 +240,6 @@ const verifyPortableCli = async ( cliTest.for([{ profile: "full" }, { profile: "compact" }] as const)( "shared public CLI/MCP matching retains sources, pages exact facts, and feeds selected dossier pairs directly to compare_functions ($profile)", - { timeout: 60000 }, async ({ profile }, { cli }) => { const fixture = await createMatchingFixture(); const { left, right, leftDetails, rightDetails, importedPath } = fixture; @@ -484,7 +483,6 @@ cliTest( retainedBefore.structuredContent, ); }, - 60000, ); cliTest( @@ -657,7 +655,6 @@ cliTest( code: "evidence_integrity_mismatch", }); }, - 60000, ); cliTest( @@ -693,12 +690,10 @@ cliTest( before.structuredContent, ); }, - 60000, ); cliTest.for([{ profile: "full" }, { profile: "compact" }] as const)( "ties byte qualifications to selected observations through paged and offline MCP ($profile)", - { timeout: 60000 }, async ({ profile }) => { const left = nativeMatchingInventory("1", [ { address: "0x10", value: "left" }, @@ -831,7 +826,6 @@ cliTest.for([{ profile: "full" }, { profile: "compact" }] as const)( cliTest( "bounds byte-source pages and recovers an oversized source", - { timeout: 60000 }, async () => { const left = nativeMatchingInventory("1", [ { address: "0x10", value: "left" }, @@ -940,7 +934,6 @@ cliTest( cliTest( "oversized inline matching Evidence points back to the caller's original record", - { timeout: 60000 }, async () => { const left = nativeMatchingInventory("1", [ { address: "0x10", value: "left" }, diff --git a/tests/acceptance/tools/qlogCapture.test.ts b/tests/acceptance/tools/qlogCapture.test.ts index 9f9d17286b..4bda480872 100644 --- a/tests/acceptance/tools/qlogCapture.test.ts +++ b/tests/acceptance/tools/qlogCapture.test.ts @@ -306,7 +306,7 @@ it("pages original trace-scoped facts after source deletion without conflating s }), ), ).toMatchObject({ error: { code: "invalid_request" } }); -}, 60_000); +}); runtimeTest.runIf(!hasMemoryBound && runtimeSupported)( "refuses qlog when this runtime cannot enforce a decoder memory bound", @@ -417,7 +417,7 @@ it("runs built CLI and real stdio SDK with exact evidence parity, selection, ret error: { code: "invalid_request" }, }); expect(JSON.stringify(invalid)).not.toContain("mysecret"); -}, 60_000); +}); it("fails whole-capture validation before selection and survives malformed, unsupported and oversized qlog", async () => { const root = await createTestTempDirectory("rea-qlog-errors-"); @@ -524,7 +524,7 @@ it("fails whole-capture validation before selection and survives malformed, unsu await writeFile(path, qlog([event])); await client.ping(); await expectRecoveredCapture(call, path); -}, 60_000); +}); runtimeTest.skipIf( process.versions.bun !== undefined || !hasMemoryBound || !runtimeSupported, @@ -566,5 +566,4 @@ runtimeTest.skipIf( await client.ping(); await expectRecoveredCapture(call, path); }, - 60_000, ); diff --git a/tests/acceptance/webArtifactAcquisitionCli.test.ts b/tests/acceptance/webArtifactAcquisitionCli.test.ts index 8a4d2e51bd..b161dd71d7 100644 --- a/tests/acceptance/webArtifactAcquisitionCli.test.ts +++ b/tests/acceptance/webArtifactAcquisitionCli.test.ts @@ -81,5 +81,4 @@ cliTest( expect(response.structuredContent).toBeUndefined(); expect(result.json).not.toHaveProperty("normalized_result"); }, - 90_000, ); diff --git a/tests/acceptance/webArtifactErrorProvenance.test.ts b/tests/acceptance/webArtifactErrorProvenance.test.ts index 34b47097cf..f077ee279c 100644 --- a/tests/acceptance/webArtifactErrorProvenance.test.ts +++ b/tests/acceptance/webArtifactErrorProvenance.test.ts @@ -165,7 +165,6 @@ cliTest( }); } }, - 120_000, ); cliTest( @@ -230,5 +229,4 @@ cliTest( }); } }, - 120_000, ); diff --git a/tests/acceptance/webSourceLocationCli.test.ts b/tests/acceptance/webSourceLocationCli.test.ts index cc85f089db..fe31f7bb94 100644 --- a/tests/acceptance/webSourceLocationCli.test.ts +++ b/tests/acceptance/webSourceLocationCli.test.ts @@ -176,6 +176,8 @@ const expectColumnOutOfRange = ( cliTest( "accepts numeric UTF-16 coordinates and runs the actual owned source-map codec without a browser", + // Allow cold CLI and MCP ownership preparation across the full parity sequence. + { tags: ["long-running"] }, async ({ cli }) => { const root = await createTestTempDirectory("rea-source-map-cli-"); const fixture = webSourceLocationFixture( @@ -324,12 +326,11 @@ cliTest( fixture.sourceMap.text, ); }, - // Allow cold CLI and MCP ownership preparation across the full parity sequence. - 180_000, ); cliTest( "applies the shared version constraint to nested indexed maps through CLI and stdio MCP", + { tags: ["long-running"] }, async ({ cli }) => { const root = await createTestTempDirectory("rea-indexed-map-version-"); const fixture = webSourceLocationFixture(); @@ -438,11 +439,11 @@ cliTest( } } }, - 180_000, ); cliTest( "traces empty equal-offset sections while rejecting decreasing offsets and represented overlaps", + { tags: ["long-running"] }, async ({ cli }) => { const root = await createTestTempDirectory("rea-empty-indexed-map-"); const fixture = webSourceLocationFixture(); @@ -538,11 +539,11 @@ cliTest( } } }, - 180_000, ); cliTest( "resolves empty-sourceRoot sources against the map URL through CLI and stdio MCP", + { tags: ["long-running"] }, async ({ cli }) => { const root = await createTestTempDirectory("rea-empty-source-root-"); // webpack 5 and tsc emit `"sourceRoot": ""` for map-relative sources. @@ -613,7 +614,6 @@ cliTest( expect(response.isError, JSON.stringify(response)).not.toBe(true); expect(response.structuredContent).toEqual(result.json); }, - 180_000, ); cliTest( @@ -690,6 +690,7 @@ cliTest( cliTest( "admits a complete map above 4 MiB by default while honoring a smaller caller budget", + { tags: ["long-running"] }, async ({ cli }) => { const root = await createTestTempDirectory("rea-map-default-admission-"); const fixture = webSourceLocationFixture( @@ -840,5 +841,4 @@ cliTest( }, }); }, - 180_000, ); diff --git a/tests/boundary/binaryDiagnostics/recordedCrashProvider.test.ts b/tests/boundary/binaryDiagnostics/recordedCrashProvider.test.ts index b39b3a6eed..e872c15ebf 100644 --- a/tests/boundary/binaryDiagnostics/recordedCrashProvider.test.ts +++ b/tests/boundary/binaryDiagnostics/recordedCrashProvider.test.ts @@ -550,7 +550,6 @@ it.runIf(host)( expect(projected.remediation.action).toContain("above 1500"); expect(projected.remediation.action).not.toContain("above 30000"); }, - 10_000, ); const fixture = async ( diff --git a/tests/boundary/browser/cdpObservationWindowScope.test.ts b/tests/boundary/browser/cdpObservationWindowScope.test.ts index 66afde5c16..fb51f0dc17 100644 --- a/tests/boundary/browser/cdpObservationWindowScope.test.ts +++ b/tests/boundary/browser/cdpObservationWindowScope.test.ts @@ -409,7 +409,7 @@ it("ends an armed observation at a fatal protocol failure without waiting out it ok: false, error: { _tag: "BrowserObservationError", reason: "protocol_error" }, }); -}, 15_000); +}); it("does not join an empty document request identity to a later loading failure", async () => { const { observation } = await observeDuringClockSampling( diff --git a/tests/boundary/browser/historicalCaptureDecoder.test.ts b/tests/boundary/browser/historicalCaptureDecoder.test.ts index 7d75687955..947c3609f1 100644 --- a/tests/boundary/browser/historicalCaptureDecoder.test.ts +++ b/tests/boundary/browser/historicalCaptureDecoder.test.ts @@ -392,7 +392,6 @@ it.each(["cancelled", "process"] as const)( outcome === "cancelled" ? "cancelled" : "execution_failure", ); }, - 15000, ); it("applies a non-default capture deadline and releases its runtime", async () => { @@ -435,7 +434,7 @@ it("applies a non-default capture deadline and releases its runtime", async () = expect(result.error.userMessage).toContain("capture_timeout_ms"); if (runtimePath === undefined) throw new Error("runtime was not acquired"); await expect(access(runtimePath)).rejects.toMatchObject({ code: "ENOENT" }); -}, 8_000); +}); it.each([true, false])( "binds decoder replies to the complete selected provider identity (matching name: %s)", diff --git a/tests/boundary/browser/historicalWebCapture.test.ts b/tests/boundary/browser/historicalWebCapture.test.ts index 538438a051..ded321ecf1 100644 --- a/tests/boundary/browser/historicalWebCapture.test.ts +++ b/tests/boundary/browser/historicalWebCapture.test.ts @@ -283,7 +283,7 @@ it("excludes declared binary lengths through CLI, MCP and retained capture pages }); } } -}, 60_000); +}); it("reads actual upstream HAR packages in an owned process and retains selected producer order", async () => { const root = await mkdtemp(join(tmpdir(), "rea-history-har-")); diff --git a/tests/boundary/browser/sazWebCapture.test.ts b/tests/boundary/browser/sazWebCapture.test.ts index 9a90cfd38a..4ebe004e19 100644 --- a/tests/boundary/browser/sazWebCapture.test.ts +++ b/tests/boundary/browser/sazWebCapture.test.ts @@ -539,7 +539,7 @@ it("inspects native SAZ through the public CLI and MCP with equal evidence, byte expect( records.find((record) => record.evidence_id === fromMcp.evidence_id), ).toEqual(fromMcp); -}, 60_000); +}); it("pages retained SAZ Evidence through public MCP and portable CLI after source deletion", async () => { const path = await fixture(await archive()); @@ -624,7 +624,7 @@ it("pages retained SAZ Evidence through public MCP and portable CLI after source expect( parseEvidence(JSON.parse(standalone.stdout)).normalized_result, ).toEqual(summary.normalized_result); -}, 60_000); +}); it("keeps CRLF separators inside a body after LF-only HTTP headers", async () => { const body = Buffer.from("\ufefffirst\r\n\r\nsecond\n\nthird"); diff --git a/tests/boundary/browser/webSourceMapFetcher.test.ts b/tests/boundary/browser/webSourceMapFetcher.test.ts index 2cf8991d7d..b6413bc39e 100644 --- a/tests/boundary/browser/webSourceMapFetcher.test.ts +++ b/tests/boundary/browser/webSourceMapFetcher.test.ts @@ -970,7 +970,7 @@ describe("selected source-map fetch deadline", () => { ); }); } - }, 3_000); + }); }); describe("browser map decoded validation", () => { @@ -1802,7 +1802,7 @@ describe("source-map set output admission", () => { expect(Buffer.byteLength(JSON.stringify(result))).toBeLessThanOrEqual( outputLimitBytes, ); - }, 120_000); + }); it("reserves large failure contexts and reports unprocessed requests as unknown", async () => { const largeDeclaredUrl = `${origin}/${"u".repeat(8 * 1_024 * 1_024)}`; @@ -1901,7 +1901,7 @@ describe("expanded source-map evidence budget", () => { "included", ]); expect(result.items[2]?.artifact?.text).toBe(valid); - }, 15_000); + }); it("bounds expanded evidence across individually valid maps", async () => { const expanded = JSON.stringify({ diff --git a/tests/boundary/cli/accessibilityCaptureComparison.test.ts b/tests/boundary/cli/accessibilityCaptureComparison.test.ts index 5d136db29c..99c4225bc3 100644 --- a/tests/boundary/cli/accessibilityCaptureComparison.test.ts +++ b/tests/boundary/cli/accessibilityCaptureComparison.test.ts @@ -101,7 +101,6 @@ cliTest.for([ "policy_filtered", ] as const)( "does not infer an accessibility change from a %s tree", - { timeout: 60_000 }, async (coverage, { cli }) => { const before = accessibleCapture(); const after = structuredClone(before); @@ -158,7 +157,6 @@ cliTest.for([ ["known roles differ", "button", "link", "changed"], ] as const)( "does not infer role equality or change when %s", - { timeout: 60_000 }, async ([_label, beforeRole, afterRole, status], { cli }) => { const before = accessibleCapture(); const after = structuredClone(before); @@ -218,7 +216,6 @@ cliTest( }, }); }, - 60_000, ); cliTest( diff --git a/tests/boundary/cli/appleBundleDirectoryCli.test.ts b/tests/boundary/cli/appleBundleDirectoryCli.test.ts index ef330fa5bd..bd24f82317 100644 --- a/tests/boundary/cli/appleBundleDirectoryCli.test.ts +++ b/tests/boundary/cli/appleBundleDirectoryCli.test.ts @@ -97,7 +97,6 @@ cliTest.for([ cliTest( "Apple CLI and MCP read a flattened framework's Resources/Info.plist", - { timeout: 60_000 }, async ({ cli }) => { const root = await createTestTempDirectory("rea-apple-flat-framework-"); const app = join(root, "Fixture.app"); diff --git a/tests/boundary/cli/artifactComparisonSources.test.ts b/tests/boundary/cli/artifactComparisonSources.test.ts index 35c6e40fb7..fdfc33b756 100644 --- a/tests/boundary/cli/artifactComparisonSources.test.ts +++ b/tests/boundary/cli/artifactComparisonSources.test.ts @@ -60,7 +60,6 @@ const inspectedPair = async ( cliTest.for(["full", "compact"] as const)( "gives one comparison for retained, inline, file and mixed sources through MCP and the CLI (%s)", - { timeout: 60_000 }, async (profile, { cli }) => { const { root, one, call, client, inspect, left, right } = await inspectedPair("rea-artifact-sources-", profile); diff --git a/tests/boundary/cli/browserCli.test.ts b/tests/boundary/cli/browserCli.test.ts index 99ee7c2e53..9f374ee60b 100644 --- a/tests/boundary/cli/browserCli.test.ts +++ b/tests/boundary/cli/browserCli.test.ts @@ -12,7 +12,6 @@ import { } from "../../fixtures/fakeCdpBrowser.js"; const browsers: FakeCdpBrowser[] = []; -const INTEGRATION_TEST_TIMEOUT_MS = 60_000; const partialScriptEvents: FakeOptions["commandEvents"] = ( { method }, @@ -118,7 +117,6 @@ cliTest( }); } }, - INTEGRATION_TEST_TIMEOUT_MS, ); cliTest( @@ -208,7 +206,6 @@ cliTest( }); await assertScenarioComparisonPolicy(cli); }, - INTEGRATION_TEST_TIMEOUT_MS, ); cliTest( @@ -295,7 +292,6 @@ cliTest( }, }); }, - INTEGRATION_TEST_TIMEOUT_MS, ); cliTest( @@ -349,7 +345,6 @@ cliTest( }); expect(JSON.stringify(refused)).not.toContain("not-this-browser"); }, - INTEGRATION_TEST_TIMEOUT_MS, ); describe("scenario comparison CLI diagnostics", () => { @@ -721,7 +716,6 @@ describe("browser CLI capture parity", () => { normalized_result: { status: "identical", changed_pixels: 0 }, }); }, - INTEGRATION_TEST_TIMEOUT_MS, ); }); @@ -1003,7 +997,6 @@ cliTest( normalized_result: { overall_status: "changed" }, }); }, - INTEGRATION_TEST_TIMEOUT_MS, ); const scenarioCaptureWithConsole = ( diff --git a/tests/boundary/cli/browserCompareJsonFiles.test.ts b/tests/boundary/cli/browserCompareJsonFiles.test.ts index 96ee1f5cde..e64e9564ed 100644 --- a/tests/boundary/cli/browserCompareJsonFiles.test.ts +++ b/tests/boundary/cli/browserCompareJsonFiles.test.ts @@ -9,7 +9,6 @@ import { createWebScreenshotArtifact } from "../../../src/domain/webScreenshot.j import { cliTest, type TestCli } from "../../support/cli/cliFixture.js"; import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js"; -const INTEGRATION_TEST_TIMEOUT_MS = 60_000; // Linux limits one argument to 128 KiB and macOS all arguments to 1 MiB. const COMMAND_LINE_LIMIT_BYTES = 1024 * 1024; @@ -66,7 +65,6 @@ describe("browser comparison JSON file inputs", () => { normalized_result: { status: "identical", changed_pixels: 0 }, }); }, - INTEGRATION_TEST_TIMEOUT_MS, ); cliTest( @@ -102,7 +100,6 @@ describe("browser comparison JSON file inputs", () => { }, }); }, - INTEGRATION_TEST_TIMEOUT_MS, ); cliTest( @@ -110,7 +107,6 @@ describe("browser comparison JSON file inputs", () => { async ({ cli }) => { await assertPngInputErrorProjections(cli); }, - INTEGRATION_TEST_TIMEOUT_MS, ); cliTest( @@ -140,7 +136,6 @@ describe("browser comparison JSON file inputs", () => { input_reason: "read-failed", }); }, - INTEGRATION_TEST_TIMEOUT_MS, ); }); diff --git a/tests/boundary/cli/browserWorkerOwnershipCli.test.ts b/tests/boundary/cli/browserWorkerOwnershipCli.test.ts index c5e338a093..32d4531270 100644 --- a/tests/boundary/cli/browserWorkerOwnershipCli.test.ts +++ b/tests/boundary/cli/browserWorkerOwnershipCli.test.ts @@ -127,7 +127,6 @@ cliTest( ), ).toBe(true); }, - 20_000, ); cliTest( @@ -205,5 +204,4 @@ cliTest( ), ).toBe(true); }, - 20_000, ); diff --git a/tests/boundary/cli/bundleComparisonCli.test.ts b/tests/boundary/cli/bundleComparisonCli.test.ts index d09f466eff..72dfa6cf80 100644 --- a/tests/boundary/cli/bundleComparisonCli.test.ts +++ b/tests/boundary/cli/bundleComparisonCli.test.ts @@ -265,5 +265,4 @@ cliTest( changes: [], }); }, - 60_000, ); diff --git a/tests/boundary/cli/callerPathSymlinkParentCli.test.ts b/tests/boundary/cli/callerPathSymlinkParentCli.test.ts index a7d4ef2ca0..0e4a7ba36f 100644 --- a/tests/boundary/cli/callerPathSymlinkParentCli.test.ts +++ b/tests/boundary/cli/callerPathSymlinkParentCli.test.ts @@ -46,7 +46,6 @@ describe.skipIf(process.platform === "win32")( ); } }, - 30_000, ); cliTest( @@ -84,7 +83,6 @@ describe.skipIf(process.platform === "win32")( expect(evidence.subject?.digest.sha256, path).toBe(selectedDigest); } }, - 30_000, ); }, ); diff --git a/tests/boundary/cli/cliOutput.test.ts b/tests/boundary/cli/cliOutput.test.ts index 6b3c970009..e755711b1e 100644 --- a/tests/boundary/cli/cliOutput.test.ts +++ b/tests/boundary/cli/cliOutput.test.ts @@ -19,8 +19,6 @@ import { parseCliOutputArguments, } from "../../../src/cliOutput.js"; -const CLI_INTEGRATION_TIMEOUT_MS = 60_000; - describe("CLI output argument boundary", () => { it("requires an exact row selector and explicit columns for delimited formats", () => { expect( @@ -302,7 +300,6 @@ describe("CLI output flag value forms", () => { expect(result.stderr).toBe(""); } }, - CLI_INTEGRATION_TIMEOUT_MS, ); it("splits only the equals forms of valued output flags", () => { @@ -413,7 +410,6 @@ describe("unclosed CLI output filter slices", () => { error: { code: "INVALID_OUTPUT_FILTER" }, }); }, - CLI_INTEGRATION_TIMEOUT_MS, ); workspaceCliTest( @@ -434,7 +430,6 @@ describe("unclosed CLI output filter slices", () => { open: false, }); }, - CLI_INTEGRATION_TIMEOUT_MS, ); }); @@ -455,7 +450,6 @@ describe("CLI output valued-flag parsing", () => { }); } }, - CLI_INTEGRATION_TIMEOUT_MS, ); workspaceCliTest( @@ -470,7 +464,6 @@ describe("CLI output valued-flag parsing", () => { error: { code: "UNSUPPORTED_OUTPUT_COMBINATION" }, }); }, - CLI_INTEGRATION_TIMEOUT_MS, ); workspaceCliTest( @@ -558,7 +551,6 @@ describe("CLI output valued-flag parsing", () => { expect(result.stdout).not.toContain("[truncated:"); } }, - CLI_INTEGRATION_TIMEOUT_MS, ); }); @@ -644,7 +636,6 @@ describe("compiled CLI output boundary", () => { }, }); }, - CLI_INTEGRATION_TIMEOUT_MS, ); workspaceCliTest( @@ -679,7 +670,6 @@ describe("compiled CLI output boundary", () => { expect(result.stdout).toContain("expected string"); } }, - CLI_INTEGRATION_TIMEOUT_MS, ); workspaceCliTest( @@ -710,7 +700,6 @@ describe("compiled CLI output boundary", () => { }, }); }, - CLI_INTEGRATION_TIMEOUT_MS, ); workspaceCliTest( @@ -735,7 +724,6 @@ describe("compiled CLI output boundary", () => { ); expect(result.stdout).toContain("See below for usage."); }, - CLI_INTEGRATION_TIMEOUT_MS, ); }); @@ -766,7 +754,6 @@ describe("compiled CLI artifact diagnostics", () => { }, }); }, - CLI_INTEGRATION_TIMEOUT_MS, ); }); @@ -1061,6 +1048,5 @@ describe("unknown MCP subcommand output", () => { expect(toon.exitCode).toBe(1); expect(toon.stdout).toMatch(/^code: COMMAND_NOT_FOUND\n/u); }, - CLI_INTEGRATION_TIMEOUT_MS, ); }); diff --git a/tests/boundary/cli/debuggerOneShotExit.test.ts b/tests/boundary/cli/debuggerOneShotExit.test.ts index 44d38848ab..4daf27251d 100644 --- a/tests/boundary/cli/debuggerOneShotExit.test.ts +++ b/tests/boundary/cli/debuggerOneShotExit.test.ts @@ -143,7 +143,6 @@ type DebuggerName = keyof typeof debuggers; type FakeMode = "clean" | "malformed" | "unanswered"; const EXIT_DEADLINE_MS = 20_000; -const TEST_DEADLINE_MS = 2 * EXIT_DEADLINE_MS; const isAlive = (pid: number): boolean => { try { @@ -291,7 +290,6 @@ describe.skipIf(process.platform === "win32")( ["gdb", "unanswered"], ] as const)( "ends one-shot %s with a retained debugger whose cleanup is %s", - { timeout: TEST_DEADLINE_MS }, async ([name, mode], { processes, cliCompileCache }) => { const tty = await rizinTestInferiorTty(); const launch = await prepareLaunch(name, mode, cliCompileCache); @@ -317,7 +315,6 @@ describe.skipIf(process.platform === "win32")( cliTest.for(["rizin", "gdb"] as const)( "keeps a one-shot %s success and its exit status when cleanup is confirmed", - { timeout: TEST_DEADLINE_MS }, async (name, { processes, cliCompileCache }) => { const tty = await rizinTestInferiorTty(); const launch = await prepareLaunch(name, "clean", cliCompileCache); @@ -343,7 +340,6 @@ describe.skipIf(process.platform === "win32")( cliTest.for(["rizin", "gdb"] as const)( "ends one-shot %s with its signal status when interrupted during final cleanup", - { timeout: TEST_DEADLINE_MS }, async (name, { processes, cliCompileCache }) => { const tty = await rizinTestInferiorTty(); const launch = await prepareLaunch(name, "unanswered", cliCompileCache); @@ -385,7 +381,6 @@ describe.skipIf(process.platform === "win32")( ["rizin", "SIGTERM"], ] as const)( "ends the stdio MCP server holding a retained %s session on %s and names it", - { timeout: TEST_DEADLINE_MS }, async ([name, trigger], { processes, cliCompileCache }) => { const tty = await rizinTestInferiorTty(); const launch = await prepareLaunch(name, "malformed", cliCompileCache); diff --git a/tests/boundary/cli/desktopBuildHost.test.ts b/tests/boundary/cli/desktopBuildHost.test.ts index 22c1494b92..8a6539295c 100644 --- a/tests/boundary/cli/desktopBuildHost.test.ts +++ b/tests/boundary/cli/desktopBuildHost.test.ts @@ -51,7 +51,6 @@ const buildHost = async (launcher = "/opt/rea/scripts/rea.mjs") => { cliTest.skipIf(!["darwin", "linux"].includes(process.platform))( "doctor checks the selected client's runner even when it is not on PATH", - { timeout: 60_000 }, async ({ cli }) => { const { environment, home } = await buildHost(); const bin = join(home, "..", "bin"); @@ -116,7 +115,6 @@ cliTest.skipIf(!["darwin", "linux"].includes(process.platform))( cliTest.skipIf(!["darwin", "linux"].includes(process.platform))( "doctor accepts client paths matching resolved build defaults", - { timeout: 60_000 }, async ({ cli }) => { const { environment, home } = await buildHost(); const bin = join(home, "..", "bin"); @@ -169,7 +167,6 @@ cliTest.skipIf(!["darwin", "linux"].includes(process.platform))( cliTest.skipIf(!["darwin", "linux"].includes(process.platform))( "doctor checks a desktop build host and names settings without their values", - { timeout: 60_000 }, async ({ cli }) => { const { environment } = await buildHost(); @@ -231,7 +228,6 @@ cliTest.skipIf(!["darwin", "linux"].includes(process.platform))( cliTest.skipIf(!["darwin", "linux"].includes(process.platform))( "setup plans the runtime archive and the build settings for a client", - { timeout: 60_000 }, async ({ cli }) => { const { environment } = await buildHost(resolve("scripts/rea.mjs")); diff --git a/tests/boundary/cli/developmentTests.test.ts b/tests/boundary/cli/developmentTests.test.ts index f0f8537478..2088c552f9 100644 --- a/tests/boundary/cli/developmentTests.test.ts +++ b/tests/boundary/cli/developmentTests.test.ts @@ -434,7 +434,6 @@ describe("development test runner cancellation", () => { await closed; } }, - 20_000, ); }); @@ -510,7 +509,7 @@ describe("development test runner public CLI", () => { expect(changed.stdout).toContain("1 passed"); const focused = await testCommand(root, "focused", "src/value.test.ts"); expect(focused.stdout).toContain("1 passed"); - }, 60_000); + }); it("reports a missing comparison base and rejects missing or compiled-boundary paths", async () => { const root = await fixture(); diff --git a/tests/boundary/cli/doctorRegistrationEnvironment.test.ts b/tests/boundary/cli/doctorRegistrationEnvironment.test.ts index 888c6e186d..7775a84dcc 100644 --- a/tests/boundary/cli/doctorRegistrationEnvironment.test.ts +++ b/tests/boundary/cli/doctorRegistrationEnvironment.test.ts @@ -97,7 +97,6 @@ const CHECK = "registration_environment:claude_code"; cliTest.skipIf(!["darwin", "linux"].includes(process.platform))( "doctor does not let a configured terminal stand in for an unconfigured registration", - { timeout: 120_000 }, async ({ cli }) => { const root = await createTestTempDirectory("rea-doctor-registration-env-"); const home = join(root, "home"); diff --git a/tests/boundary/cli/electronCli.test.ts b/tests/boundary/cli/electronCli.test.ts index 5b8e36d678..6a9957bef9 100644 --- a/tests/boundary/cli/electronCli.test.ts +++ b/tests/boundary/cli/electronCli.test.ts @@ -26,7 +26,6 @@ import { JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE } from "../../../src/contract const cliProcesses = createTestProcessRegistry(); const cli = createTestCli(cliProcesses); -const INTEGRATION_TEST_TIMEOUT_MS = 20_000; const browsers: FakeCdpBrowser[] = []; const temporary: string[] = []; @@ -44,121 +43,113 @@ afterEach(async () => { ]); }); -it( - "returns the same endpoint-scoped Electron Evidence contracts", - async () => { - const root = await createTestTempDirectory("rea-electron-cli-"); - temporary.push(root); - await writeFile(join(root, "index.html"), ""); - await writeFile(join(root, "app.js"), "export const app = true;"); - const browser = await startFakeCdpBrowser({ - electronFileUrl: `${pathToFileURL(join(root, "index.html")).href}?next=%2Fsettings#%5Csettings`, - commandEvents: ({ method }) => - method === "Debugger.enable" - ? [ - { - method: "Debugger.scriptParsed", - sessionId: "session-1", - params: { - scriptId: "partial-script", - url: pathToFileURL(join(root, "app.js")).href, - executionContextId: 1, - }, +it("returns the same endpoint-scoped Electron Evidence contracts", async () => { + const root = await createTestTempDirectory("rea-electron-cli-"); + temporary.push(root); + await writeFile(join(root, "index.html"), ""); + await writeFile(join(root, "app.js"), "export const app = true;"); + const browser = await startFakeCdpBrowser({ + electronFileUrl: `${pathToFileURL(join(root, "index.html")).href}?next=%2Fsettings#%5Csettings`, + commandEvents: ({ method }) => + method === "Debugger.enable" + ? [ + { + method: "Debugger.scriptParsed", + sessionId: "session-1", + params: { + scriptId: "partial-script", + url: pathToFileURL(join(root, "app.js")).href, + executionContextId: 1, }, - ] - : undefined, - }); - browsers.push(browser); - const environment = { ...process.env }; - const listed = parseEvidence( - await runCli( - ["list-electron-targets", browser.endpoint, "--json"], - environment, - ), - ); - expect(listed).toMatchObject({ - operation: "list_electron_targets", - environment: { - id: expect.any(String), - platform: "unknown", - architecture: "unknown", - isolation: "none", - }, - limitations: expect.arrayContaining([ - expect.stringMatching(/platform.*architecture.*not observed/iu), - ]), - normalized_result: { - targets: [{ target_id: "electron-page" }], - }, - }); - const inspected = await runCli( - [ - "inspect-electron-page", - browser.endpoint, - "electron-page", - "--observation-ms", - "0", - "--json", - ], + }, + ] + : undefined, + }); + browsers.push(browser); + const environment = { ...process.env }; + const listed = parseEvidence( + await runCli( + ["list-electron-targets", browser.endpoint, "--json"], environment, - ); - expect(inspected).toMatchObject({ - operation: "inspect_electron_page", - environment: listed.environment, - provider: { id: "rea-cdp-electron" }, - normalized_result: { - target: { file_path: join(root, "index.html") }, - scripts: { - items: [{ cdp_hash: null, length: null, is_module: null }], - }, + ), + ); + expect(listed).toMatchObject({ + operation: "list_electron_targets", + environment: { + id: expect.any(String), + platform: "unknown", + architecture: "unknown", + isolation: "none", + }, + limitations: expect.arrayContaining([ + expect.stringMatching(/platform.*architecture.*not observed/iu), + ]), + normalized_result: { + targets: [{ target_id: "electron-page" }], + }, + }); + const inspected = await runCli( + [ + "inspect-electron-page", + browser.endpoint, + "electron-page", + "--observation-ms", + "0", + "--json", + ], + environment, + ); + expect(inspected).toMatchObject({ + operation: "inspect_electron_page", + environment: listed.environment, + provider: { id: "rea-cdp-electron" }, + normalized_result: { + target: { file_path: join(root, "index.html") }, + scripts: { + items: [{ cdp_hash: null, length: null, is_module: null }], }, - }); - }, - INTEGRATION_TEST_TIMEOUT_MS, -); + }, + }); +}); -it( - "reports rejected Electron CLI arguments with structured issue details", - async () => { - const invalidTargetList = await runCliResult( - ["list-electron-targets", "not a url", "--json"], - process.env, - ); - expect(invalidTargetList.signal).toBeNull(); - expect(invalidTargetList.exitCode).toBe(1); - expect(invalidTargetList.json).toMatchObject({ - error: "Electron analysis failed", - code: "invalid_request", - category: "invalid_input", - details: { - operation: "list_electron_targets", - issues: [ - { - path: ["cdp_endpoint"], - reason: "invalid_value", - }, - ], - }, - }); - - const invalidPageInspect = await runCliResult( - ["inspect-electron-page", "http://127.0.0.1:9222", "", "--json"], - process.env, - ); - expect(invalidPageInspect.signal).toBeNull(); - expect(invalidPageInspect.exitCode).toBe(1); - expect(invalidPageInspect.json).toMatchObject({ - code: "VALIDATION_ERROR", - fieldErrors: [ +it("reports rejected Electron CLI arguments with structured issue details", async () => { + const invalidTargetList = await runCliResult( + ["list-electron-targets", "not a url", "--json"], + process.env, + ); + expect(invalidTargetList.signal).toBeNull(); + expect(invalidTargetList.exitCode).toBe(1); + expect(invalidTargetList.json).toMatchObject({ + error: "Electron analysis failed", + code: "invalid_request", + category: "invalid_input", + details: { + operation: "list_electron_targets", + issues: [ { - code: "too_small", - path: "targetId", + path: ["cdp_endpoint"], + reason: "invalid_value", }, ], - }); - }, - INTEGRATION_TEST_TIMEOUT_MS, -); + }, + }); + + const invalidPageInspect = await runCliResult( + ["inspect-electron-page", "http://127.0.0.1:9222", "", "--json"], + process.env, + ); + expect(invalidPageInspect.signal).toBeNull(); + expect(invalidPageInspect.exitCode).toBe(1); + expect(invalidPageInspect.json).toMatchObject({ + code: "VALIDATION_ERROR", + fieldErrors: [ + { + code: "too_small", + path: "targetId", + }, + ], + }); +}); // On Windows child.kill("SIGINT") terminates the process without a console signal. it.skipIf(process.platform === "win32")( @@ -238,13 +229,41 @@ it.skipIf(process.platform === "win32")( } } }, - INTEGRATION_TEST_TIMEOUT_MS, ); -it( - "returns the static JavaScript application Evidence contract", - async () => { - const root = await createTestTempDirectory("rea-electron-static-cli-"); +it("returns the static JavaScript application Evidence contract", async () => { + const root = await createTestTempDirectory("rea-electron-static-cli-"); + temporary.push(root); + await writeElectronBoundaryFixture(root); + const environment = { + ...process.env, + }; + + const analyzed = await runCli( + ["analyze-javascript-application", root, "--json"], + environment, + ); + + expect(analyzed).toMatchObject({ + operation: "analyze_javascript_application", + provider: { id: "rea-javascript-application" }, + normalized_result: { + input_path: root, + summary: { + browser_windows: 3, + context_bridge_apis: 2, + ipc: { + paired_renderer_transmissions: 0, + ambiguous_renderer_transmissions: 7, + unpaired_literal_renderer_transmissions: 0, + }, + }, + }, + }); +}); +describe("Electron CLI artifact behavior", () => { + it("keeps artifact format separate from structured output format", async () => { + const root = await createTestTempDirectory("rea-electron-format-cli-"); temporary.push(root); await writeElectronBoundaryFixture(root); const environment = { @@ -252,18 +271,40 @@ it( }; const analyzed = await runCli( - ["analyze-javascript-application", root, "--json"], + [ + "--format", + "json", + "analyze-javascript-application", + root, + "--artifact-format", + "directory", + ], environment, ); + expect(analyzed).toMatchObject({ + operation: "analyze_javascript_application", + normalized_result: { input_path: root, format: "directory" }, + }); + }); + + it("routes generic directory analysis to static JavaScript", async () => { + const root = await createTestTempDirectory("rea-electron-routed-cli-"); + temporary.push(root); + await writeElectronBoundaryFixture(root); + const environment = { + ...process.env, + }; + + const analyzed = await runCli(["analyze", root, "--json"], environment); + expect(analyzed).toMatchObject({ operation: "analyze_javascript_application", provider: { id: "rea-javascript-application" }, normalized_result: { input_path: root, + format: "directory", summary: { - browser_windows: 3, - context_bridge_apis: 2, ipc: { paired_renderer_transmissions: 0, ambiguous_renderer_transmissions: 7, @@ -272,241 +313,166 @@ it( }, }, }); - }, - INTEGRATION_TEST_TIMEOUT_MS, -); -describe("Electron CLI artifact behavior", () => { - it( - "keeps artifact format separate from structured output format", - async () => { - const root = await createTestTempDirectory("rea-electron-format-cli-"); - temporary.push(root); - await writeElectronBoundaryFixture(root); - const environment = { - ...process.env, - }; - - const analyzed = await runCli( - [ - "--format", - "json", - "analyze-javascript-application", - root, - "--artifact-format", - "directory", - ], - environment, - ); - - expect(analyzed).toMatchObject({ - operation: "analyze_javascript_application", - normalized_result: { input_path: root, format: "directory" }, - }); - }, - INTEGRATION_TEST_TIMEOUT_MS, - ); - - it( - "routes generic directory analysis to static JavaScript", - async () => { - const root = await createTestTempDirectory("rea-electron-routed-cli-"); - temporary.push(root); - await writeElectronBoundaryFixture(root); - const environment = { - ...process.env, - }; - - const analyzed = await runCli(["analyze", root, "--json"], environment); - - expect(analyzed).toMatchObject({ - operation: "analyze_javascript_application", - provider: { id: "rea-javascript-application" }, - normalized_result: { - input_path: root, - format: "directory", - summary: { - ipc: { - paired_renderer_transmissions: 0, - ambiguous_renderer_transmissions: 7, - unpaired_literal_renderer_transmissions: 0, - }, - }, - }, - }); - }, - INTEGRATION_TEST_TIMEOUT_MS, - ); + }); }); describe("Electron CLI runtime reconciliation input", () => { - it( - "labels schema-invalid reconciliation input without naming Electron", - async () => { - const rejected = await runCli( - ["reconcile-javascript-runtime", "{}", "--json"], - process.env, - 1, - ); - expect(rejected).toMatchObject({ - error: "Application workflow failed", - code: "invalid_request", - category: "invalid_input", - details: { operation: "reconcile_javascript_runtime" }, - }); - }, - INTEGRATION_TEST_TIMEOUT_MS, - ); + it("labels schema-invalid reconciliation input without naming Electron", async () => { + const rejected = await runCli( + ["reconcile-javascript-runtime", "{}", "--json"], + process.env, + 1, + ); + expect(rejected).toMatchObject({ + error: "Application workflow failed", + code: "invalid_request", + category: "invalid_input", + details: { operation: "reconcile_javascript_runtime" }, + }); + }); }); describe("Electron CLI runtime reconciliation", () => { - it( - "reads a file and returns the derived static/runtime reconciliation contract", - async () => { - const root = await createTestTempDirectory("rea-runtime-cli-"); - const inputPath = join(root, "reconciliation.json"); - temporary.push(root); - await writeFile( - inputPath, - JSON.stringify(JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE), - ); - const reconciled = await runCli( - ["reconcile-javascript-runtime", inputPath, "--json"], - process.env, - ); + it("reads a file and returns the derived static/runtime reconciliation contract", async () => { + const root = await createTestTempDirectory("rea-runtime-cli-"); + const inputPath = join(root, "reconciliation.json"); + temporary.push(root); + await writeFile( + inputPath, + JSON.stringify(JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE), + ); + const reconciled = await runCli( + ["reconcile-javascript-runtime", inputPath, "--json"], + process.env, + ); - expect(reconciled).toMatchObject({ - operation: "reconcile_javascript_runtime", - provider: { id: "rea-javascript-runtime-reconciliation" }, - normalized_result: { - summary: { runtime_scripts: 1, matched: 1 }, - source_map_authority: { used_for_primary_matching: false }, + expect(reconciled).toMatchObject({ + operation: "reconcile_javascript_runtime", + provider: { id: "rea-javascript-runtime-reconciliation" }, + normalized_result: { + summary: { runtime_scripts: 1, matched: 1 }, + source_map_authority: { used_for_primary_matching: false }, + }, + }); + const missingPath = join(root, "missing.json"); + const missing = await runCli( + ["reconcile-javascript-runtime", missingPath, "--json"], + process.env, + 1, + ); + expect(missing).toMatchObject({ + input_path: missingPath, + input_reason: "read-failed", + }); + }); + + it("keeps ambiguous runtime candidates unknown while unrelated scoped assets remain absent", async () => { + const application = await applicationFixture(); + const assets = await createTestTempDirectory("rea-runtime-cli-assets-"); + const runtime = await createTestTempDirectory("rea-runtime-cli-live-"); + const inputPath = join(assets, "reconciliation.json"); + temporary.push(application, assets, runtime); + await Promise.all([ + writeFile(join(assets, "app.js"), SOURCE), + writeFile(join(assets, "absent.js"), "export const absent = true;\n"), + writeFile(join(runtime, "app.js"), SOURCE), + ]); + const rootMapping = [{ kind: "file-root", root: runtime }] as const; + const input = { + static_layers: [ + { + role: "application", + analysis: await analyzeFixture(application), + runtime_mappings: rootMapping, }, - }); - const missingPath = join(root, "missing.json"); - const missing = await runCli( - ["reconcile-javascript-runtime", missingPath, "--json"], - process.env, - 1, - ); - expect(missing).toMatchObject({ - input_path: missingPath, - input_reason: "read-failed", - }); - }, - INTEGRATION_TEST_TIMEOUT_MS, - ); + { + role: "assets", + analysis: await analyzeFixture(assets), + runtime_mappings: rootMapping, + }, + ], + runtime_observations: [ + electronRuntimeEvidence(runtime, SOURCE, { includeWorker: false }), + ], + }; + await writeFile(inputPath, JSON.stringify(input)); + const reconciled = await runCli( + ["reconcile-javascript-runtime", inputPath, "--json"], + process.env, + ); - it( - "keeps ambiguous runtime candidates unknown while unrelated scoped assets remain absent", - async () => { - const application = await applicationFixture(); - const assets = await createTestTempDirectory("rea-runtime-cli-assets-"); - const runtime = await createTestTempDirectory("rea-runtime-cli-live-"); - const inputPath = join(assets, "reconciliation.json"); - temporary.push(application, assets, runtime); - await Promise.all([ - writeFile(join(assets, "app.js"), SOURCE), - writeFile(join(assets, "absent.js"), "export const absent = true;\n"), - writeFile(join(runtime, "app.js"), SOURCE), - ]); - const rootMapping = [{ kind: "file-root", root: runtime }] as const; - const input = { - static_layers: [ - { - role: "application", - analysis: await analyzeFixture(application), - runtime_mappings: rootMapping, - }, - { - role: "assets", - analysis: await analyzeFixture(assets), - runtime_mappings: rootMapping, - }, - ], - runtime_observations: [ - electronRuntimeEvidence(runtime, SOURCE, { includeWorker: false }), - ], - }; - await writeFile(inputPath, JSON.stringify(input)); - const reconciled = await runCli( - ["reconcile-javascript-runtime", inputPath, "--json"], - process.env, - ); - - const normalized = - isRecord(reconciled) && isRecord(reconciled.normalized_result) - ? reconciled.normalized_result - : undefined; - const reconciliations = normalized?.reconciliations; - const loadStates = normalized?.static_load_states; - if (!Array.isArray(reconciliations) || !Array.isArray(loadStates)) - throw new Error("Missing runtime reconciliation output"); - const ambiguous = reconciliations.find( + const normalized = + isRecord(reconciled) && isRecord(reconciled.normalized_result) + ? reconciled.normalized_result + : undefined; + const reconciliations = normalized?.reconciliations; + const loadStates = normalized?.static_load_states; + if (!Array.isArray(reconciliations) || !Array.isArray(loadStates)) + throw new Error("Missing runtime reconciliation output"); + const ambiguous = reconciliations.find( + (item) => + isRecord(item) && + item.status === "ambiguous" && + item.entity_kind === "script", + ); + if ( + !isRecord(ambiguous) || + !Array.isArray(ambiguous.candidate_static_nodes) + ) + throw new Error("Missing ambiguous runtime script"); + const candidateIds = ambiguous.candidate_static_nodes.flatMap((item) => + isRecord(item) && typeof item.static_node_id === "string" + ? [item.static_node_id] + : [], + ); + expect(candidateIds).toHaveLength(2); + const candidateStates = loadStates.filter( + (item) => + isRecord(item) && + typeof item.static_node_id === "string" && + candidateIds.includes(item.static_node_id), + ); + expect(candidateStates).toHaveLength(2); + expect( + candidateStates.every( (item) => isRecord(item) && - item.status === "ambiguous" && - item.entity_kind === "script", - ); - if ( - !isRecord(ambiguous) || - !Array.isArray(ambiguous.candidate_static_nodes) - ) - throw new Error("Missing ambiguous runtime script"); - const candidateIds = ambiguous.candidate_static_nodes.flatMap((item) => - isRecord(item) && typeof item.static_node_id === "string" - ? [item.static_node_id] - : [], - ); - expect(candidateIds).toHaveLength(2); - const candidateStates = loadStates.filter( - (item) => - isRecord(item) && - typeof item.static_node_id === "string" && - candidateIds.includes(item.static_node_id), - ); - expect(candidateStates).toHaveLength(2); - expect( - candidateStates.every( - (item) => - isRecord(item) && - item.status === "unknown" && - item.reason === "ambiguous-runtime-candidate", - ), - ).toBe(true); - expect(loadStates).toEqual( - expect.arrayContaining([ + item.status === "unknown" && + item.reason === "ambiguous-runtime-candidate", + ), + ).toBe(true); + expect(loadStates).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + status: "not-observed-in-capture", + reason: "not-observed-in-bounded-capture", + }), + ]), + ); + + const singleLayerPath = join(application, "single-reconciliation.json"); + await writeFile( + singleLayerPath, + JSON.stringify({ + static_layers: [input.static_layers[0]], + runtime_observations: input.runtime_observations, + }), + ); + const uniquelyMatched = await runCli( + ["reconcile-javascript-runtime", singleLayerPath, "--json"], + process.env, + ); + expect(uniquelyMatched).toMatchObject({ + normalized_result: { + static_load_states: expect.arrayContaining([ expect.objectContaining({ - status: "not-observed-in-capture", - reason: "not-observed-in-bounded-capture", + status: "loaded", + reason: "runtime-script-correspondence", }), ]), - ); - - const singleLayerPath = join(application, "single-reconciliation.json"); - await writeFile( - singleLayerPath, - JSON.stringify({ - static_layers: [input.static_layers[0]], - runtime_observations: input.runtime_observations, - }), - ); - const uniquelyMatched = await runCli( - ["reconcile-javascript-runtime", singleLayerPath, "--json"], - process.env, - ); - expect(uniquelyMatched).toMatchObject({ - normalized_result: { - static_load_states: expect.arrayContaining([ - expect.objectContaining({ - status: "loaded", - reason: "runtime-script-correspondence", - }), - ]), - }, - }); - }, - INTEGRATION_TEST_TIMEOUT_MS, - ); + }, + }); + }); }); const isRecord = (value: unknown): value is Record => diff --git a/tests/boundary/cli/foreignUniversalMachoCli.test.ts b/tests/boundary/cli/foreignUniversalMachoCli.test.ts index 9139b0ef41..c1d4f3042c 100644 --- a/tests/boundary/cli/foreignUniversalMachoCli.test.ts +++ b/tests/boundary/cli/foreignUniversalMachoCli.test.ts @@ -65,7 +65,6 @@ cliTest.skipIf(process.platform !== "darwin")( evidence.normalized_result.architectures.items[0]?.file_offset, ).toBeGreaterThan(0); }, - 60_000, ); cliTest.skipIf(process.platform === "darwin")( diff --git a/tests/boundary/cli/hopperLaunchFailureCli.test.ts b/tests/boundary/cli/hopperLaunchFailureCli.test.ts index 8e98c216b7..14ccd8437c 100644 --- a/tests/boundary/cli/hopperLaunchFailureCli.test.ts +++ b/tests/boundary/cli/hopperLaunchFailureCli.test.ts @@ -29,7 +29,6 @@ describe("Hopper launcher failure through the one-shot CLI", () => { // Hopper target leases are acquired only for the macOS launcher route. workspaceCliTest.skipIf(process.platform !== "darwin")( "exits after a retained-cleanup failure and releases the target to a retry", - { timeout: 90_000 }, async ({ cli, workspace }) => { const launcherPath = await workspace.write( "failure-helper", diff --git a/tests/boundary/cli/httpCaptureComparison.test.ts b/tests/boundary/cli/httpCaptureComparison.test.ts index 86be2d58bf..7d4f08efa8 100644 --- a/tests/boundary/cli/httpCaptureComparison.test.ts +++ b/tests/boundary/cli/httpCaptureComparison.test.ts @@ -116,5 +116,4 @@ cliTest( await fixture.browser.close(); } }, - 60_000, ); diff --git a/tests/boundary/cli/javascriptAssignmentInfluence.test.ts b/tests/boundary/cli/javascriptAssignmentInfluence.test.ts index 3266dfe8e0..043ca01e83 100644 --- a/tests/boundary/cli/javascriptAssignmentInfluence.test.ts +++ b/tests/boundary/cli/javascriptAssignmentInfluence.test.ts @@ -86,5 +86,4 @@ cliTest( ); } }, - 120_000, ); diff --git a/tests/boundary/cli/jsonOutput.test.ts b/tests/boundary/cli/jsonOutput.test.ts index 1ccdf1c24c..7a8082c00c 100644 --- a/tests/boundary/cli/jsonOutput.test.ts +++ b/tests/boundary/cli/jsonOutput.test.ts @@ -856,7 +856,7 @@ describe("CLI result output surface", () => { }, meta: { command: "inspect-managed-members" }, }); - }, 60_000); + }); }); describe("streamed CLI filtered selections", () => { diff --git a/tests/boundary/cli/managedMemberSummaryCli.test.ts b/tests/boundary/cli/managedMemberSummaryCli.test.ts index 97e964c357..45045b4d49 100644 --- a/tests/boundary/cli/managedMemberSummaryCli.test.ts +++ b/tests/boundary/cli/managedMemberSummaryCli.test.ts @@ -243,6 +243,7 @@ cliTest( cliTest( "retains complete member Evidence for exact CLI pages after process exit and target removal", + { tags: ["long-running"] }, async ({ cli }) => { const root = await createTestTempDirectory("rea-member-summary-cli-"); const path = join(root, "fixture.dll"); @@ -359,7 +360,6 @@ cliTest( await verifyCliSelection(pageContext); expect(await readFile(bundlePath, "utf8")).toBe(originalBytes); }, - 180_000, ); cliTest( diff --git a/tests/boundary/cli/managedNativeVerificationLargeInventory.test.ts b/tests/boundary/cli/managedNativeVerificationLargeInventory.test.ts index f32ad35136..5f499922b5 100644 --- a/tests/boundary/cli/managedNativeVerificationLargeInventory.test.ts +++ b/tests/boundary/cli/managedNativeVerificationLargeInventory.test.ts @@ -107,5 +107,4 @@ cliTest( }, }); }, - 120_000, ); diff --git a/tests/boundary/cli/mcpDoctorHelpCli.test.ts b/tests/boundary/cli/mcpDoctorHelpCli.test.ts index 8f630f7eef..613f778ac6 100644 --- a/tests/boundary/cli/mcpDoctorHelpCli.test.ts +++ b/tests/boundary/cli/mcpDoctorHelpCli.test.ts @@ -2,8 +2,6 @@ import { describe, expect } from "vitest"; import { workspaceCliTest } from "../../support/cli/workspaceCliFixture.js"; -const CLI_INTEGRATION_TIMEOUT_MS = 60_000; - describe("MCP doctor output routing boundary", () => { workspaceCliTest( "keeps output options from selecting the CLI-derived MCP doctor", @@ -41,7 +39,6 @@ describe("MCP doctor output routing boundary", () => { expect(result.stderr).toBe(""); } }, - CLI_INTEGRATION_TIMEOUT_MS, ); }); @@ -70,7 +67,6 @@ describe("MCP doctor help boundary", () => { expect(result.stderr).toBe(""); } }, - CLI_INTEGRATION_TIMEOUT_MS, ); workspaceCliTest( @@ -88,7 +84,6 @@ describe("MCP doctor help boundary", () => { expect(result.stdout).not.toContain("healthy"); } }, - CLI_INTEGRATION_TIMEOUT_MS, ); workspaceCliTest( @@ -105,7 +100,6 @@ describe("MCP doctor help boundary", () => { expect(result.stdout).not.toContain("Usage: rea mcp doctor"); } }, - CLI_INTEGRATION_TIMEOUT_MS, ); workspaceCliTest( @@ -126,7 +120,6 @@ describe("MCP doctor help boundary", () => { 'code: VALIDATION_ERROR\nmessage: "Invalid output format: bogus"\n', }); }, - CLI_INTEGRATION_TIMEOUT_MS, ); workspaceCliTest( @@ -156,7 +149,6 @@ describe("MCP doctor help boundary", () => { }); } }, - CLI_INTEGRATION_TIMEOUT_MS, ); }); @@ -180,7 +172,6 @@ describe("MCP doctor timing boundary", () => { expect(Number.isFinite(duration)).toBe(true); expect(duration).toBeGreaterThanOrEqual(0); }, - CLI_INTEGRATION_TIMEOUT_MS, ); workspaceCliTest( @@ -193,7 +184,6 @@ describe("MCP doctor timing boundary", () => { expect(result.stdout).toContain("Invalid output format: --timings"); expect(result.stderr).toBe(""); }, - CLI_INTEGRATION_TIMEOUT_MS, ); }); @@ -222,5 +212,4 @@ workspaceCliTest( else expect(result.stderr).toBe(""); } }, - CLI_INTEGRATION_TIMEOUT_MS, ); diff --git a/tests/boundary/cli/nativeMachoArm64_32Cli.test.ts b/tests/boundary/cli/nativeMachoArm64_32Cli.test.ts index 4ebe08a92b..81445ab546 100644 --- a/tests/boundary/cli/nativeMachoArm64_32Cli.test.ts +++ b/tests/boundary/cli/nativeMachoArm64_32Cli.test.ts @@ -71,7 +71,6 @@ describe.skipIf(process.platform !== "darwin")( details: { selection_reason: "target_unsupported" }, }); }, - 60_000, ); }, ); diff --git a/tests/boundary/cli/nativeMachoEchoedPathCli.test.ts b/tests/boundary/cli/nativeMachoEchoedPathCli.test.ts index 5854281a23..91e32ad697 100644 --- a/tests/boundary/cli/nativeMachoEchoedPathCli.test.ts +++ b/tests/boundary/cli/nativeMachoEchoedPathCli.test.ts @@ -98,7 +98,6 @@ describe.skipIf(process.platform !== "darwin")( expect(forged).toEqual(ordinary); expect(JSON.stringify(forged)).not.toMatch(/forged|4242/u); }, - 60_000, ); } }, diff --git a/tests/boundary/cli/nativeSignatureCli.test.ts b/tests/boundary/cli/nativeSignatureCli.test.ts index f69de01daa..3e3a4f01ef 100644 --- a/tests/boundary/cli/nativeSignatureCli.test.ts +++ b/tests/boundary/cli/nativeSignatureCli.test.ts @@ -136,7 +136,6 @@ describe.skipIf(process.platform !== "darwin" || process.arch !== "arm64")( normalized_result: { signed: true, cdhashes: [cdhash] }, }); }, - 60_000, ); }, ); diff --git a/tests/boundary/cli/packageRunnerBoundInstallation.test.ts b/tests/boundary/cli/packageRunnerBoundInstallation.test.ts index 05a5aaa6bf..274fefec40 100644 --- a/tests/boundary/cli/packageRunnerBoundInstallation.test.ts +++ b/tests/boundary/cli/packageRunnerBoundInstallation.test.ts @@ -171,7 +171,6 @@ cliTest.skipIf(process.platform === "win32")( expect(await readFile(configPath, "utf8")).toBe(original); await expect(access(marker)).rejects.toMatchObject({ code: "ENOENT" }); }, - 60_000, ); cliTest.skipIf(process.platform === "win32")( diff --git a/tests/boundary/cli/projectedErrorStatus.test.ts b/tests/boundary/cli/projectedErrorStatus.test.ts index ca3777635f..7bd4a5e110 100644 --- a/tests/boundary/cli/projectedErrorStatus.test.ts +++ b/tests/boundary/cli/projectedErrorStatus.test.ts @@ -45,6 +45,5 @@ describe("projected CLI failures", () => { expect(result.json).toMatchObject({ code: "invalid_request" }); } }, - 30_000, ); }); diff --git a/tests/boundary/cli/rawDiskImageCli.test.ts b/tests/boundary/cli/rawDiskImageCli.test.ts index 307c00326f..bcbff8f3b5 100644 --- a/tests/boundary/cli/rawDiskImageCli.test.ts +++ b/tests/boundary/cli/rawDiskImageCli.test.ts @@ -108,7 +108,6 @@ describe.skipIf(process.platform !== "darwin")( expect(attached.stdout).not.toContain(raw); expect(attached.stdout).not.toContain(compressed); }, - 120_000, ); cliTest( diff --git a/tests/boundary/cli/reconstructionObligationLedgerCli.test.ts b/tests/boundary/cli/reconstructionObligationLedgerCli.test.ts index 357219444e..5eb233db1d 100644 --- a/tests/boundary/cli/reconstructionObligationLedgerCli.test.ts +++ b/tests/boundary/cli/reconstructionObligationLedgerCli.test.ts @@ -76,7 +76,7 @@ describe("reconstruction obligation ledger CLI parity", () => { ); } } - }, 20_000); + }); }); describe("reconstruction obligation ledger CLI bundle validation", () => { @@ -147,7 +147,7 @@ describe("reconstruction obligation ledger CLI bundle validation", () => { ), }, }); - }, 20_000); + }); it("builds the same Evidence-backed empty ledger through the CLI", async () => { const input = { @@ -181,7 +181,7 @@ describe("reconstruction obligation ledger CLI bundle validation", () => { summary: { total: 0 }, }, }); - }, 20_000); + }); it("summarizes obligations by their cited Evidence authorities", async () => { const { stdout } = await execute( @@ -221,7 +221,7 @@ describe("reconstruction obligation ledger CLI bundle validation", () => { ], ["review.shipped", ["shipped-artifact/candidate"]], ]); - }, 20_000); + }); }); describe("reconstruction obligation ledger CLI contradictions", () => { @@ -282,7 +282,7 @@ describe("reconstruction obligation ledger CLI contradictions", () => { ], }); } - }, 20_000); + }); }); cliTest( @@ -376,44 +376,38 @@ describe("reconstruction proof applicability through CLI", () => { reason, codes, } of reconstructionProofApplicabilityCases()) - cliTest( - name, - async ({ cli }) => { - const invocation = { - arguments: [ - "build-reconstruction-obligation-ledger", - JSON.stringify(input), - "--json", - ], - }; - const result = - name === "matching implementation and revision" - ? await cli.run(invocation) - : await runFileCli(cli, invocation); - expect(result.exitCode, result.stderr).toBe(0); - const ledger = reconstructionObligationLedgerSchema.parse( - (result.json as { normalized_result: unknown }).normalized_result, - ); - expect(ledger.status).toBe(status); - const obligation = ledger.obligations[0]!; - expect(obligation.status).toBe( - status === "ready" ? "verified" : "implemented", - ); - expect(obligation.diagnostics.map(({ code }) => code).sort()).toEqual( - [...codes].sort(), - ); - expect(ledger.summary.required_open).toBe(status === "ready" ? 0 : 1); - for (const fixture of input.manifest.bindings[0]!.fixtures) - for (const evidenceId of fixture.evidence_ids) - expect(ledger.evidence_links).toContain(evidenceId); - if (reason === null) expect(obligation.diagnostics).toEqual([]); - else - expect( - obligation.diagnostics.some(({ detail }) => - detail.includes(reason), - ), - ).toBe(true); - }, - 20_000, - ); + cliTest(name, async ({ cli }) => { + const invocation = { + arguments: [ + "build-reconstruction-obligation-ledger", + JSON.stringify(input), + "--json", + ], + }; + const result = + name === "matching implementation and revision" + ? await cli.run(invocation) + : await runFileCli(cli, invocation); + expect(result.exitCode, result.stderr).toBe(0); + const ledger = reconstructionObligationLedgerSchema.parse( + (result.json as { normalized_result: unknown }).normalized_result, + ); + expect(ledger.status).toBe(status); + const obligation = ledger.obligations[0]!; + expect(obligation.status).toBe( + status === "ready" ? "verified" : "implemented", + ); + expect(obligation.diagnostics.map(({ code }) => code).sort()).toEqual( + [...codes].sort(), + ); + expect(ledger.summary.required_open).toBe(status === "ready" ? 0 : 1); + for (const fixture of input.manifest.bindings[0]!.fixtures) + for (const evidenceId of fixture.evidence_ids) + expect(ledger.evidence_links).toContain(evidenceId); + if (reason === null) expect(obligation.diagnostics).toEqual([]); + else + expect( + obligation.diagnostics.some(({ detail }) => detail.includes(reason)), + ).toBe(true); + }); }); diff --git a/tests/boundary/cli/referenceSourceImportStatus.test.ts b/tests/boundary/cli/referenceSourceImportStatus.test.ts index a9565c09bc..5fa336b11d 100644 --- a/tests/boundary/cli/referenceSourceImportStatus.test.ts +++ b/tests/boundary/cli/referenceSourceImportStatus.test.ts @@ -73,7 +73,6 @@ describe("compiled Windows reference-source import", () => { }); } else expect(result.stderr).toBe(""); }, - 60_000, ); } }); diff --git a/tests/boundary/cli/runtimeUrlPrefixMappingCli.test.ts b/tests/boundary/cli/runtimeUrlPrefixMappingCli.test.ts index 7c6c157998..2c8735d9ab 100644 --- a/tests/boundary/cli/runtimeUrlPrefixMappingCli.test.ts +++ b/tests/boundary/cli/runtimeUrlPrefixMappingCli.test.ts @@ -14,7 +14,6 @@ import { passiveNetworkCapture } from "../../fixtures/passiveNetworkCapture.js"; import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js"; const execute = promisify(execFile); -const INTEGRATION_TEST_TIMEOUT_MS = 30_000; const temporary: string[] = []; afterEach(async () => { @@ -197,109 +196,97 @@ const mappedLocation = (path: string) => ({ observed_as: 1, }); -it( - "matches a source-free webpack script to its containing asset", - async () => { - const root = await createTestTempDirectory("rea-url-bundler-asset-"); - temporary.push(root); - await mkdir(join(root, "chunks")); - await writeFile( - join(root, "chunks", "runtime.js"), - '(globalThis["webpackChunkfixture"] = globalThis["webpackChunkfixture"] || []).push([["main"],{1:(module)=>{module.exports=1;}},(__webpack_require__)=>{__webpack_require__(1);}]);\n', - ); - const analysis = await analyzeFixture(root); - const result = await reconcileThroughCli(root, analysis, [ - "chunks/runtime.js", - ]); - expect(result.scripts.get("chunks/runtime.js")).toEqual( - mappedLocation("chunks/runtime.js"), - ); - expect(result.loadStates.get("chunks/runtime.js")).toEqual({ +it("matches a source-free webpack script to its containing asset", async () => { + const root = await createTestTempDirectory("rea-url-bundler-asset-"); + temporary.push(root); + await mkdir(join(root, "chunks")); + await writeFile( + join(root, "chunks", "runtime.js"), + '(globalThis["webpackChunkfixture"] = globalThis["webpackChunkfixture"] || []).push([["main"],{1:(module)=>{module.exports=1;}},(__webpack_require__)=>{__webpack_require__(1);}]);\n', + ); + const analysis = await analyzeFixture(root); + const result = await reconcileThroughCli(root, analysis, [ + "chunks/runtime.js", + ]); + expect(result.scripts.get("chunks/runtime.js")).toEqual( + mappedLocation("chunks/runtime.js"), + ); + expect(result.loadStates.get("chunks/runtime.js")).toEqual({ + status: "loaded", + reason: "runtime-script-correspondence", + }); +}); + +it("keeps an encoded slash inside one URL segment rather than naming a nested artifact", async () => { + const root = await createTestTempDirectory("rea-url-prefix-segments-"); + temporary.push(root); + await mkdir(join(root, "child")); + await Promise.all([ + writeFile(join(root, "child", "part.js"), "export const nested = 1;\n"), + writeFile(join(root, "child%2Fpart.js"), "export const literal = 2;\n"), + writeFile(join(root, "sp ace.js"), "export const space = 3;\n"), + writeFile(join(root, "é.js"), "export const accent = 4;\n"), + ]); + const analysis = await analyzeFixture(root); + + const { scripts } = await reconcileThroughCli(root, analysis, [ + "child/part.js", + "child/part.js?v=%2F#f%2F", + "child%2Fpart.js", + "child%2fpart.js", + "child%252Fpart.js", + "sp%20ace.js", + "%C3%A9.js", + "child/%E0.js", + ]); + + expect(Object.fromEntries(scripts)).toEqual({ + "child/part.js": mappedLocation("child/part.js"), + "child/part.js?v=%2F#f%2F": mappedLocation("child/part.js"), + "child%2Fpart.js": unmappedLocation, + "child%2fpart.js": unmappedLocation, + "child%252Fpart.js": mappedLocation("child%2Fpart.js"), + "sp%20ace.js": mappedLocation("sp ace.js"), + "%C3%A9.js": mappedLocation("é.js"), + "child/%E0.js": unmappedLocation, + }); +}); + +it("keeps static load state unknown beneath a prefix whose runtime script had no artifact path", async () => { + const root = await createTestTempDirectory("rea-url-prefix-load-state-"); + temporary.push(root); + await mkdir(join(root, "child")); + await Promise.all([ + writeFile(join(root, "child", "part.js"), "export const nested = 1;\n"), + writeFile(join(root, "other.js"), "export const other = 2;\n"), + ]); + const analysis = await analyzeFixture(root); + + const control = await reconcileThroughCli(root, analysis, ["other.js"]); + expect(Object.fromEntries(control.loadStates)).toEqual({ + "child/part.js": { + status: "not-observed-in-capture", + reason: "not-observed-in-bounded-capture", + }, + "other.js": { status: "loaded", reason: "runtime-script-correspondence", - }); - }, - INTEGRATION_TEST_TIMEOUT_MS, -); + }, + }); -it( - "keeps an encoded slash inside one URL segment rather than naming a nested artifact", - async () => { - const root = await createTestTempDirectory("rea-url-prefix-segments-"); - temporary.push(root); - await mkdir(join(root, "child")); - await Promise.all([ - writeFile(join(root, "child", "part.js"), "export const nested = 1;\n"), - writeFile(join(root, "child%2Fpart.js"), "export const literal = 2;\n"), - writeFile(join(root, "sp ace.js"), "export const space = 3;\n"), - writeFile(join(root, "é.js"), "export const accent = 4;\n"), - ]); - const analysis = await analyzeFixture(root); - - const { scripts } = await reconcileThroughCli(root, analysis, [ - "child/part.js", - "child/part.js?v=%2F#f%2F", - "child%2Fpart.js", - "child%2fpart.js", - "child%252Fpart.js", - "sp%20ace.js", - "%C3%A9.js", - "child/%E0.js", - ]); - - expect(Object.fromEntries(scripts)).toEqual({ - "child/part.js": mappedLocation("child/part.js"), - "child/part.js?v=%2F#f%2F": mappedLocation("child/part.js"), - "child%2Fpart.js": unmappedLocation, - "child%2fpart.js": unmappedLocation, - "child%252Fpart.js": mappedLocation("child%2Fpart.js"), - "sp%20ace.js": mappedLocation("sp ace.js"), - "%C3%A9.js": mappedLocation("é.js"), - "child/%E0.js": unmappedLocation, - }); - }, - INTEGRATION_TEST_TIMEOUT_MS, -); - -it( - "keeps static load state unknown beneath a prefix whose runtime script had no artifact path", - async () => { - const root = await createTestTempDirectory("rea-url-prefix-load-state-"); - temporary.push(root); - await mkdir(join(root, "child")); - await Promise.all([ - writeFile(join(root, "child", "part.js"), "export const nested = 1;\n"), - writeFile(join(root, "other.js"), "export const other = 2;\n"), - ]); - const analysis = await analyzeFixture(root); - - const control = await reconcileThroughCli(root, analysis, ["other.js"]); - expect(Object.fromEntries(control.loadStates)).toEqual({ - "child/part.js": { - status: "not-observed-in-capture", - reason: "not-observed-in-bounded-capture", - }, - "other.js": { - status: "loaded", - reason: "runtime-script-correspondence", - }, - }); - - const encoded = await reconcileThroughCli(root, analysis, [ - "other.js", - "child%2Fpart.js", - ]); - expect(encoded.scripts.get("child%2Fpart.js")).toEqual(unmappedLocation); - expect(Object.fromEntries(encoded.loadStates)).toEqual({ - "child/part.js": { - status: "unknown", - reason: "static-or-runtime-coverage-incomplete", - }, - "other.js": { - status: "loaded", - reason: "runtime-script-correspondence", - }, - }); - }, - INTEGRATION_TEST_TIMEOUT_MS, -); + const encoded = await reconcileThroughCli(root, analysis, [ + "other.js", + "child%2Fpart.js", + ]); + expect(encoded.scripts.get("child%2Fpart.js")).toEqual(unmappedLocation); + expect(Object.fromEntries(encoded.loadStates)).toEqual({ + "child/part.js": { + status: "unknown", + reason: "static-or-runtime-coverage-incomplete", + }, + "other.js": { + status: "loaded", + reason: "runtime-script-correspondence", + }, + }); +}); diff --git a/tests/boundary/cli/skillSync.test.ts b/tests/boundary/cli/skillSync.test.ts index 5024ccd2f2..c78969b69c 100644 --- a/tests/boundary/cli/skillSync.test.ts +++ b/tests/boundary/cli/skillSync.test.ts @@ -4,8 +4,6 @@ import { describe, expect } from "vitest"; import { workspaceCliTest } from "../../support/cli/workspaceCliFixture.js"; -const CLI_INTEGRATION_TIMEOUT_MS = 60_000; - describe("CLI skill lifecycle boundary", () => { workspaceCliTest( "does not expose the unmanaged Incur skill generator", @@ -25,6 +23,5 @@ describe("CLI skill lifecycle boundary", () => { expect(result.stdout).toContain("COMMAND_NOT_FOUND"); await expect(readdir(workspace.home)).resolves.toEqual([]); }, - CLI_INTEGRATION_TIMEOUT_MS, ); }); diff --git a/tests/boundary/filesystem/appleXmlDeclarations.test.ts b/tests/boundary/filesystem/appleXmlDeclarations.test.ts index df8a1676a5..1f916a017c 100644 --- a/tests/boundary/filesystem/appleXmlDeclarations.test.ts +++ b/tests/boundary/filesystem/appleXmlDeclarations.test.ts @@ -40,7 +40,7 @@ it("preflights repeated unterminated quoted declarations without suffix rescans" expected: number; }; expect(result.observed.estimatedBytes).toBe(result.expected); -}, 10000); +}); const fixture = async (declaration: string) => { const bundlePath = await createTestTempDirectory("rea-xml-declaration-"); diff --git a/tests/boundary/filesystem/artifactComparison.test.ts b/tests/boundary/filesystem/artifactComparison.test.ts index 5cdf91d12e..716d2056f9 100644 --- a/tests/boundary/filesystem/artifactComparison.test.ts +++ b/tests/boundary/filesystem/artifactComparison.test.ts @@ -567,7 +567,7 @@ describe("artifact comparison completeness", () => { summary: { unchanged: 502, unknown: 0 }, changes: [], }); - }, 15_000); + }); }); it.runIf(process.platform !== "win32" && process.getuid?.() !== 0)( @@ -974,7 +974,7 @@ describe("artifact comparison fragment integrity", () => { issues: [expect.objectContaining({ path: ["left"] })], }), ); - }, 15_000); + }); it("rejects non-inventory and tampered Evidence", async () => { const root = await createTestTempDirectory("rea-artifact-invalid-"); diff --git a/tests/boundary/filesystem/asarStreamingAllocation.test.ts b/tests/boundary/filesystem/asarStreamingAllocation.test.ts index 9eee454386..433a81302a 100644 --- a/tests/boundary/filesystem/asarStreamingAllocation.test.ts +++ b/tests/boundary/filesystem/asarStreamingAllocation.test.ts @@ -840,6 +840,5 @@ describe("ASAR entry streaming", () => { await reader.close(); } }, - 120_000, ); }); diff --git a/tests/boundary/filesystem/cliJsonInput.test.ts b/tests/boundary/filesystem/cliJsonInput.test.ts index 8f80d020ec..b569757680 100644 --- a/tests/boundary/filesystem/cliJsonInput.test.ts +++ b/tests/boundary/filesystem/cliJsonInput.test.ts @@ -490,7 +490,6 @@ describe("CLI JSON stdin cancellation and encoding", () => { expect(stream.destroyed).toBe(true); expect(getEventListeners(controller.signal, "abort")).toHaveLength(0); }, - 1_000, ); it.each([ diff --git a/tests/boundary/filesystem/dependencyInstall.test.ts b/tests/boundary/filesystem/dependencyInstall.test.ts index 2dd9a542df..3132de1a6d 100644 --- a/tests/boundary/filesystem/dependencyInstall.test.ts +++ b/tests/boundary/filesystem/dependencyInstall.test.ts @@ -140,7 +140,7 @@ describe("dependency install freshness", () => { const cached = await runTurbo(root); expect(cached.status, cached.stderr).toBe(0); expect(`${cached.stdout}${cached.stderr}`).toMatch(/cache hit/u); - }, 60_000); + }); it("preserves caller resource controls in strict cached builds without hashing their values", async () => { const root = await createBuildCacheFixture(); @@ -173,7 +173,7 @@ describe("dependency install freshness", () => { expect(cached.status, `${cached.stdout}${cached.stderr}`).toBe(0); expect(`${cached.stdout}${cached.stderr}`).toMatch(/cache hit/u); expect(`${cached.stdout}${cached.stderr}`).not.toMatch(/cache miss/u); - }, 60_000); + }); }); const createBuildCacheFixture = async (): Promise => { diff --git a/tests/boundary/filesystem/installScript.test.ts b/tests/boundary/filesystem/installScript.test.ts index d21815c72b..b55a769bbd 100644 --- a/tests/boundary/filesystem/installScript.test.ts +++ b/tests/boundary/filesystem/installScript.test.ts @@ -31,7 +31,7 @@ const UNSUPPORTED_NODE_RECOVERY_LINUX_X64 = " https://nodejs.org/dist/latest-v24.x/ (grab the linux-x64 tarball)\n" + "Then rerun this installer.\n"; -describe("installer Node.js admission", { timeout: 20_000 }, () => { +describe("installer Node.js admission", () => { it.each(["22.23.4", "24.22.1", "26.12.1", "26.13.0", "24.22.1+build.5"])( "accepts supported Node %s without installing or replacing it", async (version) => { @@ -71,7 +71,7 @@ describe("installer Node.js admission", { timeout: 20_000 }, () => { }); }); -describe("curl installer scenarios", { timeout: 20_000 }, () => { +describe("curl installer scenarios", () => { it("installs only a pinned REA CLI with closed stdin", async () => { const fixture = await createFixture(); const result = await runInstaller(fixture, ["--version", "0.3.0"]); @@ -194,7 +194,7 @@ describe("curl installer scenarios", { timeout: 20_000 }, () => { }); }); -describe("installer reported version", { timeout: 20_000 }, () => { +describe("installer reported version", () => { it("rejects an empty version from a successful installed command", async () => { const fixture = await createFixture(); await expect( @@ -206,7 +206,7 @@ describe("installer reported version", { timeout: 20_000 }, () => { }); }); -describe("installer TTY fallback", { timeout: 20_000 }, () => { +describe("installer TTY fallback", () => { it("skips automatic setup when stderr is redirected", async () => { const fixture = await createFixture(); const script = join(process.cwd(), "install.sh"); @@ -263,7 +263,7 @@ describe("installer TTY fallback", { timeout: 20_000 }, () => { }); }); -describe("truncated installer download", { timeout: 20_000 }, () => { +describe("truncated installer download", () => { it("runs nothing from a download truncated after the npm install line", async () => { const fixture = await createFixture(); const source = await readFile(join(process.cwd(), "install.sh"), "utf8"); @@ -295,7 +295,7 @@ describe("truncated installer download", { timeout: 20_000 }, () => { describe( "installer download truncated at any byte", { - timeout: 180_000, + tags: ["long-running"], }, () => { // Every prefix of the script, from the empty download to the full file, as @@ -356,7 +356,7 @@ describe( }, ); -describe("Linux user-prefix installer", { timeout: 20_000 }, () => { +describe("Linux user-prefix installer", () => { it("prints the executed arguments as a reusable command with shell metacharacters", async () => { const fixture = await createFixture(); const home = join(fixture.home, "home with 'quotes' $cash; [glob]"); @@ -392,7 +392,7 @@ describe("Linux user-prefix installer", { timeout: 20_000 }, () => { }); }); -describe("native macOS installer", { timeout: 20_000 }, () => { +describe("native macOS installer", () => { it("installs on Darwin with an empty prefix argument array", async () => { const fixture = await createFixture(); const result = await runInstaller(fixture, ["--version", "0.3.0"], { @@ -411,7 +411,7 @@ describe("native macOS installer", { timeout: 20_000 }, () => { }); }); -describe("installer semantic version parsing", { timeout: 20_000 }, () => { +describe("installer semantic version parsing", () => { it("rejects an explicitly empty version instead of selecting latest", async () => { const fixture = await createFixture(); await expect( diff --git a/tests/boundary/filesystem/interfaceBuilderBundle.test.ts b/tests/boundary/filesystem/interfaceBuilderBundle.test.ts index cc88f4864e..1e2006c562 100644 --- a/tests/boundary/filesystem/interfaceBuilderBundle.test.ts +++ b/tests/boundary/filesystem/interfaceBuilderBundle.test.ts @@ -663,7 +663,6 @@ describe("keyed archive hierarchy coverage", () => { analysis.graph.edges.filter(({ relation }) => relation === "contains"), ).toHaveLength(41); }, - 120_000, ); }); diff --git a/tests/boundary/filesystem/javascriptArtifactReconstruction.test.ts b/tests/boundary/filesystem/javascriptArtifactReconstruction.test.ts index 756d92f59f..4f4dc0435b 100644 --- a/tests/boundary/filesystem/javascriptArtifactReconstruction.test.ts +++ b/tests/boundary/filesystem/javascriptArtifactReconstruction.test.ts @@ -383,7 +383,7 @@ it("retains every repeated content observation and containment path", async () = truncated: false, omitted_count: 0, }); -}, 15_000); +}); it("rejects NUL paths through the public request contract before reconstruction", async () => { const input = { input_path: "invalid\u0000.asar" }; diff --git a/tests/boundary/filesystem/productCatalog.test.ts b/tests/boundary/filesystem/productCatalog.test.ts index a0ab49b9f5..ee86acba34 100644 --- a/tests/boundary/filesystem/productCatalog.test.ts +++ b/tests/boundary/filesystem/productCatalog.test.ts @@ -121,7 +121,7 @@ describe("canonical product catalog", () => { await readFile("docs/public/product-catalog.json", "utf8"), ); await expect(documentationFactIssues(root, catalog)).resolves.toEqual([]); - }, 60_000); + }); }); describe("canonical CLI catalog", () => { @@ -129,7 +129,7 @@ describe("canonical CLI catalog", () => { const inventory = createCliInventory(createCli()); expect(inventory.primary).toEqual([...CLI_COMMAND_NAMES].sort()); expect(inventory.aliases).toEqual([]); - }, 30_000); + }); it("describes every primary command argument and option", () => { expect(cliCommandDescriptionIssues(createCli())).toEqual([]); diff --git a/tests/boundary/filesystem/releaseExposure.test.ts b/tests/boundary/filesystem/releaseExposure.test.ts index 24e10c0880..afd8ef246f 100644 --- a/tests/boundary/filesystem/releaseExposure.test.ts +++ b/tests/boundary/filesystem/releaseExposure.test.ts @@ -340,5 +340,5 @@ describe("release exposure ASAR header admission", () => { } finally { await lowered.close(); } - }, 60_000); + }); }); diff --git a/tests/boundary/filesystem/undeliveredSourceClosure.test.ts b/tests/boundary/filesystem/undeliveredSourceClosure.test.ts index ae7444d84b..cf4ae0afa7 100644 --- a/tests/boundary/filesystem/undeliveredSourceClosure.test.ts +++ b/tests/boundary/filesystem/undeliveredSourceClosure.test.ts @@ -243,7 +243,6 @@ it.each(["final-close cancellation", "missing sources"] as const)( }); expect(jsonByteLength(closure)).toBeLessThan(16 * 1024); }, - 60_000, ); it("reports a data-sized link set cited by the observation itself", async () => { @@ -264,7 +263,7 @@ it("reports a data-sized link set cited by the observation itself", async () => ); expect(closure.omitted_count).toBe(DATA_SIZED_LINKS); expect(closure.omitted).toHaveLength(64); -}, 60_000); +}); it("examines repeated links once across every captured source", async () => { const root = await createTestTempDirectory("rea-closure-dedupe-"); @@ -288,7 +287,7 @@ it("examines repeated links once across every captured source", async () => { ); expect(closure.records).toEqual([shared]); expect(closure.omitted_count).toBe(2); -}, 60_000); +}); it.each([ ["a captured source", "captured"], diff --git a/tests/boundary/filesystem/wideDirectoryTraversal.test.ts b/tests/boundary/filesystem/wideDirectoryTraversal.test.ts index 5e2c18a39f..4df1f1fdb5 100644 --- a/tests/boundary/filesystem/wideDirectoryTraversal.test.ts +++ b/tests/boundary/filesystem/wideDirectoryTraversal.test.ts @@ -54,10 +54,10 @@ describe("directory traversal of a parent wider than call arguments allow", () = workspace = await createTestWorkspace("rea-wide-directory-"); root = await workspace.mkdir("tree"); for (const name of childNames()) mkdirSync(join(root, name)); - }, 60_000); + }); afterAll(async () => { if (workspace !== undefined) await removeTestWorkspace(workspace.root); - }, 60_000); + }); it("schedules the artifact reader's children within the selected entry budget", async () => { // Cancel once the parent listing is complete. The next cancellation @@ -84,7 +84,7 @@ describe("directory traversal of a parent wider than call arguments allow", () = examinedEntries: 2_000, maximumEntries: 2_000, }); - }, 60_000); + }); it.skipIf(process.platform === "win32")( "reads every child directory into the reference-source inventory", @@ -100,6 +100,5 @@ describe("directory traversal of a parent wider than call arguments allow", () = ).toEqual([]); expect(missingChildren(entries.map(({ path }) => path))).toEqual([]); }, - 120_000, ); }); diff --git a/tests/boundary/filesystem/windowsNpxRegistration.test.ts b/tests/boundary/filesystem/windowsNpxRegistration.test.ts index 1e52a5f643..ae67a8af3b 100644 --- a/tests/boundary/filesystem/windowsNpxRegistration.test.ts +++ b/tests/boundary/filesystem/windowsNpxRegistration.test.ts @@ -234,5 +234,4 @@ it.skipIf(process.platform !== "win32")( await transport.close(); } }, - 30_000, ); diff --git a/tests/boundary/javascript-recovery/wakaruOwnedCommand.test.ts b/tests/boundary/javascript-recovery/wakaruOwnedCommand.test.ts index c3ba0d2685..a5f6d2a503 100644 --- a/tests/boundary/javascript-recovery/wakaruOwnedCommand.test.ts +++ b/tests/boundary/javascript-recovery/wakaruOwnedCommand.test.ts @@ -118,5 +118,4 @@ it.skipIf(process.platform === "win32").each([ } } }, - 15_000, ); diff --git a/tests/boundary/javascript/asyncChunkCapacity.test.ts b/tests/boundary/javascript/asyncChunkCapacity.test.ts index f9bb088112..1296bd243a 100644 --- a/tests/boundary/javascript/asyncChunkCapacity.test.ts +++ b/tests/boundary/javascript/asyncChunkCapacity.test.ts @@ -38,4 +38,4 @@ it("retains a wide factory's async keys before normalizing the registration", () end: { line: 1, column: start + factory.length }, }, }); -}, 30_000); +}); diff --git a/tests/boundary/javascript/javascriptSourceAnalysisWorker.test.ts b/tests/boundary/javascript/javascriptSourceAnalysisWorker.test.ts index 2227bbf703..120efbeb61 100644 --- a/tests/boundary/javascript/javascriptSourceAnalysisWorker.test.ts +++ b/tests/boundary/javascript/javascriptSourceAnalysisWorker.test.ts @@ -860,7 +860,7 @@ it("retains legacy routes and a bounded route-fact prefix inside one checkpoint } finally { await worker.close(); } -}, 60000); +}); it("keeps wrapped route ancestry, navigation and unknown named parents in the real worker", async () => { const worker = new JavaScriptAnalysisWorker({ diff --git a/tests/boundary/javascript/nativeTypeBindings.test.ts b/tests/boundary/javascript/nativeTypeBindings.test.ts index 783dc9f9ee..9c73059ee1 100644 --- a/tests/boundary/javascript/nativeTypeBindings.test.ts +++ b/tests/boundary/javascript/nativeTypeBindings.test.ts @@ -87,7 +87,7 @@ it("does not request native-addon members from erased TypeScript names", async ( value.graph.nodes.filter((node) => node.kind === "native-export")[0] ?.observations[0]?.properties.requested_members, ).toEqual(["load"]); -}, 30_000); +}); it.each(["node", "NODE", "Node"])( "keeps path spelling while classifying .%s native requests", @@ -141,5 +141,4 @@ it.each(["node", "NODE", "Node"])( }), ); }, - 30_000, ); diff --git a/tests/boundary/mcp/androidPackageSummaryMcp.test.ts b/tests/boundary/mcp/androidPackageSummaryMcp.test.ts index 2789c30b56..b9eb64f367 100644 --- a/tests/boundary/mcp/androidPackageSummaryMcp.test.ts +++ b/tests/boundary/mcp/androidPackageSummaryMcp.test.ts @@ -409,7 +409,6 @@ it.skipIf(process.platform === "win32")( await harness.close(); await verifyJadxFixtureCleanup(launches); }, - 30000, ); it("preserves partial/unknown declarations and Unicode text while rejecting missing APK identity and malformed source", async () => { diff --git a/tests/boundary/mcp/applicationExportShapeMcp.test.ts b/tests/boundary/mcp/applicationExportShapeMcp.test.ts index a3c8cfe00a..2146aed223 100644 --- a/tests/boundary/mcp/applicationExportShapeMcp.test.ts +++ b/tests/boundary/mcp/applicationExportShapeMcp.test.ts @@ -474,7 +474,7 @@ ${returnSites} left_omitted_fields: 0, right_omitted_fields: 0, }); - }, 30_000); + }); }); const analyzeSourceEvidence = async (source: string) => { diff --git a/tests/boundary/mcp/artifactInspectionCoverageMcp.test.ts b/tests/boundary/mcp/artifactInspectionCoverageMcp.test.ts index e1a6a48b4e..aa1f277ff6 100644 --- a/tests/boundary/mcp/artifactInspectionCoverageMcp.test.ts +++ b/tests/boundary/mcp/artifactInspectionCoverageMcp.test.ts @@ -71,7 +71,6 @@ describe.skipIf(process.platform === "win32")( }, ] as const)( "derives inspection and summary coverage from inventory traversal (FIFO: $withFifo)", - { timeout: 30_000 }, async ({ withFifo, status, sourceCoverage }, { mcp, onTestFinished }) => { const path = await writeBundle(withFifo); const { client, outputSchema } = await connect(mcp, onTestFinished); diff --git a/tests/boundary/mcp/artifactMcp.test.ts b/tests/boundary/mcp/artifactMcp.test.ts index 0c02df9834..f1582cbf34 100644 --- a/tests/boundary/mcp/artifactMcp.test.ts +++ b/tests/boundary/mcp/artifactMcp.test.ts @@ -120,7 +120,6 @@ it.for([ { unpacked: true, label: "unpacked" }, ])( "returns actionable local details for an $label ASAR integrity error", - { timeout: 20_000 }, async ({ unpacked }, { mcp, onTestFinished }) => { const root = await createTestTempDirectory("rea-asar-integrity-mcp-"); const source = join(root, "source"); diff --git a/tests/boundary/mcp/binaryHardeningMcp.test.ts b/tests/boundary/mcp/binaryHardeningMcp.test.ts index f1c61c8fc9..307ae2c03b 100644 --- a/tests/boundary/mcp/binaryHardeningMcp.test.ts +++ b/tests/boundary/mcp/binaryHardeningMcp.test.ts @@ -64,7 +64,6 @@ mcpTest( await session.close(); } }, - 60_000, ); mcpTest( @@ -108,5 +107,4 @@ mcpTest( await session.close(); } }, - 60_000, ); diff --git a/tests/boundary/mcp/browserMcp.test.ts b/tests/boundary/mcp/browserMcp.test.ts index 3f5b33ea96..7ec5149c40 100644 --- a/tests/boundary/mcp/browserMcp.test.ts +++ b/tests/boundary/mcp/browserMcp.test.ts @@ -43,7 +43,6 @@ afterAll(async () => { schemaValidation.clear(); } }); -const INTEGRATION_TEST_TIMEOUT_MS = 20_000; it("preserves Link parameter order and context through the advertised MCP contract", async () => { const links = [ @@ -280,7 +279,6 @@ cliTest( }, }); }, - INTEGRATION_TEST_TIMEOUT_MS, ); afterEach(() => resources.retryCleanup()); @@ -328,122 +326,118 @@ it("closes the browser and retains failed MCP and session cleanup for retry", as } }); -it( - "exposes CLI-equivalent Evidence results and session tools", - async () => { - const browser = await startFakeCdpBrowser({ - sessionTimeline: "same_origin", - webMcpTools: true, - sensitiveShapes: true, - eventsBeforeReply: ["Network.enable"], - }); - retainBrowser(browser); - const connected = await connectBrowser(); +it("exposes CLI-equivalent Evidence results and session tools", async () => { + const browser = await startFakeCdpBrowser({ + sessionTimeline: "same_origin", + webMcpTools: true, + sensitiveShapes: true, + eventsBeforeReply: ["Network.enable"], + }); + retainBrowser(browser); + const connected = await connectBrowser(); - const tools = await connected.client.listTools(); - expect(tools.tools).toHaveLength(TOOL_CONTRACTS.length); - expect(tools.tools.map(({ name }) => name)).toEqual( - expect.arrayContaining([ - "list_browser_targets", - "inspect_web_page", - "analyze_web_bundle", - "observe_web_session", - "discover_webmcp_tools", - "compare_web_captures", - "capture_web_screenshot", - "compare_web_screenshots", - ]), - ); - const status = await connected.client.callTool({ - name: "binary_session", - arguments: {}, - }); - const sessionStatus = toolContract("binary_session").outputSchema.parse( - status.structuredContent, - ); - const availability = expandToolAvailability( - sessionStatus.result.tool_availability, - ); - expect(availability).toContainEqual( - expect.objectContaining({ - name: "inspect_web_page", - reason: expect.any(String), - }), - ); - const listed = await connected.client.callTool({ - name: "list_browser_targets", - arguments: { - cdp_endpoint: browser.endpoint, - }, - }); - expect(listed.isError).not.toBe(true); - expect(listed.structuredContent).toMatchObject({ - normalized_result: { - targets: expect.arrayContaining([ - expect.objectContaining({ target_id: "allowed-page" }), - ]), - }, - }); - const inspected = await connected.client.callTool({ + const tools = await connected.client.listTools(); + expect(tools.tools).toHaveLength(TOOL_CONTRACTS.length); + expect(tools.tools.map(({ name }) => name)).toEqual( + expect.arrayContaining([ + "list_browser_targets", + "inspect_web_page", + "analyze_web_bundle", + "observe_web_session", + "discover_webmcp_tools", + "compare_web_captures", + "capture_web_screenshot", + "compare_web_screenshots", + ]), + ); + const status = await connected.client.callTool({ + name: "binary_session", + arguments: {}, + }); + const sessionStatus = toolContract("binary_session").outputSchema.parse( + status.structuredContent, + ); + const availability = expandToolAvailability( + sessionStatus.result.tool_availability, + ); + expect(availability).toContainEqual( + expect.objectContaining({ name: "inspect_web_page", - arguments: { - cdp_endpoint: browser.endpoint, - target_id: "allowed-page", - observation_ms: 0, - include_console_text: true, - include_json_body_shapes: true, - include_websocket_shapes: true, - include_script_sources: true, + reason: expect.any(String), + }), + ); + const listed = await connected.client.callTool({ + name: "list_browser_targets", + arguments: { + cdp_endpoint: browser.endpoint, + }, + }); + expect(listed.isError).not.toBe(true); + expect(listed.structuredContent).toMatchObject({ + normalized_result: { + targets: expect.arrayContaining([ + expect.objectContaining({ target_id: "allowed-page" }), + ]), + }, + }); + const inspected = await connected.client.callTool({ + name: "inspect_web_page", + arguments: { + cdp_endpoint: browser.endpoint, + target_id: "allowed-page", + observation_ms: 0, + include_console_text: true, + include_json_body_shapes: true, + include_websocket_shapes: true, + include_script_sources: true, + }, + }); + expect(inspected.isError).not.toBe(true); + expect(inspected.structuredContent).toMatchObject({ + normalized_result: { + target: { target_id: "allowed-page" }, + console: { prior_activity_available: false }, + network: { + prior_activity_available: false, + requests: [ + expect.objectContaining({ + body_shapes: expect.objectContaining({ status: "included" }), + }), + ], }, - }); - expect(inspected.isError).not.toBe(true); - expect(inspected.structuredContent).toMatchObject({ - normalized_result: { - target: { target_id: "allowed-page" }, - console: { prior_activity_available: false }, - network: { - prior_activity_available: false, - requests: [ - expect.objectContaining({ - body_shapes: expect.objectContaining({ status: "included" }), - }), - ], - }, - }, - }); - const reconciled = await connected.client.callTool({ - name: "reconcile_javascript_runtime", - arguments: { - static_layers: JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE.static_layers, - runtime_observations: [evidenceFor(inspected.structuredContent)], - }, - }); - expect(reconciled.isError).not.toBe(true); - expect(reconciled.structuredContent).toMatchObject({ - normalized_result: { summary: { runtime_scripts: 1 } }, - }); - expect(JSON.stringify(reconciled.structuredContent)).not.toContain( - "source-secret", - ); - const analyzed = await connected.client.callTool({ - name: "analyze_web_bundle", - arguments: { - cdp_endpoint: browser.endpoint, - target_id: "allowed-page", - observation_ms: 0, - }, - }); - expect(analyzed.isError).not.toBe(true); - expect(analyzed.structuredContent).toMatchObject({ - normalized_result: { - capture: { scripts_analyzed: 1 }, - observations: { source_maps: { status: "not_requested" } }, - }, - }); - await verifySessionAndComparisonTools(connected, browser, inspected); - }, - INTEGRATION_TEST_TIMEOUT_MS, -); + }, + }); + const reconciled = await connected.client.callTool({ + name: "reconcile_javascript_runtime", + arguments: { + static_layers: JAVASCRIPT_RUNTIME_RECONCILIATION_EXAMPLE.static_layers, + runtime_observations: [evidenceFor(inspected.structuredContent)], + }, + }); + expect(reconciled.isError).not.toBe(true); + expect(reconciled.structuredContent).toMatchObject({ + normalized_result: { summary: { runtime_scripts: 1 } }, + }); + expect(JSON.stringify(reconciled.structuredContent)).not.toContain( + "source-secret", + ); + const analyzed = await connected.client.callTool({ + name: "analyze_web_bundle", + arguments: { + cdp_endpoint: browser.endpoint, + target_id: "allowed-page", + observation_ms: 0, + }, + }); + expect(analyzed.isError).not.toBe(true); + expect(analyzed.structuredContent).toMatchObject({ + normalized_result: { + capture: { scripts_analyzed: 1 }, + observations: { source_maps: { status: "not_requested" } }, + }, + }); + await verifySessionAndComparisonTools(connected, browser, inspected); +}); const verifySessionAndComparisonTools = async ( connected: Awaited>, diff --git a/tests/boundary/mcp/browserScenarioInputDiagnosticsMcp.test.ts b/tests/boundary/mcp/browserScenarioInputDiagnosticsMcp.test.ts index df1f57ae7c..bc7a4d4cc7 100644 --- a/tests/boundary/mcp/browserScenarioInputDiagnosticsMcp.test.ts +++ b/tests/boundary/mcp/browserScenarioInputDiagnosticsMcp.test.ts @@ -78,7 +78,6 @@ const scenarios = [ cliTest.for(["full", "compact"] as const)( "projects browser scenario input diagnostics over stdio MCP (%s)", - { timeout: 60_000 }, async (profile, { cli }) => { const home = await createTestTempDirectory( "rea-browser-scenario-mcp-home-", diff --git a/tests/boundary/mcp/browserSourceCoordinates.test.ts b/tests/boundary/mcp/browserSourceCoordinates.test.ts index b3aa0acfe8..dcb4c4223c 100644 --- a/tests/boundary/mcp/browserSourceCoordinates.test.ts +++ b/tests/boundary/mcp/browserSourceCoordinates.test.ts @@ -126,7 +126,7 @@ it("reports malformed source coordinates as unknown through MCP", async () => { }, }, }); -}, 20_000); +}); it("keeps a negative column Chrome reports in passive source locations", async () => { const { page, tools } = await inspectSourceCoordinates({ @@ -178,4 +178,4 @@ it("keeps a negative column Chrome reports in passive source locations", async ( }, }, }); -}, 20_000); +}); diff --git a/tests/boundary/mcp/buildCaptureRetryMcp.test.ts b/tests/boundary/mcp/buildCaptureRetryMcp.test.ts index a33daaacc3..cf445a0156 100644 --- a/tests/boundary/mcp/buildCaptureRetryMcp.test.ts +++ b/tests/boundary/mcp/buildCaptureRetryMcp.test.ts @@ -208,7 +208,7 @@ it("releases a capture whose start was cancelled after launch, so another start computer_id: id, }); expect(again.structuredContent).toMatchObject({ package_lists: 1 }); -}, 60_000); +}); it("stops a detached capture when the computer closes", async () => { const { rea, client, computer } = await fakes(); @@ -225,7 +225,7 @@ it("stops a detached capture when the computer closes", async () => { expect(running().length).toBeGreaterThan(0); await computer.close(); expect(running()).toEqual([]); -}, 60_000); +}); it("cancels a capture's start when the computer closes while it waits for the opened app's screenshot", async () => { // The start's own screenshot answers at once; the capture's waits until its request is cancelled. @@ -238,7 +238,7 @@ it("cancels a capture's start when the computer closes while it waits for the op await vi.waitFor(() => expect(screenshots()).toBe(2), { timeout: 30_000 }); await callOk(client, "close_build_computer", { computer_id: id }); expect(parseMcpToolError(await started).error.code).toBe("cancelled"); -}, 60_000); +}); it("reports cancellation and the published bundle when the computer closes during commit", async () => { const { client } = await fakes(); @@ -265,7 +265,7 @@ it("reports cancellation and the published bundle when the computer closes durin }); expect((await readdir(directory)).length).toBeGreaterThan(0); await closed; -}, 60_000); +}); /** Capture and export an app the request installs with `install`; the start's result, the bundle's folder and the stand-in's argv for a command. */ const captureRequest = async ( @@ -496,4 +496,4 @@ it("brings back a bundle whose file list outgrows a command's 1 MiB of output", expect( await readdir(join(directory, "seed", long("a"), long("b"))), ).toHaveLength(1500); -}, 120_000); +}); diff --git a/tests/boundary/mcp/buildComputerMcp.test.ts b/tests/boundary/mcp/buildComputerMcp.test.ts index 121a3a893d..1fa68ac35b 100644 --- a/tests/boundary/mcp/buildComputerMcp.test.ts +++ b/tests/boundary/mcp/buildComputerMcp.test.ts @@ -472,7 +472,7 @@ it("returns the latest frame when a retried screenshot outlasts the wait for the expect(progress.map(({ message }) => message)).toContainEqual( expect.stringContaining("waiting for the desktop to draw"), ); -}, 40_000); +}); it("leaves the bundle folder's files as they were when it starts a computer from it", async () => { const { runner } = await fakes(); @@ -689,7 +689,7 @@ it("runs one computer's calls in the order they arrive and another computer's be "reset", "screenshot behind the reset", ]); -}, 30_000); +}); it("sends progress while an action waits for the call before it on its computer", async () => { const app = slowApp(14); @@ -715,7 +715,7 @@ it("sends progress while an action waits for the call before it on its computer" expect(waited.isError, JSON.stringify(waited)).not.toBe(true); expect(progress.length).toBeGreaterThan(0); await reset; -}, 30_000); +}); it("cancels a computer's call in progress on close and refuses the calls waiting behind it", async () => { const app = slowApp(600); diff --git a/tests/boundary/mcp/buildWitnessMcp.test.ts b/tests/boundary/mcp/buildWitnessMcp.test.ts index 6408120ea8..65802e2209 100644 --- a/tests/boundary/mcp/buildWitnessMcp.test.ts +++ b/tests/boundary/mcp/buildWitnessMcp.test.ts @@ -901,7 +901,7 @@ it("keeps a completed reset when the screenshot after it is cancelled", async () const near = parseMcpToolError(await witness.check({ stage: "near_miss" })); expect(near.error.message).toContain("put the seed back"); expect(witness.app.state).toEqual(lines("milk")); -}, 30_000); +}); it("checks after_reset once the reset sent before it has relaunched the app", async () => { const witness = await witnessed(4); @@ -925,7 +925,7 @@ it("checks after_reset once the reset sent before it has relaunched the app", as outcome: "applied", }); expect(app.methods.slice(-2)).toEqual(["data/reset", "data/get"]); -}, 30_000); +}); it("sends progress while a reset waits for the relaunched app", async () => { const witness = await witnessed(14); @@ -939,7 +939,7 @@ it("sends progress while a reset waits for the relaunched app", async () => { ); expect(reset.isError, JSON.stringify(reset)).not.toBe(true); expect(progress.length).toBeGreaterThan(0); -}, 30_000); +}); /** The shipped timing scaled down a tenfold: a read every 50 ms, a 300 ms window, a 1.5 s bound. */ const SETTLE: SettleTiming = { intervalMs: 50, windowMs: 300, boundMs: 1500 }; diff --git a/tests/boundary/mcp/contractPresentation.test.ts b/tests/boundary/mcp/contractPresentation.test.ts index 0aaf8bd9e9..d1db7f3d79 100644 --- a/tests/boundary/mcp/contractPresentation.test.ts +++ b/tests/boundary/mcp/contractPresentation.test.ts @@ -61,74 +61,70 @@ const resultSchema = z.object({ ), }); -it( - "preserves full advertised schemas and handler meaning when presentation order changes", - { timeout: 70_000 }, - async () => { - const cancellation = new AbortController(); - const command = runOwnedCommand( - { - command: process.execPath, - arguments: [fixture, "reversed"], - runId: randomUUID(), - env: { - ...process.env, - REA_MCP_INPUT_SCHEMA_PROFILE: "full", - REA_MCP_OUTPUT_SCHEMA_PROFILE: "full", - }, - sweepTokenOwnedProcesses: true, +it("preserves full advertised schemas and handler meaning when presentation order changes", async () => { + const cancellation = new AbortController(); + const command = runOwnedCommand( + { + command: process.execPath, + arguments: [fixture, "reversed"], + runId: randomUUID(), + env: { + ...process.env, + REA_MCP_INPUT_SCHEMA_PROFILE: "full", + REA_MCP_OUTPUT_SCHEMA_PROFILE: "full", }, - { - // A prepared full/full catalog run needs about 32s on two CPU cores. - timeoutMs: 60_000, - diagnosticBytes: 16 * 1024 * 1024, - }, - { signal: cancellation.signal }, + sweepTokenOwnedProcesses: true, + }, + { + // A prepared full/full catalog run needs about 32s on two CPU cores. + timeoutMs: 60_000, + diagnosticBytes: 16 * 1024 * 1024, + }, + { signal: cancellation.signal }, + ); + onTestFinished(async () => { + cancellation.abort(); + await command; + }); + const snapshot = await command; + const stdout = snapshot.stdout.text; + const result = resultSchema.parse(JSON.parse(stdout)); + expect(result.catalog).toHaveLength(GENERATED_MCP_TOOL_CATALOG.length); + expect(new Set(result.catalog.map(({ name }) => name))).toEqual( + new Set(GENERATED_MCP_TOOL_CATALOG.map(({ name }) => name)), + ); + for (const advertised of result.catalog) { + const canonical = GENERATED_MCP_TOOL_CATALOG.find( + ({ name }) => name === advertised.name, ); - onTestFinished(async () => { - cancellation.abort(); - await command; - }); - const snapshot = await command; - const stdout = snapshot.stdout.text; - const result = resultSchema.parse(JSON.parse(stdout)); - expect(result.catalog).toHaveLength(GENERATED_MCP_TOOL_CATALOG.length); - expect(new Set(result.catalog.map(({ name }) => name))).toEqual( - new Set(GENERATED_MCP_TOOL_CATALOG.map(({ name }) => name)), - ); - for (const advertised of result.catalog) { - const canonical = GENERATED_MCP_TOOL_CATALOG.find( - ({ name }) => name === advertised.name, - ); - expect(advertised.inputSchema).toEqual(canonical?.inputSchema); - expect(advertised.outputSchema).toEqual(canonical?.outputSchema); + expect(advertised.inputSchema).toEqual(canonical?.inputSchema); + expect(advertised.outputSchema).toEqual(canonical?.outputSchema); + } + expect(result.responses.map(({ name }) => name).sort()).toEqual( + [ + ...BROWSER_TOOL_CONTRACTS, + ...BROWSER_SCENARIO_TOOL_CONTRACTS, + ...ELECTRON_TOOL_CONTRACTS.filter( + ({ name }) => name !== "analyze_javascript_application", + ), + ...JAVASCRIPT_RUNTIME_OBSERVATION_TOOL_CONTRACTS, + ] + .map(({ name }) => name) + .sort(), + ); + for (const { name, response } of result.responses) { + if (!isCallToolResult(response)) + throw new Error(`Invalid tools/call fixture result for ${name}`); + if (name === "reconcile_javascript_runtime") { + expect(response.isError).not.toBe(true); + expect(response.structuredContent).toMatchObject({ + operation: name, + }); + } else { + expect(response.isError, name).toBe(true); + expect(parseMcpToolError(response), name).toMatchObject({ + error: { details: { operation: name } }, + }); } - expect(result.responses.map(({ name }) => name).sort()).toEqual( - [ - ...BROWSER_TOOL_CONTRACTS, - ...BROWSER_SCENARIO_TOOL_CONTRACTS, - ...ELECTRON_TOOL_CONTRACTS.filter( - ({ name }) => name !== "analyze_javascript_application", - ), - ...JAVASCRIPT_RUNTIME_OBSERVATION_TOOL_CONTRACTS, - ] - .map(({ name }) => name) - .sort(), - ); - for (const { name, response } of result.responses) { - if (!isCallToolResult(response)) - throw new Error(`Invalid tools/call fixture result for ${name}`); - if (name === "reconcile_javascript_runtime") { - expect(response.isError).not.toBe(true); - expect(response.structuredContent).toMatchObject({ - operation: name, - }); - } else { - expect(response.isError, name).toBe(true); - expect(parseMcpToolError(response), name).toMatchObject({ - error: { details: { operation: name } }, - }); - } - } - }, -); + } +}); diff --git a/tests/boundary/mcp/dartAotSummaryMcp.test.ts b/tests/boundary/mcp/dartAotSummaryMcp.test.ts index 94d66e0016..70fa9fd11c 100644 --- a/tests/boundary/mcp/dartAotSummaryMcp.test.ts +++ b/tests/boundary/mcp/dartAotSummaryMcp.test.ts @@ -197,7 +197,7 @@ it("honors explicit ABI and old full requests, validates SDK schemas and reuses }); if (!portable.ok) throw portable.error; expect(portable.value.normalized_result).toEqual(view); -}, 30000); +}); it("preserves null snapshot facts and pool lower bounds after exhaustion, rejecting malformed and conflicting identities", async () => { const report = { diff --git a/tests/boundary/mcp/devicetreeMcp.test.ts b/tests/boundary/mcp/devicetreeMcp.test.ts index b7337d7a0a..8fb056b481 100644 --- a/tests/boundary/mcp/devicetreeMcp.test.ts +++ b/tests/boundary/mcp/devicetreeMcp.test.ts @@ -103,8 +103,6 @@ mcpTest( await session.close(); } }, - // Includes SDK schema conversion, dialect validation and two public calls. - 60_000, ); mcpTest( "pages nodes without repeating a large bootargs summary", @@ -166,7 +164,6 @@ mcpTest( await session.close(); } }, - 60_000, ); mcpTest( "keeps a malformed canonical phandle unresolved in retained reference pages", @@ -231,7 +228,6 @@ mcpTest( await session.close(); } }, - 60_000, ); mcpTest("rejects relative paths and unsupported versions", async ({ mcp }) => { const session = createTestBinarySession(() => { diff --git a/tests/boundary/mcp/electronMcp.test.ts b/tests/boundary/mcp/electronMcp.test.ts index bee6486868..51f7f95901 100644 --- a/tests/boundary/mcp/electronMcp.test.ts +++ b/tests/boundary/mcp/electronMcp.test.ts @@ -421,7 +421,7 @@ it("exposes endpoint-scoped Electron discovery and inspection as Evidence", asyn ], }, }); -}, 20_000); +}); /** Create the selected-path aliases and retained IPC-gap capture for the public workflow. */ const activeElectronScenarioFixture = async () => { @@ -614,7 +614,7 @@ it("runs active Electron scenarios with selected paths and inferred working dire ], }, }); -}, 20_000); +}); it("exposes the target-free static JavaScript application workflow", async () => { const root = await createTestTempDirectory("rea-electron-static-mcp-"); diff --git a/tests/boundary/mcp/environmentServeMcp.test.ts b/tests/boundary/mcp/environmentServeMcp.test.ts index ba29ccba49..4ea03ae2fa 100644 --- a/tests/boundary/mcp/environmentServeMcp.test.ts +++ b/tests/boundary/mcp/environmentServeMcp.test.ts @@ -22,7 +22,6 @@ import { type TestProcesses, } from "../../support/process/processFixture.js"; -const HTTP_BOUNDARY_TIMEOUT_MS = 90_000; const CARD_PATH = "/.well-known/agent-env.json"; /** SHA-256 of the 14,519-byte card served for the fixture named "renamed", its descriptions naming each tool's recorded responses; pure replay must serve these bytes. */ const REPLAY_CARD_SHA256 = @@ -89,7 +88,6 @@ processTest( await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); processTest( @@ -123,7 +121,6 @@ processTest( await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); processTest( @@ -153,7 +150,6 @@ processTest( await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); processTest( @@ -199,7 +195,6 @@ processTest( await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); describe("rea environment-serve --replay-only", () => { @@ -264,7 +259,6 @@ describe("rea environment-serve --replay-only", () => { await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); processTest( @@ -307,7 +301,6 @@ describe("rea environment-serve --replay-only", () => { }); expect(started.stderr()).toContain('"transport":"streamable-http"'); }, - HTTP_BOUNDARY_TIMEOUT_MS, ); }); @@ -426,6 +419,5 @@ describe("rea environment-serve", () => { await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); }); diff --git a/tests/boundary/mcp/environmentServeWritesMcp.test.ts b/tests/boundary/mcp/environmentServeWritesMcp.test.ts index c6c9fdfcb0..abfa5edf7d 100644 --- a/tests/boundary/mcp/environmentServeWritesMcp.test.ts +++ b/tests/boundary/mcp/environmentServeWritesMcp.test.ts @@ -37,8 +37,6 @@ import { type JsonValue, } from "../../../src/domain/jsonValue.js"; -const HTTP_BOUNDARY_TIMEOUT_MS = 90_000; - /** The book the first served create of "Boundary Book" makes: one second past the served clock's start. */ const BOUNDARY_BOOK = book(3, "Boundary Book", bookClock(13)); @@ -160,7 +158,6 @@ processTest( await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); processTest( @@ -220,7 +217,6 @@ processTest( await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); processTest( @@ -357,7 +353,6 @@ processTest( await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); describe("rea environment-serve write tools", () => { @@ -428,7 +423,6 @@ describe("rea environment-serve write tools", () => { await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); processTest( @@ -504,7 +498,6 @@ describe("rea environment-serve write tools", () => { await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); }); @@ -597,7 +590,6 @@ processTest( await client.close(); } }, - HTTP_BOUNDARY_TIMEOUT_MS, ); processTest.for([ @@ -619,7 +611,6 @@ processTest.for([ })), ])( "withholds $label from public tools", - { timeout: HTTP_BOUNDARY_TIMEOUT_MS }, async ({ rows, read, write }, { processes }) => { const root = await createTestTempDirectory("rea-create-reference-mcp-"); const files = await writeEnvironmentServeFiles( diff --git a/tests/boundary/mcp/erlangBeamMcp.test.ts b/tests/boundary/mcp/erlangBeamMcp.test.ts index 0d57115c11..e9e04144b3 100644 --- a/tests/boundary/mcp/erlangBeamMcp.test.ts +++ b/tests/boundary/mcp/erlangBeamMcp.test.ts @@ -206,5 +206,4 @@ mcpTest( await session.close(); } }, - 60_000, ); diff --git a/tests/boundary/mcp/espImageMcp.test.ts b/tests/boundary/mcp/espImageMcp.test.ts index 34cc035ab0..bc15db92ea 100644 --- a/tests/boundary/mcp/espImageMcp.test.ts +++ b/tests/boundary/mcp/espImageMcp.test.ts @@ -111,5 +111,4 @@ it.each(["full", "compact"] as const)( await rm(outputRoot, { recursive: true, force: true }); } }, - 60_000, ); diff --git a/tests/boundary/mcp/evidenceRetentionRecovery.test.ts b/tests/boundary/mcp/evidenceRetentionRecovery.test.ts index 17a9b16122..0d30615509 100644 --- a/tests/boundary/mcp/evidenceRetentionRecovery.test.ts +++ b/tests/boundary/mcp/evidenceRetentionRecovery.test.ts @@ -201,7 +201,7 @@ it("keeps an oversized unretained observation failure bounded and the connection await server.close(); await session.close(); } -}, 120000); +}); it("bounds fallback when the retention error itself has oversized diagnostics", async () => { const records = new InvestigationRecords({ maximumRepresentationBytes: 0 }); @@ -257,4 +257,4 @@ it("bounds fallback when the retention error itself has oversized diagnostics", await client.close(); await server.close(); } -}, 120000); +}); diff --git a/tests/boundary/mcp/gdbRetirementCancellation.test.ts b/tests/boundary/mcp/gdbRetirementCancellation.test.ts index 54e0e41c43..d8aabbd45a 100644 --- a/tests/boundary/mcp/gdbRetirementCancellation.test.ts +++ b/tests/boundary/mcp/gdbRetirementCancellation.test.ts @@ -25,122 +25,111 @@ import { createTestBinarySession, } from "../../fixtures/binarySession.js"; -it( - "compares cancellation before dispatch, during retirement, and an uncancelled control", - { timeout: 8000 }, - async () => { - for (const mode of [ - "pre-aborted", - "during-retirement", - "control", - ] as const) { - const [target] = await createBinarySessionTargets(); - const entered = createDeferred(); - const released = createDeferred(); - let closes = 0; - const session = createTestBinarySession( - () => - ({ - execute: async () => ok({ operation: "health", value: null }), - close: async () => { - closes++; - entered.resolve(); - await released.promise; - return ok(null); - }, - }) as never, +it("compares cancellation before dispatch, during retirement, and an uncancelled control", async () => { + for (const mode of ["pre-aborted", "during-retirement", "control"] as const) { + const [target] = await createBinarySessionTargets(); + const entered = createDeferred(); + const released = createDeferred(); + let closes = 0; + const session = createTestBinarySession( + () => + ({ + execute: async () => ok({ operation: "health", value: null }), + close: async () => { + closes++; + entered.resolve(); + await released.promise; + return ok(null); + }, + }) as never, + ); + expect((await session.open(target)).ok).toBe(true); + const id = "00000000-0000-4000-8000-000000000001"; + const evidence = createEvidence( + undefined, + { id: "gdb", name: "GDB", version: null }, + { + predicateType: "rea.debugger.command-observation", + operation: "gdb_console", + parameters: { session_id: id, command: "info files" }, + result: { command: "info files", completion_status: "complete" }, + rawResult: { command: "info files" }, + }, + ); + let handler!: (input: unknown, context: unknown) => Promise; + const server = { + registerTool(name: string, _options: unknown, fn: typeof handler) { + if (name === "gdb_console") handler = fn; + }, + } as unknown as McpServer; + const execute = vi.fn(async () => ok({ evidence })); + const manager = { + execute, + retryCleanupFailures: async () => ok(null), + } as unknown as GdbToolManager; + const record = vi.fn((value: typeof evidence) => + session.recordEvidence(value), + ); + registerGdbTools( + server, + manager, + silentLogger, + createToolResultDelivery(undefined), + record, + session, + ); + const controller = new AbortController(); + const reason = { phase: mode }; + if (mode === "pre-aborted") controller.abort(reason); + try { + const pending = handler( + { session_id: id, command: "info files", detail: "complete" }, + { mcpReq: { signal: controller.signal } }, ); - expect((await session.open(target)).ok).toBe(true); - const id = "00000000-0000-4000-8000-000000000001"; - const evidence = createEvidence( - undefined, - { id: "gdb", name: "GDB", version: null }, - { - predicateType: "rea.debugger.command-observation", - operation: "gdb_console", - parameters: { session_id: id, command: "info files" }, - result: { command: "info files", completion_status: "complete" }, - rawResult: { command: "info files" }, - }, - ); - let handler!: ( - input: unknown, - context: unknown, - ) => Promise; - const server = { - registerTool(name: string, _options: unknown, fn: typeof handler) { - if (name === "gdb_console") handler = fn; - }, - } as unknown as McpServer; - const execute = vi.fn(async () => ok({ evidence })); - const manager = { - execute, - retryCleanupFailures: async () => ok(null), - } as unknown as GdbToolManager; - const record = vi.fn((value: typeof evidence) => - session.recordEvidence(value), - ); - registerGdbTools( - server, - manager, - silentLogger, - createToolResultDelivery(undefined), - record, - session, - ); - const controller = new AbortController(); - const reason = { phase: mode }; - if (mode === "pre-aborted") controller.abort(reason); - try { - const pending = handler( - { session_id: id, command: "info files", detail: "complete" }, - { mcpReq: { signal: controller.signal } }, + if (mode !== "pre-aborted") { + await awaitAcknowledgement( + entered.promise, + pending, + "session retirement", ); - if (mode !== "pre-aborted") { - await awaitAcknowledgement( - entered.promise, - pending, - "session retirement", - ); - expect(execute).toHaveBeenCalledTimes(1); - expect(record).not.toHaveBeenCalled(); - if (mode === "during-retirement") controller.abort(reason); - } - released.resolve(); - const result = await pending; - const body = result.structuredContent as any; - const observation = { - mode, - aborted: controller.signal.aborted, - executions: execute.mock.calls.length, - retirementCloses: closes, - recordings: record.mock.calls.length, - isError: result.isError === true, - code: body.error?.code ?? null, - hasEvidence: typeof body.evidence_id === "string", - stored: session.hasEvidence(evidence.evidence_id), - }; - expect(observation).toEqual({ - mode, - aborted: mode !== "control", - executions: mode === "pre-aborted" ? 0 : 1, - retirementCloses: mode === "pre-aborted" ? 0 : 1, - recordings: mode === "pre-aborted" ? 0 : 1, - isError: mode !== "control", - code: mode === "control" ? null : "cancelled", - hasEvidence: mode === "control", - stored: mode !== "pre-aborted", - }); - - if (mode === "during-retirement") - expect(record.mock.calls[0]?.[0]).toEqual(evidence); - } finally { - released.resolve(); - await session.close(); + expect(execute).toHaveBeenCalledTimes(1); + expect(record).not.toHaveBeenCalled(); + if (mode === "during-retirement") controller.abort(reason); } + released.resolve(); + const result = await pending; + const body = result.structuredContent as any; + const observation = { + mode, + aborted: controller.signal.aborted, + executions: execute.mock.calls.length, + retirementCloses: closes, + recordings: record.mock.calls.length, + isError: result.isError === true, + code: body.error?.code ?? null, + hasEvidence: typeof body.evidence_id === "string", + stored: session.hasEvidence(evidence.evidence_id), + }; + expect(observation).toEqual({ + mode, + aborted: mode !== "control", + executions: mode === "pre-aborted" ? 0 : 1, + retirementCloses: mode === "pre-aborted" ? 0 : 1, + recordings: mode === "pre-aborted" ? 0 : 1, + isError: mode !== "control", + code: mode === "control" ? null : "cancelled", + hasEvidence: mode === "control", + stored: mode !== "pre-aborted", + }); + + if (mode === "during-retirement") + expect(record.mock.calls[0]?.[0]).toEqual(evidence); + } finally { + released.resolve(); + await session.close(); } - }, -); + } +}); it.each(["completed", "failed"] as const)( "preserves a %s command and cleanup ownership when cancellation overlaps failed retirement", diff --git a/tests/boundary/mcp/ghidraCompactReferencesMcp.test.ts b/tests/boundary/mcp/ghidraCompactReferencesMcp.test.ts index 980366ea12..468967b423 100644 --- a/tests/boundary/mcp/ghidraCompactReferencesMcp.test.ts +++ b/tests/boundary/mcp/ghidraCompactReferencesMcp.test.ts @@ -61,7 +61,7 @@ describe("compact Ghidra reference MCP evidence", () => { } finally { await harness.close(); } - }, 30_000); + }); it("preserves empty references and unresolved targets without manufacturing provenance", async () => { const outputs = { @@ -107,7 +107,7 @@ describe("compact Ghidra reference MCP evidence", () => { } finally { await harness.close(); } - }, 30_000); + }); it("preserves ARM TMode and Thumb decoder context across the MCP boundary", async () => { const instructionWithContext = (value: string | null) => ({ @@ -148,5 +148,5 @@ describe("compact Ghidra reference MCP evidence", () => { await harness.close(); } } - }, 30_000); + }); }); diff --git a/tests/boundary/mcp/ghidraDecompileDeadlineLifetime.test.ts b/tests/boundary/mcp/ghidraDecompileDeadlineLifetime.test.ts index 59104ae2ed..227411928b 100644 --- a/tests/boundary/mcp/ghidraDecompileDeadlineLifetime.test.ts +++ b/tests/boundary/mcp/ghidraDecompileDeadlineLifetime.test.ts @@ -126,7 +126,7 @@ it("tells a finished CLI invocation to rerun with the launch setting, not to reu const { message } = cliFailure.parse(projected); expect(message.startsWith(BRIDGE_MESSAGE)).toBe(true); expect(message).not.toContain(GHIDRA_SESSION_RETAINED); -}, 30_000); +}); it("keeps same-session and runtime-update guidance for a continuing MCP connection", async () => { const launcher = new GhidraFixtureLauncher("decompile_timed_out"); @@ -184,4 +184,4 @@ it("keeps same-session and runtime-update guidance for a continuing MCP connecti await harness.close(); await expectReleased(launcher); } -}, 30_000); +}); diff --git a/tests/boundary/mcp/ghidraEvidenceMcp.test.ts b/tests/boundary/mcp/ghidraEvidenceMcp.test.ts index fe1a09ec64..47c018209f 100644 --- a/tests/boundary/mcp/ghidraEvidenceMcp.test.ts +++ b/tests/boundary/mcp/ghidraEvidenceMcp.test.ts @@ -736,5 +736,5 @@ describe("Ghidra MCP evidence parity", () => { } finally { await harness.close(); } - }, 30_000); + }); }); diff --git a/tests/boundary/mcp/ghidraFailureDiagnostics.test.ts b/tests/boundary/mcp/ghidraFailureDiagnostics.test.ts index 1649d538af..a40dbe93cf 100644 --- a/tests/boundary/mcp/ghidraFailureDiagnostics.test.ts +++ b/tests/boundary/mcp/ghidraFailureDiagnostics.test.ts @@ -99,7 +99,7 @@ it("preserves queue failure diagnostics through the provider, CLI adapter and SD process.exitCode = previousExitCode; await harness.close(); } -}, 30_000); +}); it.each( (["cancelled", "protocol"] as const).flatMap((kind) => diff --git a/tests/boundary/mcp/ghidraFileOffsetMcp.test.ts b/tests/boundary/mcp/ghidraFileOffsetMcp.test.ts index a30e19f262..d5be3e1afb 100644 --- a/tests/boundary/mcp/ghidraFileOffsetMcp.test.ts +++ b/tests/boundary/mcp/ghidraFileOffsetMcp.test.ts @@ -197,7 +197,7 @@ it("reports file-backed, uninitialized and unmapped addresses through MCP withou } finally { await mcp.close(); } -}, 30_000); +}); const segments = z.array( z.object({ name: z.string(), start: z.string(), end: z.string() }), @@ -259,7 +259,7 @@ it("maps the last byte of a file-backed block and refuses the first address past } finally { await mcp.close(); } -}, 30_000); +}); it("gives the CLI analysis path the same unbacked-address outcome as MCP", async () => { const launcher = new GhidraFixtureLauncher(); @@ -308,4 +308,4 @@ it("gives the CLI analysis path the same unbacked-address outcome as MCP", async } finally { await expectReleased(launcher); } -}, 30_000); +}); diff --git a/tests/boundary/mcp/ghidraNativeApiMcp.test.ts b/tests/boundary/mcp/ghidraNativeApiMcp.test.ts index bfb2640611..39c78d2dc7 100644 --- a/tests/boundary/mcp/ghidraNativeApiMcp.test.ts +++ b/tests/boundary/mcp/ghidraNativeApiMcp.test.ts @@ -245,7 +245,7 @@ describe("Ghidra MCP native API evidence", () => { } finally { await harness.close(); } - }, 30_000); + }); it("returns complete native API boundaries without output-cap unknowns", async () => { const harness = await connectGhidraMcp("ghidra-native-api"); @@ -290,7 +290,7 @@ describe("Ghidra MCP native API evidence", () => { } finally { await harness.close(); } - }, 30_000); + }); }); it("retains unavailable Ghidra native API observations across live reobservation and provenance", async () => { @@ -409,4 +409,4 @@ it("retains unavailable Ghidra native API observations across live reobservation } finally { await harness.close(); } -}, 30_000); +}); diff --git a/tests/boundary/mcp/ghidraRequestCeilingMcp.test.ts b/tests/boundary/mcp/ghidraRequestCeilingMcp.test.ts index eef1059887..68c2543932 100644 --- a/tests/boundary/mcp/ghidraRequestCeilingMcp.test.ts +++ b/tests/boundary/mcp/ghidraRequestCeilingMcp.test.ts @@ -108,4 +108,4 @@ it("reports local Ghidra admission through SDK MCP without dispatching or losing for (const child of launcher.processes) expect(child.exitCode !== null || child.signalCode !== null).toBe(true); } -}, 30_000); +}); diff --git a/tests/boundary/mcp/ghidraRoutingMcp.test.ts b/tests/boundary/mcp/ghidraRoutingMcp.test.ts index 0b0160d133..7edc1b6801 100644 --- a/tests/boundary/mcp/ghidraRoutingMcp.test.ts +++ b/tests/boundary/mcp/ghidraRoutingMcp.test.ts @@ -78,7 +78,7 @@ describe("Ghidra MCP capability routing", () => { } finally { await harness.close(); } - }, 30_000); + }); it("keeps a Ghidra null-pseudocode observation's limitations on its batch item", async () => { const bodyless = "0x401020"; @@ -136,5 +136,5 @@ describe("Ghidra MCP capability routing", () => { } finally { await harness.close(); } - }, 30_000); + }); }); diff --git a/tests/boundary/mcp/guidedWorkflowsMcp.test.ts b/tests/boundary/mcp/guidedWorkflowsMcp.test.ts index ddedbed726..1f4799ba61 100644 --- a/tests/boundary/mcp/guidedWorkflowsMcp.test.ts +++ b/tests/boundary/mcp/guidedWorkflowsMcp.test.ts @@ -153,8 +153,6 @@ it.each([ ); } }, - // Full catalog startup took up to 39s with concurrent work on a shared host. - 60_000, ); it("uses the native prompt scope for tool discovery and rendering", async () => { diff --git a/tests/boundary/mcp/investigationAnalysisMcp.test.ts b/tests/boundary/mcp/investigationAnalysisMcp.test.ts index 2c0b08509c..c6f537eb57 100644 --- a/tests/boundary/mcp/investigationAnalysisMcp.test.ts +++ b/tests/boundary/mcp/investigationAnalysisMcp.test.ts @@ -71,7 +71,7 @@ it("aggregates comparison Evidence and records an approved runtime gap", async ( } finally { await close(session, server, client); } -}, 10_000); +}); it("builds exact-address paths with qualified callees and dossier citations", async () => { const { session, server, client } = await connected(); @@ -226,7 +226,7 @@ it("keeps call-path publication ahead of close_binary record draining", async () await Promise.allSettled(pending); await close(session, server, client); } -}, 10_000); +}); const dossierWithCallees = (addresses: readonly string[]) => { const base = FUNCTION_COMPARISON_EXAMPLE.left; diff --git a/tests/boundary/mcp/investigationEvidenceReferencesMcp.test.ts b/tests/boundary/mcp/investigationEvidenceReferencesMcp.test.ts index 427febcdf5..8a328e95d1 100644 --- a/tests/boundary/mcp/investigationEvidenceReferencesMcp.test.ts +++ b/tests/boundary/mcp/investigationEvidenceReferencesMcp.test.ts @@ -263,4 +263,4 @@ it("reports missing sources for a retained dossier with a large link set", async }, }, }); -}, 30_000); +}); diff --git a/tests/boundary/mcp/javascriptAnalysisResources.test.ts b/tests/boundary/mcp/javascriptAnalysisResources.test.ts index cfe46db6e9..0e6892592d 100644 --- a/tests/boundary/mcp/javascriptAnalysisResources.test.ts +++ b/tests/boundary/mcp/javascriptAnalysisResources.test.ts @@ -174,7 +174,7 @@ it("accepts more work after application expansion exceeds memory and retains eve await client.close(); await transport.close(); } -}, 90000); +}); const repeatedSourceCount = 1500; const repeatedSourceText = "export const observed = 7;\n"; @@ -306,7 +306,7 @@ it("returns a directly usable partial analysis reference for an oversized timeou await client.close(); await transport.close(); } -}, 90000); +}); const verifyRecovery = async ( client: Client, diff --git a/tests/boundary/mcp/javascriptEndpointCandidate.test.ts b/tests/boundary/mcp/javascriptEndpointCandidate.test.ts index 6c315cf0b7..73673d59c4 100644 --- a/tests/boundary/mcp/javascriptEndpointCandidate.test.ts +++ b/tests/boundary/mcp/javascriptEndpointCandidate.test.ts @@ -81,4 +81,4 @@ it("preserves Map omission and uncertain endpoint Evidence through public MCP", await client.close(); await transport.close(); } -}, 20_000); +}); diff --git a/tests/boundary/mcp/javascriptLiteralPayload.test.ts b/tests/boundary/mcp/javascriptLiteralPayload.test.ts index fb8442f5db..3daf05932f 100644 --- a/tests/boundary/mcp/javascriptLiteralPayload.test.ts +++ b/tests/boundary/mcp/javascriptLiteralPayload.test.ts @@ -179,5 +179,4 @@ cliTest( await transport.close(); } }, - 60_000, ); diff --git a/tests/boundary/mcp/javascriptSourceSelection.test.ts b/tests/boundary/mcp/javascriptSourceSelection.test.ts index ef614f0ee9..1bc15e220c 100644 --- a/tests/boundary/mcp/javascriptSourceSelection.test.ts +++ b/tests/boundary/mcp/javascriptSourceSelection.test.ts @@ -82,7 +82,7 @@ it("resolves ESM whitespace specifiers through the public application tool", asy () => transport.close(), ]); } -}, 60_000); +}); it("retains missing ASAR native-addon inventory through the public application tool", async () => { const { archive, addon } = await createStrippedAsarAddon(); @@ -115,7 +115,7 @@ it("retains missing ASAR native-addon inventory through the public application t () => transport.close(), ]); } -}, 60_000); +}); it("advertises exact source selection and retains its scope through summary, Evidence retrieval and invalid-input recovery", async () => { const root = await createTestTempDirectory("rea-js-selected-mcp-"); @@ -244,7 +244,7 @@ it("advertises exact source selection and retains its scope through summary, Evi () => transport.close(), ]); } -}, 60_000); +}); it("selects nested ASAR paths and distinguishes missing inventoried bytes from invalid paths", async () => { const root = await createTestTempDirectory("rea-js-selected-containers-"); @@ -315,7 +315,7 @@ it("selects nested ASAR paths and distinguishes missing inventoried bytes from i () => transport.close(), ]); } -}, 60_000); +}); it("accepts ASAR headers with long legal JSON whitespace through the public application tool", async () => { const root = await createTestTempDirectory("rea-js-asar-whitespace-mcp-"); @@ -358,7 +358,7 @@ it("accepts ASAR headers with long legal JSON whitespace through the public appl () => transport.close(), ]); } -}, 60_000); +}); it("does not parse ASAR-looking JSON beyond the declared JSON extent through MCP", async () => { const archive = join( @@ -395,4 +395,4 @@ it("does not parse ASAR-looking JSON beyond the declared JSON extent through MCP () => transport.close(), ]); } -}, 60_000); +}); diff --git a/tests/boundary/mcp/javascriptTimerDelay.test.ts b/tests/boundary/mcp/javascriptTimerDelay.test.ts index 71af083487..9ad72fad3b 100644 --- a/tests/boundary/mcp/javascriptTimerDelay.test.ts +++ b/tests/boundary/mcp/javascriptTimerDelay.test.ts @@ -12,7 +12,6 @@ import { cliTest } from "../../support/cli/cliFixture.js"; cliTest( "retains unknown timer delays and unrelated facts through public CLI and MCP", - { timeout: 60_000 }, async ({ cli }) => { const root = await createTestTempDirectory("rea-timer-delay-"); const source = [ diff --git a/tests/boundary/mcp/managedArtifactSummaryMcp.test.ts b/tests/boundary/mcp/managedArtifactSummaryMcp.test.ts index c55475d9fe..8ecd613779 100644 --- a/tests/boundary/mcp/managedArtifactSummaryMcp.test.ts +++ b/tests/boundary/mcp/managedArtifactSummaryMcp.test.ts @@ -139,7 +139,7 @@ it("returns a first-call overview and pages the unchanged source after its file }); if (!portable.ok) throw portable.error; expect(portable.value.normalized_result).toEqual(view); -}, 30000); +}); it("keeps malformed metadata, empty returned rows and historical null subjects explicit", async () => { const directory = await createTestTempDirectory( @@ -215,7 +215,7 @@ it("keeps malformed metadata, empty returned rows and historical null subjects e ok: false, error: { _tag: "EvidenceIntegrityError" }, }); -}, 30000); +}); it("refuses selected delivery before file access when the server cannot retain Evidence", async () => { const directory = await createTestTempDirectory("rea-managed-fixed-view-"); @@ -258,4 +258,4 @@ it("refuses selected delivery before file access when the server cannot retain E complete.structuredContent, ).success, ).toBe(true); -}, 30000); +}); diff --git a/tests/boundary/mcp/managedMcp.test.ts b/tests/boundary/mcp/managedMcp.test.ts index ba370ca045..fe66104342 100644 --- a/tests/boundary/mcp/managedMcp.test.ts +++ b/tests/boundary/mcp/managedMcp.test.ts @@ -193,7 +193,7 @@ it("runs every managed static inspection independently of an active native targe }, }); await assertFieldMemberRefToken(client, fieldTokenPath); -}, 30_000); +}); it("compares observed call-target names through the managed MCP contract", async () => { const directory = await createTestTempDirectory("rea-managed-call-target-"); @@ -308,7 +308,7 @@ it("opens a managed PE and executes the managed static provider through MCP", as rightPath, assertOutput, ); -}, 30_000); +}); const verifyManagedCatalogAndNativeWorkflow = async ( client: Client, diff --git a/tests/boundary/mcp/managedMemberSummaryMcp.test.ts b/tests/boundary/mcp/managedMemberSummaryMcp.test.ts index 204cb0da98..43092a482f 100644 --- a/tests/boundary/mcp/managedMemberSummaryMcp.test.ts +++ b/tests/boundary/mcp/managedMemberSummaryMcp.test.ts @@ -304,7 +304,7 @@ it("summarizes selected members and pages every original collection after the fi }); if (!portable.ok) throw portable.error; expect(portable.value.normalized_result).toEqual(view); -}, 30000); +}); it("keeps collections that historical member Evidence never examined unknown", async () => { const directory = await createTestTempDirectory("rea-member-historical-"); @@ -360,7 +360,7 @@ it("keeps collections that historical member Evidence never examined unknown", a view: { kind: "managed", collection: "attributes", offset: 0, limit: 1 }, }), ).toMatchObject({ ok: false, error: { _tag: "AnalysisInputError" } }); -}, 30000); +}); it("binds managed member views to their recorded token scope", async () => { const original = MANAGED_RECONSTRUCTION_IMPORT_EXAMPLE.static_members; diff --git a/tests/boundary/mcp/managedNativeVerificationAdapters.test.ts b/tests/boundary/mcp/managedNativeVerificationAdapters.test.ts index 2ed4fbc581..3c5adfd9fb 100644 --- a/tests/boundary/mcp/managedNativeVerificationAdapters.test.ts +++ b/tests/boundary/mcp/managedNativeVerificationAdapters.test.ts @@ -161,7 +161,6 @@ cliTest( ); expect(evidence.evidence_links).toEqual([original.evidence_id]); }, - 60_000, ); /** Authentic native Evidence whose operation the workflow cannot read symbols from. */ @@ -372,7 +371,6 @@ cliTest( ]); } }, - 60_000, ); cliTest( @@ -442,5 +440,4 @@ cliTest( error: { code: "evidence_integrity_mismatch" }, }); }, - 60_000, ); diff --git a/tests/boundary/mcp/mcpDoctor.test.ts b/tests/boundary/mcp/mcpDoctor.test.ts index 4d5b9140d3..7ef05b066a 100644 --- a/tests/boundary/mcp/mcpDoctor.test.ts +++ b/tests/boundary/mcp/mcpDoctor.test.ts @@ -264,7 +264,7 @@ describe("production MCP doctor", () => { ], { timeout: 30_000 }, ); - }, 35_000); + }); it("preserves the full-output envelope for startup failures", async () => { const result = await runProductionMcpDoctorCli( @@ -332,7 +332,6 @@ describe("production MCP doctor", () => { if (cliParity) await assertCliCatalogIdentity(selectedEnvironment, identity); }, - 30_000, ); }); @@ -384,7 +383,6 @@ describe("production MCP doctor family scopes", () => { await assertStatusCatalogIdentity(environment, identity); if (cliParity) await assertCliCatalogIdentity(environment, identity); }, - 30_000, ); it("discovers an empty prompt inventory and explains a scope without session", async () => { @@ -428,7 +426,7 @@ describe("production MCP doctor family scopes", () => { expect(result.diagnostics?.stderr).toEqual( expect.stringContaining("REA_MCP_TOOL_FAMILIES"), ); - }, 30_000); + }); }); describe("production MCP doctor output", () => { @@ -494,7 +492,7 @@ describe("production MCP doctor output", () => { }, }, }); - }, 35_000); + }); it.each([false, true])( "frames unhealthy JSONL diagnostics and retains the selected envelope (%s)", @@ -662,7 +660,7 @@ describe("production MCP doctor probe validation", () => { }); } } - }, 30_000); + }); }); describe("production MCP doctor child lifecycle", () => { @@ -698,7 +696,7 @@ describe("production MCP doctor child lifecycle", () => { stderr_bytes: 4 * 1024 * 1024, stderr_truncated: true, }); - }, 10_000); + }); it("does not manufacture a replacement character when the retained prefix ends inside UTF-8", async () => { const prefixBytes = MCP_STARTUP_POLICY.doctorStderrBytes - 1; @@ -771,7 +769,7 @@ describe("production MCP doctor child lifecycle", () => { expectDoctorDeadline(result.checks[0]?.detail, 60_000); expect(result.checks[0]?.detail).not.toContain("REA_MCP_STARTUP"); await expect(waitForExit(pid)).resolves.toBeUndefined(); - }, 10_000); + }); }); describe("production MCP doctor request-flow deadline", () => { @@ -806,7 +804,7 @@ describe("production MCP doctor request-flow deadline", () => { expect(requestFlow?.ok).toBe(false); expectDoctorDeadline(requestFlow?.detail, 60_000); expect(requestFlow?.detail).not.toContain("REA_MCP_STARTUP"); - }, 15_000); + }); it.each([ "unrelated fixture method refusal", @@ -835,7 +833,6 @@ describe("production MCP doctor request-flow deadline", () => { expect(requestFlow?.detail).toContain(message); expect(requestFlow?.detail).not.toContain("REA_MCP_DOCTOR_DEADLINE_MS"); }, - 10_000, ); it("refuses an invalid phase budget before starting a child", async () => { diff --git a/tests/boundary/mcp/nativeDispatchBoundTarget.test.ts b/tests/boundary/mcp/nativeDispatchBoundTarget.test.ts index 519240269c..163de3508b 100644 --- a/tests/boundary/mcp/nativeDispatchBoundTarget.test.ts +++ b/tests/boundary/mcp/nativeDispatchBoundTarget.test.ts @@ -123,14 +123,13 @@ describe.skipIf(process.platform !== "darwin")( () => { it("reports missing, directory and symlink-loop replacements as artifact changes and recovers in the same session", async () => { await inspectReplacements(["missing", "directory", "loop"]); - }, 30_000); + }); it.skipIf(process.getuid?.() === 0)( "keeps permission denial distinct and recovers after restoring read access", async () => { await inspectReplacements(["unreadable"]); }, - 30_000, ); }, ); diff --git a/tests/boundary/mcp/nativeInstructionReferencesView.test.ts b/tests/boundary/mcp/nativeInstructionReferencesView.test.ts index 43a9188475..aa5858e5e7 100644 --- a/tests/boundary/mcp/nativeInstructionReferencesView.test.ts +++ b/tests/boundary/mcp/nativeInstructionReferencesView.test.ts @@ -275,7 +275,6 @@ it.each(["full", "compact"] as const)( if (!closed.ok) throw closed.error; } }, - 90_000, ); it("recovers the complete parent when a single reference exceeds the page budget", async () => { @@ -363,4 +362,4 @@ it("recovers the complete parent when a single reference exceeds the page budget const closed = await session.close(); if (!closed.ok) throw closed.error; } -}, 90_000); +}); diff --git a/tests/boundary/mcp/nativeLoadImageViewsMcp.test.ts b/tests/boundary/mcp/nativeLoadImageViewsMcp.test.ts index 9f2b733643..d52a2cb33e 100644 --- a/tests/boundary/mcp/nativeLoadImageViewsMcp.test.ts +++ b/tests/boundary/mcp/nativeLoadImageViewsMcp.test.ts @@ -99,7 +99,7 @@ it("preserves raw and DOL verification facts and selected DOL sections through t limitations: expect.arrayContaining(report.limitations), }); } -}, 30_000); +}); it("delivers load-image summaries from the complete retained public-tool observation", async () => { const report = nativeRawLoadImageFixture(); diff --git a/tests/boundary/mcp/nativeObservationViewsMcp.test.ts b/tests/boundary/mcp/nativeObservationViewsMcp.test.ts index 09981650cb..9d83777bc8 100644 --- a/tests/boundary/mcp/nativeObservationViewsMcp.test.ts +++ b/tests/boundary/mcp/nativeObservationViewsMcp.test.ts @@ -151,7 +151,7 @@ it("delivers native primitive and graph summaries with exact retained parents an } finally { await harness.close(); } -}, 90_000); +}); it("follows native overflow continuations through MCP without repeating provider work", async () => { let reads = 0; @@ -267,4 +267,4 @@ it("follows native overflow continuations through MCP without repeating provider const closed = await session.close(); if (!closed.ok) throw closed.error; } -}, 90_000); +}); diff --git a/tests/boundary/mcp/navigationAlternativesMcp.test.ts b/tests/boundary/mcp/navigationAlternativesMcp.test.ts index 1cdce4417f..8d21ffb5d1 100644 --- a/tests/boundary/mcp/navigationAlternativesMcp.test.ts +++ b/tests/boundary/mcp/navigationAlternativesMcp.test.ts @@ -132,7 +132,6 @@ describe("address navigation refusals", () => { await harness.close(); } }, - 30_000, ); }); @@ -204,7 +203,7 @@ describe("address navigation refusal alternatives", () => { } finally { await harness.close(); } - }, 30_000); + }); it("keep generic advice when the provider offers no declared alternative", async () => { const [target] = await createBinarySessionTargets(); diff --git a/tests/boundary/mcp/oversizedErrorDeliveryMcp.test.ts b/tests/boundary/mcp/oversizedErrorDeliveryMcp.test.ts index 64fcb3790a..7df2b02f3e 100644 --- a/tests/boundary/mcp/oversizedErrorDeliveryMcp.test.ts +++ b/tests/boundary/mcp/oversizedErrorDeliveryMcp.test.ts @@ -419,5 +419,4 @@ it.each([false, true])( await Promise.all([client.close(), server.close()]); } }, - 20000, ); diff --git a/tests/boundary/mcp/peLoadConfigMcp.test.ts b/tests/boundary/mcp/peLoadConfigMcp.test.ts index f749fbeebe..667cf90a1f 100644 --- a/tests/boundary/mcp/peLoadConfigMcp.test.ts +++ b/tests/boundary/mcp/peLoadConfigMcp.test.ts @@ -70,5 +70,4 @@ mcpTest( await session.close(); } }, - 60_000, ); diff --git a/tests/boundary/mcp/promptMcp.test.ts b/tests/boundary/mcp/promptMcp.test.ts index ab64d1ed33..2d6bf66abf 100644 --- a/tests/boundary/mcp/promptMcp.test.ts +++ b/tests/boundary/mcp/promptMcp.test.ts @@ -680,7 +680,7 @@ it("guided prompt completion avoids cold startup and cancels warm lookup on clos expect(closed.isError).not.toBe(true); await lifecycle.aborted; expect((await pending).completion.values).toEqual([]); -}, 10_000); +}); it.each(["replacement", "shutdown"])( "waits for cancelled completion cleanup before HTTP %s", @@ -902,7 +902,7 @@ describe("guided prompt completion lifecycle", () => { ).not.toBe(true); expect(await complete(client, "document", "")).toEqual([]); expect(await complete(client, "procedure", "")).toEqual([]); - }, 10_000); + }); }); const createWarmCompletionFixture = async () => { diff --git a/tests/boundary/mcp/releaseExposureMcp.test.ts b/tests/boundary/mcp/releaseExposureMcp.test.ts index 14228b979e..fbfbb327cd 100644 --- a/tests/boundary/mcp/releaseExposureMcp.test.ts +++ b/tests/boundary/mcp/releaseExposureMcp.test.ts @@ -71,5 +71,4 @@ mcpTest( await session.close(); } }, - 60_000, ); diff --git a/tests/boundary/mcp/serverWorkflowMcp.test.ts b/tests/boundary/mcp/serverWorkflowMcp.test.ts index f25027b2a6..e7b16d33bc 100644 --- a/tests/boundary/mcp/serverWorkflowMcp.test.ts +++ b/tests/boundary/mcp/serverWorkflowMcp.test.ts @@ -168,4 +168,4 @@ it("advertises the complete currently available inventory with a session", async expect(tool.inputSchema, tool.name).toBeDefined(); expect(tool.outputSchema, tool.name).toBeDefined(); } -}, 10_000); +}); diff --git a/tests/boundary/mcp/sessionMcp.test.ts b/tests/boundary/mcp/sessionMcp.test.ts index f8c342abcc..a91a59312b 100644 --- a/tests/boundary/mcp/sessionMcp.test.ts +++ b/tests/boundary/mcp/sessionMcp.test.ts @@ -170,7 +170,7 @@ describe("MCP snapshot lifecycle ordering", () => { }) ).isError, ).not.toBe(true); - }, 10_000); + }); }); describe("public provider availability", () => { @@ -451,7 +451,7 @@ describe("target-free MCP lifecycle", () => { path: canonicalTargetPath, sha256: z.object({ sha256: z.string() }).parse(second).sha256, }); - }, 30_000); + }); }); describe("snapshot receipt after MCP cleanup", () => { @@ -702,7 +702,7 @@ describe("MCP snapshot open ordering", () => { expect( text(await mcp.callTool({ name: "binary_session", arguments: {} })), ).toContain('"open":false'); - }, 10_000); + }); }); describe("session filesystem path boundaries over MCP", () => { @@ -755,7 +755,7 @@ describe("session filesystem path boundaries over MCP", () => { }, }); await mcp.callTool({ name: "close_binary", arguments: {} }); - }, 10_000); + }); }); describe("json depth bounds over MCP", () => { @@ -809,7 +809,7 @@ describe("json depth bounds over MCP", () => { expect(recovered.isError, JSON.stringify(recovered.content)).not.toBe(true); expect(recovered.structuredContent).toEqual(baseline.structuredContent); expect(createClient).not.toHaveBeenCalled(); - }, 10_000); + }); }); const client = (path: string, closed: string[]): AnalysisClient => ({ diff --git a/tests/boundary/mcp/sourcePublicationContext.test.ts b/tests/boundary/mcp/sourcePublicationContext.test.ts index d3c40bc65c..ac20643d8d 100644 --- a/tests/boundary/mcp/sourcePublicationContext.test.ts +++ b/tests/boundary/mcp/sourcePublicationContext.test.ts @@ -164,7 +164,6 @@ it.each( await session.close(); } }, - 120000, ); it.each([false, true])( @@ -276,7 +275,6 @@ it.each([false, true])( await session.close(); } }, - 120000, ); it("keeps a smaller sibling recovery when a later completed observation exceeds delivery", async () => { @@ -382,4 +380,4 @@ it("keeps a smaller sibling recovery when a later completed observation exceeds await server.close(); await session.close(); } -}, 120000); +}); diff --git a/tests/boundary/mcp/sourcePublicationRecovery.test.ts b/tests/boundary/mcp/sourcePublicationRecovery.test.ts index d44e8d54a7..718a6b8dde 100644 --- a/tests/boundary/mcp/sourcePublicationRecovery.test.ts +++ b/tests/boundary/mcp/sourcePublicationRecovery.test.ts @@ -325,7 +325,6 @@ it.each([ await session.close(); } }, - 120000, ); it("reports omission when the primary cannot be safely authenticated", async () => { diff --git a/tests/boundary/mcp/streamableHttpMcp.test.ts b/tests/boundary/mcp/streamableHttpMcp.test.ts index 0feae65669..78db023402 100644 --- a/tests/boundary/mcp/streamableHttpMcp.test.ts +++ b/tests/boundary/mcp/streamableHttpMcp.test.ts @@ -13,8 +13,6 @@ import { import { processTest } from "../../support/process/processFixture.js"; import { assertAdvertisedMcpContracts } from "./mcpContractHarness.js"; -const HTTP_BOUNDARY_TIMEOUT_MS = 90_000; - const openSession = async (url: URL, name: string) => { const transport = new StreamableHTTPClientTransport(url); const client = new Client({ name, version: "1" }); @@ -95,7 +93,6 @@ describe("rea mcp --http", () => { await expectIdentity(second); await second.transport.terminateSession(); }, - HTTP_BOUNDARY_TIMEOUT_MS, ); processTest( @@ -140,7 +137,6 @@ describe("rea mcp --http", () => { "MCP HTTP session replaced by a new client", ); }, - HTTP_BOUNDARY_TIMEOUT_MS, ); processTest( @@ -150,6 +146,5 @@ describe("rea mcp --http", () => { const refused = await expectForeignHostRefused(url); expect(refused.body).not.toContain("127.0.0.1"); }, - HTTP_BOUNDARY_TIMEOUT_MS, ); }); diff --git a/tests/boundary/mcp/toolInputCapacityHttp.test.ts b/tests/boundary/mcp/toolInputCapacityHttp.test.ts index aa3619f865..c5ef69368c 100644 --- a/tests/boundary/mcp/toolInputCapacityHttp.test.ts +++ b/tests/boundary/mcp/toolInputCapacityHttp.test.ts @@ -103,7 +103,6 @@ processTest( expect(observed.bytes).toBeLessThan(4096); } }, - 90_000, ); processTest( @@ -162,7 +161,6 @@ processTest( JSON.stringify(observations), ); }, - 90_000, ); processTest( @@ -225,5 +223,4 @@ processTest( }), ); }, - 90_000, ); diff --git a/tests/boundary/mcp/toolInputCapacityStdio.test.ts b/tests/boundary/mcp/toolInputCapacityStdio.test.ts index e766ed57ab..b4b5d3cc60 100644 --- a/tests/boundary/mcp/toolInputCapacityStdio.test.ts +++ b/tests/boundary/mcp/toolInputCapacityStdio.test.ts @@ -55,4 +55,4 @@ it("applies the selected input allowance through the public deferred stdio entry arguments: {}, }); expect(healthy.isError).not.toBe(true); -}, 90_000); +}); diff --git a/tests/boundary/mcp/uImageMcp.test.ts b/tests/boundary/mcp/uImageMcp.test.ts index 9d88e9a86d..d079bef6c0 100644 --- a/tests/boundary/mcp/uImageMcp.test.ts +++ b/tests/boundary/mcp/uImageMcp.test.ts @@ -93,5 +93,4 @@ it.each(["full", "compact"] as const)( await rm(outputRoot, { recursive: true, force: true }); } }, - 60_000, ); diff --git a/tests/boundary/mcp/unityFsMcp.test.ts b/tests/boundary/mcp/unityFsMcp.test.ts index b6e232fda6..aa43c1d3fc 100644 --- a/tests/boundary/mcp/unityFsMcp.test.ts +++ b/tests/boundary/mcp/unityFsMcp.test.ts @@ -107,5 +107,4 @@ it.each(["full", "compact"] as const)( await rm(outputRoot, { recursive: true, force: true }); } }, - 60_000, ); diff --git a/tests/boundary/mcp/webBundleContainmentMcp.test.ts b/tests/boundary/mcp/webBundleContainmentMcp.test.ts index f35c0992f6..e4bb56bfd7 100644 --- a/tests/boundary/mcp/webBundleContainmentMcp.test.ts +++ b/tests/boundary/mcp/webBundleContainmentMcp.test.ts @@ -157,4 +157,4 @@ it("retains timeout Evidence and recovers on the same MCP server", async () => { }); await client.ping(); expect(browser.activeConnectionCount()).toBe(0); -}, 60_000); +}); diff --git a/tests/boundary/mcp/webRuntimeMcp.test.ts b/tests/boundary/mcp/webRuntimeMcp.test.ts index 9000da2b66..af55101182 100644 --- a/tests/boundary/mcp/webRuntimeMcp.test.ts +++ b/tests/boundary/mcp/webRuntimeMcp.test.ts @@ -186,7 +186,6 @@ cliTest( }); } }, - 20_000, ); cliTest( @@ -271,7 +270,6 @@ cliTest( ], }); }, - 20_000, ); it.each([ diff --git a/tests/boundary/mcp/wideOccurrenceCompletion.test.ts b/tests/boundary/mcp/wideOccurrenceCompletion.test.ts index 305a5e35c3..6419034bfc 100644 --- a/tests/boundary/mcp/wideOccurrenceCompletion.test.ts +++ b/tests/boundary/mcp/wideOccurrenceCompletion.test.ts @@ -4,7 +4,6 @@ import { processTest } from "../../support/process/processFixture.js"; processTest.for([3, 130_000])( "completes an authenticated inventory with %i child occurrences on the server stack", - { timeout: 45_000 }, async (count, { processes }) => { // Thread-pool tests have a larger stack than the stdio server. Use a fresh // main thread and enough heap for the ledger's conservative admission. diff --git a/tests/boundary/mcp/wxapkgMcp.test.ts b/tests/boundary/mcp/wxapkgMcp.test.ts index 3d1901421a..3e655e2870 100644 --- a/tests/boundary/mcp/wxapkgMcp.test.ts +++ b/tests/boundary/mcp/wxapkgMcp.test.ts @@ -83,5 +83,4 @@ it.each(["full", "compact"] as const)( await rm(outputRoot, { recursive: true, force: true }); } }, - 60_000, ); diff --git a/tests/boundary/pcap/pcapCredentialErrors.test.ts b/tests/boundary/pcap/pcapCredentialErrors.test.ts index 9f57a47ecb..0f151d4298 100644 --- a/tests/boundary/pcap/pcapCredentialErrors.test.ts +++ b/tests/boundary/pcap/pcapCredentialErrors.test.ts @@ -66,7 +66,7 @@ it("keeps complete parser input while exposing safe late-failure diagnostics", a exit_code: 0, truncated: false, }); -}, 20_000); +}); it("preserves producer failure facts while excluding HTTP credentials", async () => { const failure: unknown = await ownedCommand( @@ -82,7 +82,7 @@ it("preserves producer failure facts while excluding HTTP credentials", async () credential, ); expect(failure.capturedOutput?.stdout).toContain("http://caller:keep@label"); -}, 20_000); +}); it("excludes HTTP credentials after output-observed cancellation and preserves its reason", async () => { const controller = new AbortController(); @@ -110,7 +110,7 @@ it("excludes HTTP credentials after output-observed cancellation and preserves i expect(JSON.stringify(projectAnalysisError(failure))).not.toContain( credential, ); -}, 20_000); +}); it("retains safe cleanup observations and retries their original owner", async () => { let mayClean = false; @@ -154,7 +154,7 @@ it("retains safe cleanup observations and retries their original owner", async ( expect(output.cleanup?.capturedOutput.stdout).toContain( "http://caller:keep@label", ); -}, 20_000); +}); const nativeOptions = ( path: string, @@ -224,7 +224,6 @@ it.skipIf(process.platform !== "linux" || !existsSync("/usr/bin/tshark"))( credential, ); }, - 20_000, ); it.skipIf(process.platform !== "linux" || !existsSync("/usr/bin/tshark"))( @@ -250,5 +249,4 @@ it.skipIf(process.platform !== "linux" || !existsSync("/usr/bin/tshark"))( expect(frames[0]?._source.layers["http.request.uri"]).toEqual([target]); expect(result.capturedOutput.truncated).toBe(false); }, - 20_000, ); diff --git a/tests/boundary/pcap/pcapRetainedView.test.ts b/tests/boundary/pcap/pcapRetainedView.test.ts index 6f165bd364..0ee5a20925 100644 --- a/tests/boundary/pcap/pcapRetainedView.test.ts +++ b/tests/boundary/pcap/pcapRetainedView.test.ts @@ -212,5 +212,4 @@ it.runIf(process.platform === "linux")( ), ).toMatchObject({ error: { code: "invalid_request" } }); }, - 60_000, ); diff --git a/tests/boundary/process/applicationWorkflowVerifier.test.ts b/tests/boundary/process/applicationWorkflowVerifier.test.ts index b94551bbe2..bf984f78c1 100644 --- a/tests/boundary/process/applicationWorkflowVerifier.test.ts +++ b/tests/boundary/process/applicationWorkflowVerifier.test.ts @@ -57,7 +57,7 @@ describe("local application workflow verifier", () => { coverage: { status: expect.any(String) }, trace: { summary: { matched_seeds: expect.any(Number) } }, }); - }, 20_000); + }); it("reports an added parser return field", async () => { const root = await createTestTempDirectory("rea-shape-verifier-"); @@ -105,7 +105,7 @@ describe("local application workflow verifier", () => { }), ]), }); - }, 20_000); + }); }); it.each([false, true])( @@ -167,5 +167,4 @@ registerHooks({ resolve(specifier, context, next) { stderr: expect.stringContaining("authored late cleanup failure"), }); }, - 20_000, ); diff --git a/tests/boundary/process/browserRequestVerifierOwnership.test.ts b/tests/boundary/process/browserRequestVerifierOwnership.test.ts index a51805cbb2..57f477c8af 100644 --- a/tests/boundary/process/browserRequestVerifierOwnership.test.ts +++ b/tests/boundary/process/browserRequestVerifierOwnership.test.ts @@ -93,7 +93,6 @@ for (const { name, module, verify, rootPrefix } of [ ]) { processTest.skipIf(process.platform === "win32")( `stops a failed capture's CLI and browser before removing the ${name} lane's root`, - { timeout: 40_000 }, async ({ processes }) => { const root = await createTestTempDirectory(`rea-browser-${name}-owner-`); const tmp = join(root, "tmp"); diff --git a/tests/boundary/process/darwinProcessRunTokenReader.test.ts b/tests/boundary/process/darwinProcessRunTokenReader.test.ts index 0fae8ba918..cb82a4d162 100644 --- a/tests/boundary/process/darwinProcessRunTokenReader.test.ts +++ b/tests/boundary/process/darwinProcessRunTokenReader.test.ts @@ -1269,6 +1269,7 @@ it.skipIf(process.platform === "win32")( it.skipIf(!onDarwin)( "parses exact NUL-delimited token records and rejects truncated argv", + { tags: ["long-running"] }, async () => { const root = await mkdtemp( join(tmpdir(), "rea-process-token-parser-test-"), @@ -1397,11 +1398,11 @@ it.skipIf(!onDarwin)( await rm(root, { recursive: true, force: true }); } }, - 150_000, ); it.skipIf(!onDarwin)( "retries a growing process table after ENOMEM and preserves other sysctl errors", + { tags: ["long-running"] }, async () => { const root = await mkdtemp( join(tmpdir(), "rea-process-snapshot-retry-test-"), @@ -1444,7 +1445,6 @@ it.skipIf(!onDarwin)( await rm(root, { recursive: true, force: true }); } }, - 150_000, ); it.skipIf(!onDarwin)( @@ -1512,6 +1512,7 @@ it.skipIf(!onDarwin)( it.skipIf(!onDarwin)( "keeps a long title overwrite unknown when it hides the child's token", + { tags: ["long-running"] }, async () => { const host = createSystemProcessOwnershipHost("darwin"); const children: ChildProcess[] = []; @@ -1580,7 +1581,6 @@ it.skipIf(!onDarwin)( } } }, - 150_000, ); it.skipIf(!onDarwin)( diff --git a/tests/boundary/process/desktopBuildOwnedCommand.test.ts b/tests/boundary/process/desktopBuildOwnedCommand.test.ts index 8aa3a89806..30c229c306 100644 --- a/tests/boundary/process/desktopBuildOwnedCommand.test.ts +++ b/tests/boundary/process/desktopBuildOwnedCommand.test.ts @@ -9,7 +9,6 @@ import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js"; it.skipIf(process.platform === "win32")( "stops the packing process family before removing its partial archive on timeout", - { timeout: 15_000 }, async () => { await prepareProcessOwnershipInspection(); const directory = await createTestTempDirectory("rea-owned-pack-"); @@ -56,7 +55,6 @@ it.skipIf(process.platform === "win32")( it.skipIf(process.platform === "win32")( "cancels a running setup process family before removing its partial output", - { timeout: 15_000 }, async () => { await prepareProcessOwnershipInspection(); const directory = await createTestTempDirectory("rea-owned-pack-cancel-"); diff --git a/tests/boundary/process/electronLaunchRejections.test.ts b/tests/boundary/process/electronLaunchRejections.test.ts index 7c4b0c47f6..0c098b518d 100644 --- a/tests/boundary/process/electronLaunchRejections.test.ts +++ b/tests/boundary/process/electronLaunchRejections.test.ts @@ -1,7 +1,7 @@ import { chmod, mkdir, writeFile } from "node:fs/promises"; import { join } from "node:path"; -import { expect, vi } from "vitest"; +import { expect } from "vitest"; import type { AnalysisErrorProjection } from "../../../src/domain/analysisErrorProjection.js"; import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js"; @@ -123,7 +123,7 @@ console.log(JSON.stringify({ // A cold macOS Swift toolchain may spend up to 120 seconds building the // ownership reader before any child launch reaches its assertion. -vi.setConfig({ testTimeout: 180_000 }); +// @module-tag long-running type Outcome = { readonly before: number; diff --git a/tests/boundary/process/environmentServeShutdown.test.ts b/tests/boundary/process/environmentServeShutdown.test.ts index fd06617d84..85b3a1c7d8 100644 --- a/tests/boundary/process/environmentServeShutdown.test.ts +++ b/tests/boundary/process/environmentServeShutdown.test.ts @@ -17,8 +17,6 @@ import { rawHttpRequest } from "../../support/http/rawRequest.js"; import { startListeningProcess } from "../../support/mcp/streamableHttpProcess.js"; import { processTest } from "../../support/process/processFixture.js"; -const SHUTDOWN_TIMEOUT_MS = 90_000; - /** How each case is served and what its stopped document reports about the state. */ const MODES = [ { @@ -114,7 +112,6 @@ describe("rea environment-serve shutdown", () => { code: "ECONNREFUSED", }); }, - SHUTDOWN_TIMEOUT_MS, ); }); @@ -230,7 +227,6 @@ syncBuiltinESMExports(); }); expect(stderr).not.toContain("MCP transport listening"); }, - SHUTDOWN_TIMEOUT_MS, ); } }, diff --git a/tests/boundary/process/javascriptRuntimeReconciliationAmbiguity.test.ts b/tests/boundary/process/javascriptRuntimeReconciliationAmbiguity.test.ts index 8bbc75c84b..5600ff9867 100644 --- a/tests/boundary/process/javascriptRuntimeReconciliationAmbiguity.test.ts +++ b/tests/boundary/process/javascriptRuntimeReconciliationAmbiguity.test.ts @@ -217,4 +217,4 @@ it("runs the local verifier from operator-provided paths without emitting source summary: { runtime_scripts: 1 }, }); expect(stdout).not.toContain(SOURCE.trim()); -}, 10_000); +}); diff --git a/tests/boundary/process/javascriptVerifierBoundedEvidence.test.ts b/tests/boundary/process/javascriptVerifierBoundedEvidence.test.ts index 1fe3fb7320..6837842304 100644 --- a/tests/boundary/process/javascriptVerifierBoundedEvidence.test.ts +++ b/tests/boundary/process/javascriptVerifierBoundedEvidence.test.ts @@ -100,7 +100,6 @@ process.on('exit', () => fs.writeSync(2, 'Evidence close attempts: ' + attempts ); } }, - 30_000, ); it("refuses oversized Evidence before a whole-file read", async () => { @@ -147,4 +146,4 @@ syncBuiltinESMExports(); `Runtime Evidence exceeds 64 MiB: ${evidence}`, ), }); -}, 30_000); +}); diff --git a/tests/boundary/process/javascriptVerifierSelectedPaths.test.ts b/tests/boundary/process/javascriptVerifierSelectedPaths.test.ts index 19b4e51755..0cf90aa477 100644 --- a/tests/boundary/process/javascriptVerifierSelectedPaths.test.ts +++ b/tests/boundary/process/javascriptVerifierSelectedPaths.test.ts @@ -83,7 +83,7 @@ it("retains selected layer paths in runtime verifier parent Evidence", async () verified: true, layers: [{ evidence_id: expected.evidence_id }], }); -}, 20_000); +}); it("retains workflow selections while rejecting aliases of the same target", async () => { const left = await selectedFixture(); @@ -117,4 +117,4 @@ it("retains workflow selections while rejecting aliases of the same target", asy ).rejects.toMatchObject({ stderr: expect.stringContaining("must resolve to distinct paths"), }); -}, 20_000); +}); diff --git a/tests/boundary/process/mcpHttpShutdown.test.ts b/tests/boundary/process/mcpHttpShutdown.test.ts index fd13e0be06..1acdfda193 100644 --- a/tests/boundary/process/mcpHttpShutdown.test.ts +++ b/tests/boundary/process/mcpHttpShutdown.test.ts @@ -6,8 +6,6 @@ import { rawHttpRequest } from "../../support/http/rawRequest.js"; import { startMcpHttpProcess } from "../../support/mcp/streamableHttpProcess.js"; import { processTest } from "../../support/process/processFixture.js"; -const SHUTDOWN_TIMEOUT_MS = 90_000; - const shutdownSignals: readonly (readonly [NodeJS.Signals, number])[] = [ ["SIGTERM", 143], ["SIGINT", 130], @@ -32,7 +30,6 @@ describe.skipIf(process.platform === "win32")("rea mcp --http shutdown", () => { code: "ECONNREFUSED", }); }, - SHUTDOWN_TIMEOUT_MS, ); processTest( @@ -47,6 +44,5 @@ describe.skipIf(process.platform === "win32")("rea mcp --http shutdown", () => { expect(signalCode).toBeNull(); expect(started.stderr()).not.toContain(MCP_SHUTDOWN_FAILED); }, - SHUTDOWN_TIMEOUT_MS, ); }); diff --git a/tests/boundary/process/nativeVerifierCommandOwnership.test.ts b/tests/boundary/process/nativeVerifierCommandOwnership.test.ts index fd1ffdc60b..d670fa0492 100644 --- a/tests/boundary/process/nativeVerifierCommandOwnership.test.ts +++ b/tests/boundary/process/nativeVerifierCommandOwnership.test.ts @@ -231,5 +231,4 @@ it.skipIf(process.platform === "win32")( await removeTestWorkspace(workspace.root); } }, - 30_000, ); diff --git a/tests/boundary/process/nativeVerifierPreflightOwnership.test.ts b/tests/boundary/process/nativeVerifierPreflightOwnership.test.ts index 22785b59ce..da3a3c0fb3 100644 --- a/tests/boundary/process/nativeVerifierPreflightOwnership.test.ts +++ b/tests/boundary/process/nativeVerifierPreflightOwnership.test.ts @@ -268,5 +268,4 @@ it.skipIf(process.platform === "win32").each(clients)( await removeTestWorkspace(workspace.root); } }, - 30_000, ); diff --git a/tests/boundary/process/numericLimitGuardPermission.test.ts b/tests/boundary/process/numericLimitGuardPermission.test.ts index 58f01d3bad..f3a9fbe09c 100644 --- a/tests/boundary/process/numericLimitGuardPermission.test.ts +++ b/tests/boundary/process/numericLimitGuardPermission.test.ts @@ -9,7 +9,6 @@ processTest.skipIf( (typeof process.getuid === "function" && process.getuid() === 0), )( "fails the numeric limit guard when a required scan directory is unreadable", - { timeout: 60_000 }, async ({ processes }) => { const root = await createTestTempDirectory("rea-limit-permission-"); await mkdir(join(root, "scripts/verify"), { recursive: true }); diff --git a/tests/boundary/process/packageSetupTerminalOwnership.test.ts b/tests/boundary/process/packageSetupTerminalOwnership.test.ts index f04c2c4b2b..2398f37d38 100644 --- a/tests/boundary/process/packageSetupTerminalOwnership.test.ts +++ b/tests/boundary/process/packageSetupTerminalOwnership.test.ts @@ -113,7 +113,6 @@ const releaseStandin = async (release: string, readyPath: string) => { // The PTY, deadline, process census, command owner and workspace removal are real. processTest.skipIf(process.platform === "win32")( "joins a redirected-stdout setup descendant before removing its verifier workspace", - { timeout: 35_000 }, async ({ processes }) => { const root = await createTestTempDirectory("rea-package-setup-terminal-"); const scratch = join(root, "scratch"); @@ -262,7 +261,6 @@ processTest .skipIf(process.platform === "win32") .each(["interactive", "redirected"] as const)( "preserves selected configuration and closes the real PTY for %s setup", - { timeout: 30_000 }, async (mode) => { const root = await createTestTempDirectory("rea-package-setup-success-"); const scratch = join(root, "scratch"); diff --git a/tests/boundary/process/packageUpdateRegistryFailure.test.ts b/tests/boundary/process/packageUpdateRegistryFailure.test.ts index aef11c0641..03ddc0bd25 100644 --- a/tests/boundary/process/packageUpdateRegistryFailure.test.ts +++ b/tests/boundary/process/packageUpdateRegistryFailure.test.ts @@ -134,4 +134,4 @@ process.stdout.write(JSON.stringify({ failure, observedPids: pids.length, livePi observedPids: 2, livePids: [], }); -}, 45_000); +}); diff --git a/tests/boundary/process/packageVerifierCommandOwnership.test.ts b/tests/boundary/process/packageVerifierCommandOwnership.test.ts index c4a3a64296..c0d5ab8d3d 100644 --- a/tests/boundary/process/packageVerifierCommandOwnership.test.ts +++ b/tests/boundary/process/packageVerifierCommandOwnership.test.ts @@ -129,7 +129,6 @@ const releaseDescendant = async (release: string, receipt: string) => { // install, native engine, or WABT behavior is simulated or claimed. processTest.skipIf(process.platform === "win32")( "joins a timed-out npm entry and its acknowledged descendant before removing the verifier root", - { timeout: 30_000 }, async ({ processes }) => { const root = await createTestTempDirectory("rea-package-command-owner-"); const scratch = join(root, "scratch"); diff --git a/tests/boundary/process/packagedWasmVerifierOwnership.test.ts b/tests/boundary/process/packagedWasmVerifierOwnership.test.ts index 837d0e1b2a..1ffd9a31c7 100644 --- a/tests/boundary/process/packagedWasmVerifierOwnership.test.ts +++ b/tests/boundary/process/packagedWasmVerifierOwnership.test.ts @@ -373,5 +373,4 @@ it.skipIf(process.platform === "win32").each([ await removeTestWorkspace(workspace.root); } }, - 45_000, ); diff --git a/tests/boundary/process/processCaptureLifecycle.test.ts b/tests/boundary/process/processCaptureLifecycle.test.ts index ef54a0e133..5b1527d26d 100644 --- a/tests/boundary/process/processCaptureLifecycle.test.ts +++ b/tests/boundary/process/processCaptureLifecycle.test.ts @@ -184,7 +184,7 @@ itWithCaptureCapability( onTestFinished(async () => { now.mockRestore(); await resources.close(); - }, 10_000); + }); try { const result = await captureProcessScenario( processScenarioSchema.parse({ diff --git a/tests/boundary/process/processCli.test.ts b/tests/boundary/process/processCli.test.ts index dfcb2f9025..ec46bdf6b3 100644 --- a/tests/boundary/process/processCli.test.ts +++ b/tests/boundary/process/processCli.test.ts @@ -121,7 +121,6 @@ describe("documented process CLI workflow", () => { operation: "compare_process_captures", }); }, - CLI_INTEGRATION_TIMEOUT_MS, ); }); @@ -212,7 +211,6 @@ describe("process CLI cleanup errors", () => { } } }, - CLI_INTEGRATION_TIMEOUT_MS, ); }); @@ -279,25 +277,20 @@ describe("process CLI errors", () => { true, ); }, - CLI_INTEGRATION_TIMEOUT_MS, ); - it( - "exits unsuccessfully without writing failure-shaped evidence", - async () => { - await expect( - execFileAsync( - process.execPath, - ["scripts/rea.mjs", "capture-process", "/missing/scenario.json"], - { cwd: process.cwd() }, - ), - ).rejects.toMatchObject({ - code: 1, - stdout: expect.stringContaining("category: invalid_input"), - }); - }, - CLI_INTEGRATION_TIMEOUT_MS, - ); + it("exits unsuccessfully without writing failure-shaped evidence", async () => { + await expect( + execFileAsync( + process.execPath, + ["scripts/rea.mjs", "capture-process", "/missing/scenario.json"], + { cwd: process.cwd() }, + ), + ).rejects.toMatchObject({ + code: 1, + stdout: expect.stringContaining("category: invalid_input"), + }); + }); it("rejects NUL arguments before process launch", async () => { const root = await createTestTempDirectory("rea-process-cli-"); @@ -489,43 +482,33 @@ describe("process CLI evidence validation", () => { }); }); -it( - "reports the JSON depth constraint through the compiled comparison CLI", - async () => { - const root = await createTestTempDirectory("rea-process-cli-"); - const left = join(root, "left.json"); - const right = join(root, "right.json"); - const input = INVESTIGATION_EXAMPLES.compare_process_captures.input; - await writeFile(left, JSON.stringify(input.left)); - await writeFile(right, JSON.stringify(input.right)); - const cli = fileURLToPath( - new URL("../../../scripts/rea.mjs", import.meta.url), - ); - const cliArguments = [ - cli, - "compare-process-captures", - left, - right, - "--json", - ]; - const baseline = await execFileAsync(process.execPath, cliArguments); - expect(JSON.parse(baseline.stdout)).toMatchObject({ - operation: "compare_process_captures", - }); - const nested = '{"nested":'.repeat(10_000) + "1" + "}".repeat(10_000); - await writeFile( - left, - JSON.stringify({ - ...input.left, - parameters: { attack: "depth-placeholder" }, - }).replace('"depth-placeholder"', nested), - ); - await expect( - execFileAsync(process.execPath, cliArguments), - ).rejects.toMatchObject({ - code: 1, - stdout: expect.stringContaining("maximum nesting depth"), - }); - }, - CLI_INTEGRATION_TIMEOUT_MS, -); +it("reports the JSON depth constraint through the compiled comparison CLI", async () => { + const root = await createTestTempDirectory("rea-process-cli-"); + const left = join(root, "left.json"); + const right = join(root, "right.json"); + const input = INVESTIGATION_EXAMPLES.compare_process_captures.input; + await writeFile(left, JSON.stringify(input.left)); + await writeFile(right, JSON.stringify(input.right)); + const cli = fileURLToPath( + new URL("../../../scripts/rea.mjs", import.meta.url), + ); + const cliArguments = [cli, "compare-process-captures", left, right, "--json"]; + const baseline = await execFileAsync(process.execPath, cliArguments); + expect(JSON.parse(baseline.stdout)).toMatchObject({ + operation: "compare_process_captures", + }); + const nested = '{"nested":'.repeat(10_000) + "1" + "}".repeat(10_000); + await writeFile( + left, + JSON.stringify({ + ...input.left, + parameters: { attack: "depth-placeholder" }, + }).replace('"depth-placeholder"', nested), + ); + await expect( + execFileAsync(process.execPath, cliArguments), + ).rejects.toMatchObject({ + code: 1, + stdout: expect.stringContaining("maximum nesting depth"), + }); +}); diff --git a/tests/boundary/process/processFilesystemCoverageAdapters.test.ts b/tests/boundary/process/processFilesystemCoverageAdapters.test.ts index 708e35605f..9fdd10101f 100644 --- a/tests/boundary/process/processFilesystemCoverageAdapters.test.ts +++ b/tests/boundary/process/processFilesystemCoverageAdapters.test.ts @@ -74,7 +74,6 @@ it ) .for(["cli", "mcp"] as const)( "preserves selected-root permission denial and earlier snapshot facts through %s", - { timeout: 20_000 }, async (adapter, context) => { const root = await createTestTempDirectory("rea-fs-root-denial-adapter-"); const denied = join(root, "denied"); @@ -446,7 +445,6 @@ it.skipIf(CAPTURE_SKIP_REASON || process.platform === "win32")( }); expect(compareProcessCaptures(capture, capture).filesystem).toBe("unknown"); }, - 20_000, ); it @@ -516,7 +514,6 @@ it }); expect(compareProcessCaptures(capture, capture).filesystem).toBe("unknown"); }, - 20_000, ); itWithCaptureCapability.each(["cli", "mcp"] as const)( @@ -625,7 +622,6 @@ it await chmod(join(root, "state"), 0o700); } }, - 20_000, ); itWithCaptureCapability( diff --git a/tests/boundary/process/processFixtureLifecycle.test.ts b/tests/boundary/process/processFixtureLifecycle.test.ts index 3cc810a942..d4a897d13b 100644 --- a/tests/boundary/process/processFixtureLifecycle.test.ts +++ b/tests/boundary/process/processFixtureLifecycle.test.ts @@ -248,7 +248,7 @@ it("times out when a real descendant holds the exited leader's output open", asy ); } } -}, 17_000); +}); it("terminates a stalled real child at its deadline while retaining captured output", async () => { const processes = createTestProcessRegistry(); diff --git a/tests/boundary/process/testGroupCancellation.test.ts b/tests/boundary/process/testGroupCancellation.test.ts index 5fd9230ec9..eb705bd9d5 100644 --- a/tests/boundary/process/testGroupCancellation.test.ts +++ b/tests/boundary/process/testGroupCancellation.test.ts @@ -167,5 +167,4 @@ function release() { clearInterval(timer); clearTimeout(deadline); socket.end(); await new Promise((resolve) => server.close(() => resolve())); } }, - 15_000, ); diff --git a/tests/boundary/process/verifierCommandSemantics.test.ts b/tests/boundary/process/verifierCommandSemantics.test.ts index c213b36a47..2a98086631 100644 --- a/tests/boundary/process/verifierCommandSemantics.test.ts +++ b/tests/boundary/process/verifierCommandSemantics.test.ts @@ -371,7 +371,6 @@ process.stdout.write("unexpected stdin EOF\\n"); expect(commands.cleanupResources).toEqual([]); expect(existsSync(directory)).toBe(true); }, - 10_000, ); it.skipIf(process.platform === "win32")( @@ -521,7 +520,6 @@ it.skipIf(process.platform === "win32")( } } }, - 15_000, ); it.skipIf(process.platform === "win32")( diff --git a/tests/boundary/providers/GdbSessionManagerCoverage.test.ts b/tests/boundary/providers/GdbSessionManagerCoverage.test.ts index 1bdb4dae48..9795035257 100644 --- a/tests/boundary/providers/GdbSessionManagerCoverage.test.ts +++ b/tests/boundary/providers/GdbSessionManagerCoverage.test.ts @@ -1232,7 +1232,7 @@ it("closes an idle session when its quoted executable contains groups=[", async commands.filter((command) => command.includes("list-thread-groups")), ).toHaveLength(1); expect(commands).toContain("-gdb-exit"); -}, 10_000); +}); it("reports incomplete stop if GDB exits while close waits in the serialized queue", async () => { let heldToken = ""; diff --git a/tests/boundary/providers/RizinInferiorTty.test.ts b/tests/boundary/providers/RizinInferiorTty.test.ts index 35603c119a..901a2d0ce2 100644 --- a/tests/boundary/providers/RizinInferiorTty.test.ts +++ b/tests/boundary/providers/RizinInferiorTty.test.ts @@ -304,7 +304,6 @@ it.skipIf(process.platform !== "linux")( }); await expectCloseRejectedAndReleased(sessionId); }, - 4_000, ); it("rejects changed or missing Rizin inferior identity during detach", () => { diff --git a/tests/boundary/providers/adb/adbCommandFinalization.test.ts b/tests/boundary/providers/adb/adbCommandFinalization.test.ts index 52397f92a1..816ccc36a6 100644 --- a/tests/boundary/providers/adb/adbCommandFinalization.test.ts +++ b/tests/boundary/providers/adb/adbCommandFinalization.test.ts @@ -313,7 +313,6 @@ nativeClientTest.each([false, true])( expect(prerequisite.capturedOutput).toEqual(capturedOutput); expect(result.error.capturedOutput).toEqual(capturedOutput); }, - 20000, ); nativeClientTest( @@ -350,5 +349,4 @@ nativeClientTest( details: { timeout_ms: 10000 }, }); }, - 20000, ); diff --git a/tests/boundary/providers/apktoolDecodeDeadline.test.ts b/tests/boundary/providers/apktoolDecodeDeadline.test.ts index 1390e47568..f6b773ee03 100644 --- a/tests/boundary/providers/apktoolDecodeDeadline.test.ts +++ b/tests/boundary/providers/apktoolDecodeDeadline.test.ts @@ -79,5 +79,4 @@ it.skipIf(process.platform === "win32")( await fixture.cleanup([pending, provider.close()]); } }, - 30_000, ); diff --git a/tests/boundary/providers/apktoolProcessFixture.test.ts b/tests/boundary/providers/apktoolProcessFixture.test.ts index 1855975496..729a157a26 100644 --- a/tests/boundary/providers/apktoolProcessFixture.test.ts +++ b/tests/boundary/providers/apktoolProcessFixture.test.ts @@ -60,5 +60,4 @@ it await fixture.cleanup([probe, commands.close()]); } }, - 30_000, ); diff --git a/tests/boundary/providers/desktopExportJsonDepth.test.ts b/tests/boundary/providers/desktopExportJsonDepth.test.ts index 0dc7a65864..5c7783782d 100644 --- a/tests/boundary/providers/desktopExportJsonDepth.test.ts +++ b/tests/boundary/providers/desktopExportJsonDepth.test.ts @@ -174,7 +174,7 @@ print(json.dumps({"view": result["view"], "peak": peak})) ) as { view: unknown; peak: number }; expect(measured.view).toEqual({ value: "done" }); expect(measured.peak).toBeLessThan(8 * 1024 * 1024); -}, 40000); +}); it("bounds a wide container already beyond the retained view depth", async () => { const root = await createTestTempDirectory("desktop-json-wide-depth-"); @@ -203,4 +203,4 @@ print(json.dumps({"error": result.get("error"), "peak": peak})) "nested deeper than the 500 levels a JSON view keeps", ); expect(measured.peak).toBeLessThan(8 * 1024 * 1024); -}, 40000); +}); diff --git a/tests/boundary/providers/desktopStateHeap.test.ts b/tests/boundary/providers/desktopStateHeap.test.ts index 4bfe75962b..cbcd1b288d 100644 --- a/tests/boundary/providers/desktopStateHeap.test.ts +++ b/tests/boundary/providers/desktopStateHeap.test.ts @@ -32,27 +32,34 @@ const inSmallHeap = async (module: string, name: string, body: string) => { return JSON.parse(output) as unknown; }; -it("checks JSON depth with one iterator per level, so a wide array fits a small heap", async () => { - // Queuing a pair per member needed more than 64 MiB here; one iterator per level runs in 18 MiB. - const depths = await inSmallHeap( - "stateFormats.ts", - "deeperThan", - `const wide = new Array(800_000).fill(null); +it( + "checks JSON depth with one iterator per level, so a wide array fits a small heap", + { tags: ["long-running"] }, + async () => { + // Queuing a pair per member needed more than 64 MiB here; one iterator per level runs in 18 MiB. + const depths = await inSmallHeap( + "stateFormats.ts", + "deeperThan", + `const wide = new Array(800_000).fill(null); let nested = []; for (let level = 0; level < 501; level += 1) nested = [nested]; console.log(JSON.stringify({ wide: deeperThan(wide, 500), edge: deeperThan(nested, 501), over: deeperThan(nested, 500) })); `, - ); + ); - expect(depths).toEqual({ wide: false, edge: false, over: true }); -}, 180_000); + expect(depths).toEqual({ wide: false, edge: false, over: true }); + }, +); -it("pairs elements with a long tag and many attributes in a small heap, spelling a selector only once chosen", async () => { - // Spelling the tag into a selector per attribute needed more than 140 MiB here. - const pairing = await inSmallHeap( - "memberPairing.ts", - "pairMembers", - `const tag = "t".repeat(40_000); +it( + "pairs elements with a long tag and many attributes in a small heap, spelling a selector only once chosen", + { tags: ["long-running"] }, + async () => { + // Spelling the tag into a selector per attribute needed more than 140 MiB here. + const pairing = await inSmallHeap( + "memberPairing.ts", + "pairMembers", + `const tag = "t".repeat(40_000); const element = (id) => { const attributes = { id }; for (let index = 0; index < 2000; index += 1) attributes["a" + index] = String(index); @@ -62,21 +69,25 @@ const members = [element("1"), element("2")]; const { newer, older } = pairMembers(members, members, undefined, "xml"); console.log(JSON.stringify({ keys: newer.keys.map((key) => key.replace(tag, "T")), partners: newer.partners, same: older.keys.every((key, index) => key === newer.keys[index]) })); `, - ); + ); - expect(pairing).toEqual({ - keys: ["[name=T][@id=1]", "[name=T][@id=2]"], - partners: [0, 1], - same: true, - }); -}, 180_000); + expect(pairing).toEqual({ + keys: ["[name=T][@id=1]", "[name=T][@id=2]"], + partners: [0, 1], + same: true, + }); + }, +); -it("refuses JSON over the parsed-view limit in a small heap, telling it apart from text without building it", async () => { - // Parsing the entry to detect its format needed more than 80 MiB here. - const entries = await inSmallHeap( - "zipView.ts", - "zipEntry", - `const read = (name, text) => { +it( + "refuses JSON over the parsed-view limit in a small heap, telling it apart from text without building it", + { tags: ["long-running"] }, + async () => { + // Parsing the entry to detect its format needed more than 80 MiB here. + const entries = await inSmallHeap( + "zipView.ts", + "zipEntry", + `const read = (name, text) => { const bytes = new TextEncoder().encode(text); const entry = zipEntry({ name, size: bytes.length, compressedSize: bytes.length, method: 0, encrypted: false }, bytes); return [entry.format, entry.view_error ?? entry.view.line_count]; @@ -86,20 +97,24 @@ console.log(JSON.stringify([ read("objects.txt", "[{}" + ",{}".repeat(1_400_000) + "}"), ])); `, - ); + ); - expect(entries).toEqual([ - ["json", "larger than the 4 MiB limit for JSON and key file views"], - ["text", 1], - ]); -}, 180_000); + expect(entries).toEqual([ + ["json", "larger than the 4 MiB limit for JSON and key file views"], + ["text", 1], + ]); + }, +); -it("scrubs UTF-16 XML and JSON seeds of a million elements in a small heap, telling their format without building them", async () => { - // Building the XML document to choose the scrubber needed more than 768 MiB here, and parsing the JSON more than 64 MiB; the syntax checks and copying only changes run in 24 MiB. - const outcomes = await inSmallHeap( - "seedScrub.ts", - "scrubSeed", - `const scrub = (home, text, tail, clean) => { +it( + "scrubs UTF-16 XML and JSON seeds of a million elements in a small heap, telling their format without building them", + { tags: ["long-running"] }, + async () => { + // Building the XML document to choose the scrubber needed more than 768 MiB here, and parsing the JSON more than 64 MiB; the syntax checks and copying only changes run in 24 MiB. + const outcomes = await inSmallHeap( + "seedScrub.ts", + "scrubSeed", + `const scrub = (home, text, tail, clean) => { const seed = Buffer.from("\\uFEFF" + text + tail, "utf16le"); const scrubbed = scrubSeed(seed, { home, format: "binary" }, { home: "/home/ada", hostname: "e81232be457d", user: "ada" }); const expected = Buffer.concat([seed.subarray(0, -2 * tail.length), Buffer.from(clean, "utf16le")]); @@ -110,20 +125,24 @@ console.log(JSON.stringify([ scrub(".config/wide.json", "[{}" + ",{}".repeat(1_000_000), ',"ada@e81232be457d"]', ',"user@localhost"]'), ])); `, - ); + ); - expect(outcomes).toEqual([ - { exact: true, holdsIdentity: false }, - { exact: true, holdsIdentity: false }, - ]); -}, 180_000); + expect(outcomes).toEqual([ + { exact: true, holdsIdentity: false }, + { exact: true, holdsIdentity: false }, + ]); + }, +); -it("compares objects of selector keys with arrays in a small heap, however many field sets or spellings they use", async () => { - // An index per field set or spelling needed more than 48 MiB for either comparison here. - const removed = await inSmallHeap( - "stateChanges.ts", - "diffStateViews", - `const fields = ["f0", "f1", "f2", "f3", "f4", "f5", "f6"]; +it( + "compares objects of selector keys with arrays in a small heap, however many field sets or spellings they use", + { tags: ["long-running"] }, + async () => { + // An index per field set or spelling needed more than 48 MiB for either comparison here. + const removed = await inSmallHeap( + "stateChanges.ts", + "diffStateViews", + `const fields = ["f0", "f1", "f2", "f3", "f4", "f5", "f6"]; const members = Array.from({ length: 5000 }, (_, i) => Object.fromEntries(fields.map((f) => [f, f + "-" + i]))); const combinations = {}; for (let mask = 1; mask < 128; mask += 1) @@ -136,7 +155,8 @@ console.log(JSON.stringify([ diffStateViews("json", { items: repeated }, { items: named }), ].map((difference) => difference.removed_count))); `, - ); + ); - expect(removed).toEqual([0, 0]); -}, 180_000); + expect(removed).toEqual([0, 0]); + }, +); diff --git a/tests/boundary/providers/desktopZipHeap.test.ts b/tests/boundary/providers/desktopZipHeap.test.ts index 498735ca4e..23389cf73b 100644 --- a/tests/boundary/providers/desktopZipHeap.test.ts +++ b/tests/boundary/providers/desktopZipHeap.test.ts @@ -10,41 +10,45 @@ import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js"; const ROOT = join(import.meta.dirname, "../../.."); -it("reads a 600,000-entry archive's view in a small heap, parsing no more of its directory than it lists", async () => { - const folder = await createTestTempDirectory("desktop-zip-heap-"); - const archive = join(folder, "wide.zip"); - await writeFile(archive, emptyEntriesArchive(600_000)); - const script = join(folder, "read.mjs"); - const reader = pathToFileURL( - join(ROOT, "src/application/desktop/DesktopZipView.ts"), - ).href; - await writeFile( - script, - `import { readFileSync } from "node:fs"; +it( + "reads a 600,000-entry archive's view in a small heap, parsing no more of its directory than it lists", + { tags: ["long-running"] }, + async () => { + const folder = await createTestTempDirectory("desktop-zip-heap-"); + const archive = join(folder, "wide.zip"); + await writeFile(archive, emptyEntriesArchive(600_000)); + const script = join(folder, "read.mjs"); + const reader = pathToFileURL( + join(ROOT, "src/application/desktop/DesktopZipView.ts"), + ).href; + await writeFile( + script, + `import { readFileSync } from "node:fs"; import { readZipView } from ${JSON.stringify(reader)}; const read = await readZipView(readFileSync(process.argv[2])); if (!read.ok) throw new Error(read.error); console.log(JSON.stringify({ listed: read.value.entries.length, count: read.value.entry_count, truncated: read.value.truncated })); `, - ); + ); - // zip.js parsing every record needed between 48 and 64 MiB here; the bounded directory reads in 24 MiB. - const output = execFileSync( - process.execPath, - [ - "--max-old-space-size=36", - "--max-semi-space-size=1", - "--import", - "tsx", - script, - archive, - ], - { cwd: ROOT, encoding: "utf8", timeout: 120_000 }, - ); + // zip.js parsing every record needed between 48 and 64 MiB here; the bounded directory reads in 24 MiB. + const output = execFileSync( + process.execPath, + [ + "--max-old-space-size=36", + "--max-semi-space-size=1", + "--import", + "tsx", + script, + archive, + ], + { cwd: ROOT, encoding: "utf8", timeout: 120_000 }, + ); - expect(JSON.parse(output)).toEqual({ - listed: 1000, - count: 600_000, - truncated: true, - }); -}, 180_000); + expect(JSON.parse(output)).toEqual({ + listed: 1000, + count: 600_000, + truncated: true, + }); + }, +); diff --git a/tests/boundary/providers/desktopZipPython.test.ts b/tests/boundary/providers/desktopZipPython.test.ts index 45adf9c122..fb9342c28d 100644 --- a/tests/boundary/providers/desktopZipPython.test.ts +++ b/tests/boundary/providers/desktopZipPython.test.ts @@ -356,7 +356,7 @@ describe("zip entries the exported module cannot fully read", () => { ); // Parsing the 4,200,004-byte entry before refusing it traced about 110 MB here. expect(peak).toBeLessThan(4 * objects.length); - }, 60_000); + }); it("keeps a JSON entry nested too deeply on that entry and reads its siblings, as REA does", async () => { const nested = (levels: number) => diff --git a/tests/boundary/providers/ghidra/ghidraJavaLaunch.test.ts b/tests/boundary/providers/ghidra/ghidraJavaLaunch.test.ts index e63bdf687c..6e36174217 100644 --- a/tests/boundary/providers/ghidra/ghidraJavaLaunch.test.ts +++ b/tests/boundary/providers/ghidra/ghidraJavaLaunch.test.ts @@ -781,7 +781,7 @@ describe.skipIf(process.platform === "win32")( expect(result.ok).toBe(false); expect(analysisArguments).toEqual([]); expect(resources.hasPending).toBe(false); - }, 5000); + }); }, ); diff --git a/tests/boundary/providers/ghidra/ghidraOomRetention.test.ts b/tests/boundary/providers/ghidra/ghidraOomRetention.test.ts index 45dc30453d..e293e26c0b 100644 --- a/tests/boundary/providers/ghidra/ghidraOomRetention.test.ts +++ b/tests/boundary/providers/ghidra/ghidraOomRetention.test.ts @@ -144,7 +144,7 @@ describe.skipIf(process.platform === "win32")( }, }, }); - }, 30_000); + }); it.each([ ["process exit", "flood_then_exit_tools"], @@ -167,7 +167,6 @@ describe.skipIf(process.platform === "win32")( diagnostics: { failure_output: { observed_oome: [] } }, }); }, - 30_000, ); it("does not mistake a budget-cut identifier prefix for an OOME", async () => { @@ -190,7 +189,7 @@ describe.skipIf(process.platform === "win32")( }, }, }); - }, 30_000); + }); it("keeps a startup timeout after budget-exhausting output", async () => { const projected = await failedOperation("flood_silent", { @@ -201,7 +200,7 @@ describe.skipIf(process.platform === "win32")( expect(projected.remediation.action).not.toContain( "GHIDRA_HEADLESS_MAXMEM", ); - }, 30_000); + }); }, ); diff --git a/tests/boundary/providers/hopper/hopperClient.cleanup.test.ts b/tests/boundary/providers/hopper/hopperClient.cleanup.test.ts index cc4a8d1ff6..48bd19bffd 100644 --- a/tests/boundary/providers/hopper/hopperClient.cleanup.test.ts +++ b/tests/boundary/providers/hopper/hopperClient.cleanup.test.ts @@ -56,7 +56,7 @@ const clients: HopperClient[] = []; afterEach(async () => { await Promise.all(clients.splice(0).map((client) => client.close())); -}, 45_000); +}); describe("HopperClient cleanup", () => { it("waits for an operation reply without a fixed request deadline", async () => { diff --git a/tests/boundary/providers/hopper/hopperClient.externalExit.test.ts b/tests/boundary/providers/hopper/hopperClient.externalExit.test.ts index 3e4ff434cc..23aa8994e8 100644 --- a/tests/boundary/providers/hopper/hopperClient.externalExit.test.ts +++ b/tests/boundary/providers/hopper/hopperClient.externalExit.test.ts @@ -129,7 +129,7 @@ class ExternalFixtureBridge { rm(directory, { recursive: true, force: true }), ), ); - }, 45_000); + }); } } diff --git a/tests/boundary/providers/hopper/hopperClient.handshakeRecovery.test.ts b/tests/boundary/providers/hopper/hopperClient.handshakeRecovery.test.ts index faf69e347a..af21f16974 100644 --- a/tests/boundary/providers/hopper/hopperClient.handshakeRecovery.test.ts +++ b/tests/boundary/providers/hopper/hopperClient.handshakeRecovery.test.ts @@ -82,7 +82,7 @@ const setup = ( rm(directory, { recursive: true, force: true }), ), ); - }, 45_000); + }); return { client, launcher }; }; diff --git a/tests/boundary/providers/hopper/hopperClient.health.test.ts b/tests/boundary/providers/hopper/hopperClient.health.test.ts index 0a0ad3144e..b5284676ad 100644 --- a/tests/boundary/providers/hopper/hopperClient.health.test.ts +++ b/tests/boundary/providers/hopper/hopperClient.health.test.ts @@ -60,7 +60,7 @@ const start = async (owned: boolean) => { onTestFinished(async () => { await client.close(); for (const child of launcher.fixture.processes) child.kill(); - }, 45_000); + }); expect((await client.start()).ok).toBe(true); return { client, launcher }; }; diff --git a/tests/boundary/providers/hopper/hopperClient.startupFailures.test.ts b/tests/boundary/providers/hopper/hopperClient.startupFailures.test.ts index 6b5840d1a1..9a0c329421 100644 --- a/tests/boundary/providers/hopper/hopperClient.startupFailures.test.ts +++ b/tests/boundary/providers/hopper/hopperClient.startupFailures.test.ts @@ -195,7 +195,7 @@ const clients: HopperClient[] = []; afterEach(async () => { await Promise.all(clients.splice(0).map((client) => client.close())); -}, 45_000); +}); describe("HopperClient startup deadline", () => { it("applies one deadline to launcher, socket, and health startup phases", async () => { diff --git a/tests/boundary/providers/hopper/hopperClientObservedExitPriority.test.ts b/tests/boundary/providers/hopper/hopperClientObservedExitPriority.test.ts index bffe579bfc..0a856f5661 100644 --- a/tests/boundary/providers/hopper/hopperClientObservedExitPriority.test.ts +++ b/tests/boundary/providers/hopper/hopperClientObservedExitPriority.test.ts @@ -91,12 +91,12 @@ describe("Hopper startup failure priority", () => { if (!(error instanceof HopperProcessError)) return; expect(error.exitCode).toBe(3); expect(error.stage).toBe("launch"); - }, 30_000); + }); it("reports the same launcher exit without any cancellation", async () => { const error = await start("never"); expect(error._tag).toBe("HopperProcessError"); - }, 30_000); + }); it("keeps cancellation first when its abort handler causes the later launcher exit", async () => { const controller = new AbortController(); @@ -117,5 +117,5 @@ describe("Hopper startup failure priority", () => { } finally { await client.close().catch(() => undefined); } - }, 30_000); + }); }); diff --git a/tests/boundary/providers/ida/verifierObservations.test.ts b/tests/boundary/providers/ida/verifierObservations.test.ts index d9d0abe2ec..dcb2c64e5b 100644 --- a/tests/boundary/providers/ida/verifierObservations.test.ts +++ b/tests/boundary/providers/ida/verifierObservations.test.ts @@ -305,5 +305,4 @@ it.each([ await upstream.close(cleanupConfirmed); } }, - 120000, ); diff --git a/tests/boundary/providers/kuna/kunaBatchDecompileMcp.test.ts b/tests/boundary/providers/kuna/kunaBatchDecompileMcp.test.ts index 2c5cac6d23..577e5dddd3 100644 --- a/tests/boundary/providers/kuna/kunaBatchDecompileMcp.test.ts +++ b/tests/boundary/providers/kuna/kunaBatchDecompileMcp.test.ts @@ -192,4 +192,4 @@ test("keeps each Kuna no-pseudocode observation's limitations on its batch item" expect(await session.close()).toEqual({ ok: true, value: null }); }, ]); -}, 60_000); +}); diff --git a/tests/boundary/providers/kuna/kunaInstallation.test.ts b/tests/boundary/providers/kuna/kunaInstallation.test.ts index 61b58e7f95..03322223ee 100644 --- a/tests/boundary/providers/kuna/kunaInstallation.test.ts +++ b/tests/boundary/providers/kuna/kunaInstallation.test.ts @@ -317,7 +317,7 @@ it("stops a version probe that ignores SIGTERM instead of waiting on it", async expect(Date.now() - started).toBeLessThan(10_000); const pid = (await fakeKunaCalls(kuna))[0]?.pid ?? 0; expect(() => process.kill(pid, 0)).toThrow(); -}, 20_000); +}); it("keeps a version deadline ahead of cancellation during its joined stop", async () => { const root = await createTestTempDirectory("rea-kuna-deadline-first-"); diff --git a/tests/boundary/providers/kuna/kunaNavigationAlternativesMcp.test.ts b/tests/boundary/providers/kuna/kunaNavigationAlternativesMcp.test.ts index b06c944f91..2fc8758068 100644 --- a/tests/boundary/providers/kuna/kunaNavigationAlternativesMcp.test.ts +++ b/tests/boundary/providers/kuna/kunaNavigationAlternativesMcp.test.ts @@ -110,4 +110,4 @@ test("names only Kuna's assembly text for navigation refusals in a scoped catalo await mcp.close(); expect(await session.close()).toEqual({ ok: true, value: null }); } -}, 60_000); +}); diff --git a/tests/boundary/providers/kuna/kunaVerifier.test.ts b/tests/boundary/providers/kuna/kunaVerifier.test.ts index 022465a4dd..3c9a5ff430 100644 --- a/tests/boundary/providers/kuna/kunaVerifier.test.ts +++ b/tests/boundary/providers/kuna/kunaVerifier.test.ts @@ -109,7 +109,7 @@ it("accepts requested functions distributed across caller targets", async () => cleanup: "complete", caller_target_selection: expectedCallerSelection(targets), }); -}, 45_000); +}); test.skipIf( process.platform === "win32" || process.env.REA_KUNA_COMMAND === undefined, @@ -170,7 +170,6 @@ test.skipIf( ]); expect(await hashes()).toEqual(before); }, - 120_000, ); it("accepts empty caller inventories but requires source-owned fixture literals", async () => { diff --git a/tests/boundary/providers/native/lldbLauncherBoundary.test.ts b/tests/boundary/providers/native/lldbLauncherBoundary.test.ts index e1c09ff44d..8d3245bb51 100644 --- a/tests/boundary/providers/native/lldbLauncherBoundary.test.ts +++ b/tests/boundary/providers/native/lldbLauncherBoundary.test.ts @@ -207,5 +207,4 @@ setTimeout(() => process.exit(0), 10000); } else expect(closed.ok).toBe(true); } }, - 15_000, ); diff --git a/tests/boundary/providers/native/nativeDmgArtifactReader.test.ts b/tests/boundary/providers/native/nativeDmgArtifactReader.test.ts index 618cef76dd..604f465c40 100644 --- a/tests/boundary/providers/native/nativeDmgArtifactReader.test.ts +++ b/tests/boundary/providers/native/nativeDmgArtifactReader.test.ts @@ -1506,7 +1506,6 @@ describe("native DMG localized verification diagnostics", () => { ).rejects.toMatchObject({ reason: "unavailable" }); expect(run).toHaveBeenCalledTimes(3); }, - 10_000, ); it("keeps a localized failure without an untranslated status line unavailable", async () => { @@ -1758,7 +1757,6 @@ describe("native DMG real verification diagnostics", () => { expect(Reflect.get(failure.cause, "code")).toBe(1); expect(Reflect.get(failure.cause, "stderr")).toContain("is INVALID"); }, - 60_000, ); }); diff --git a/tests/boundary/providers/native/nativeUiOffscreenWindow.test.ts b/tests/boundary/providers/native/nativeUiOffscreenWindow.test.ts index a2de197863..841749f113 100644 --- a/tests/boundary/providers/native/nativeUiOffscreenWindow.test.ts +++ b/tests/boundary/providers/native/nativeUiOffscreenWindow.test.ts @@ -61,7 +61,7 @@ const launch = async (bundle: string, name: string) => { // facts need no Accessibility or Screen Recording permission. it.skipIf(process.platform !== "darwin")( "selects a window that exists off screen and still refuses absent and foreign windows", - { timeout: 240_000 }, + { tags: ["long-running"] }, async () => { const root = await createTestTempDirectory("rea-native-ui-offscreen-"); const bundle = join(root, "Fixture.app"); diff --git a/tests/boundary/sqlite/sqliteDatabaseBusy.test.ts b/tests/boundary/sqlite/sqliteDatabaseBusy.test.ts index c4779ca5e2..3eb5e7169e 100644 --- a/tests/boundary/sqlite/sqliteDatabaseBusy.test.ts +++ b/tests/boundary/sqlite/sqliteDatabaseBusy.test.ts @@ -159,5 +159,4 @@ it.runIf(process.platform === "win32")( expectRetryableBusy(result.error, database.path); await expectRootsRemoved(roots); }, - 20_000, ); diff --git a/tests/conformance/package/conformanceFixtureVerifier.test.ts b/tests/conformance/package/conformanceFixtureVerifier.test.ts index 3c17c20506..aabbcefa79 100644 --- a/tests/conformance/package/conformanceFixtureVerifier.test.ts +++ b/tests/conformance/package/conformanceFixtureVerifier.test.ts @@ -46,6 +46,7 @@ it.skipIf(process.platform !== "darwin" && process.platform !== "linux").each([ { mode: "fragment", marker: "performAction:error:" }, ])( "verifies compiler-produced fixture records: $mode / $marker", + { tags: ["long-running"] }, async ({ mode, marker }) => { const { commands, root } = await ownedFixture("rea-fixture-symbols-"); const sources = join(root, "sources"); @@ -129,48 +130,43 @@ it.skipIf(process.platform !== "darwin" && process.platform !== "linux").each([ expect(JSON.parse(completed.stdout)).toMatchObject({ verified: 2 }); } }, - 120_000, ); it.each([ { schemaVersion: undefined, expectations: {} }, { schemaVersion: 1, expectations: {} }, { schemaVersion: 2, expectations: { strings: ["ambiguous"] } }, -])( - "refuses retired manifest semantics: %j", - async (legacy) => { - const { commands, root } = await ownedFixture( - "rea-fixture-manifest-version-", - ); - const manifest = join(root, "manifest.json"); - await writeFile( - manifest, - JSON.stringify({ - schemaVersion: legacy.schemaVersion, - platform: "linux", - fixtures: [{ expectations: legacy.expectations }], - }), - ); - await expect( - commands.exec(process.execPath, [verifier, manifest, root], { - cwd: root, - timeout: 10_000, - }), - ).rejects.toMatchObject({ - code: 1, - snapshot: { - stderr: { - text: expect.stringContaining( - legacy.schemaVersion === 2 - ? "Invalid conformance fixture string expectations" - : "Unsupported conformance manifest", - ), - }, +])("refuses retired manifest semantics: %j", async (legacy) => { + const { commands, root } = await ownedFixture( + "rea-fixture-manifest-version-", + ); + const manifest = join(root, "manifest.json"); + await writeFile( + manifest, + JSON.stringify({ + schemaVersion: legacy.schemaVersion, + platform: "linux", + fixtures: [{ expectations: legacy.expectations }], + }), + ); + await expect( + commands.exec(process.execPath, [verifier, manifest, root], { + cwd: root, + timeout: 10_000, + }), + ).rejects.toMatchObject({ + code: 1, + snapshot: { + stderr: { + text: expect.stringContaining( + legacy.schemaVersion === 2 + ? "Invalid conformance fixture string expectations" + : "Unsupported conformance manifest", + ), }, - }); - }, - 30_000, -); + }, + }); +}); it("preserves a carriage return that belongs to an nm symbol name", () => { expect(splitNmSymbolRecords("rea_entry\r\nrea_inventory_0000\n")).toEqual([ diff --git a/tests/process-global/curatedWindowsLane.test.ts b/tests/process-global/curatedWindowsLane.test.ts index 83b144075a..cf31c7fd96 100644 --- a/tests/process-global/curatedWindowsLane.test.ts +++ b/tests/process-global/curatedWindowsLane.test.ts @@ -69,7 +69,7 @@ describe("curated Windows test lane", () => { paths.map(async (path) => ((await exists(path)) ? undefined : path)), ); expect(missing.filter((path) => path !== undefined)).toEqual([]); - }, 10_000); + }); it("keeps the native multi-megabyte output regression in the lane", async () => { expect(await explicitPaths("windows")).toContain( @@ -188,7 +188,7 @@ it("keeps every explicit focused CI test path executable after file moves", asyn paths.map(async (path) => ((await exists(path)) ? undefined : path)), ); expect(missing.filter((path) => path !== undefined)).toEqual([]); -}, 10_000); +}); it("checks the complete source with the fallback compiler before Windows build reuse", async () => { const workflow = workflowSchema.parse( diff --git a/tests/process-global/javascriptRuntimeObservationCli.test.ts b/tests/process-global/javascriptRuntimeObservationCli.test.ts index 50a52769a5..4f5d1e8e0c 100644 --- a/tests/process-global/javascriptRuntimeObservationCli.test.ts +++ b/tests/process-global/javascriptRuntimeObservationCli.test.ts @@ -29,8 +29,6 @@ vi.mock("../../src/composition/javascriptRuntimeObservation.js", () => ({ }, })); -const TIMEOUT_MS = 20_000; - describe("JavaScript runtime observation CLI parity", () => { const resources: Array<{ close(): Promise }> = []; @@ -114,7 +112,6 @@ describe("JavaScript runtime observation CLI parity", () => { await provider.close(); } }, - TIMEOUT_MS, ); test("waits for provider cleanup and retains completed Evidence on failure", async () => { diff --git a/tests/process-global/oneShotSourceClosure.test.ts b/tests/process-global/oneShotSourceClosure.test.ts index 9afbdaed77..7bfcba5cfd 100644 --- a/tests/process-global/oneShotSourceClosure.test.ts +++ b/tests/process-global/oneShotSourceClosure.test.ts @@ -318,7 +318,7 @@ it("keeps cancellation typed for a captured source with a data-sized link set", omitted_count: 1, omitted: [{ evidence_id: wide.evidence_id, reason: "not_inlined" }], }); -}, 60_000); +}); it("hands off the same closure for summary delivery and permits a clean retry", async () => { const input = await fixture(); diff --git a/tests/process-global/updateMaintenance.test.ts b/tests/process-global/updateMaintenance.test.ts index e19ea97e35..1bd4a290f4 100644 --- a/tests/process-global/updateMaintenance.test.ts +++ b/tests/process-global/updateMaintenance.test.ts @@ -573,19 +573,15 @@ describe("updated executable maintenance planning", () => { }); describe("update subprocess boundaries", () => { - cliTest( - "exposes update in CLI help", - async ({ cli }) => { - const help = await cli.run({ - arguments: ["--help"], - environment: process.env, - }); - expect(help.exitCode, help.stderr).toBe(0); - expect(help.stdout).toMatch(/^\s{2}update\s/mu); - expect(help.stdout).not.toMatch(/^\s{2}upgrade\s/mu); - }, - 60_000, - ); + cliTest("exposes update in CLI help", async ({ cli }) => { + const help = await cli.run({ + arguments: ["--help"], + environment: process.env, + }); + expect(help.exitCode, help.stderr).toBe(0); + expect(help.stdout).toMatch(/^\s{2}update\s/mu); + expect(help.stdout).not.toMatch(/^\s{2}upgrade\s/mu); + }); cliTest("rejects the removed upgrade CLI command", async ({ cli }) => { const removed = await cli.run({