diff --git a/packages/acp-core/src/session-interaction-mode.test.ts b/packages/acp-core/src/session-interaction-mode.test.ts index 0bf5784286b9..b20ecd433f2d 100644 --- a/packages/acp-core/src/session-interaction-mode.test.ts +++ b/packages/acp-core/src/session-interaction-mode.test.ts @@ -99,8 +99,4 @@ describe("isRequesterParentOfBackgroundAcpSession", () => { ), ).toBe(true); }); - - it("delegates to isParentOwnedBackgroundAcpSession for target-only checks", () => { - expect(isParentOwnedBackgroundAcpSession(backgroundEntry)).toBe(true); - }); }); diff --git a/src/gateway/http-common.fuzz.test.ts b/src/gateway/http-common.fuzz.test.ts index 167e0f47ab0c..79ba47b84d5b 100644 --- a/src/gateway/http-common.fuzz.test.ts +++ b/src/gateway/http-common.fuzz.test.ts @@ -11,11 +11,8 @@ import { sendJson, sendMethodNotAllowed, sendRateLimited, - sendUnauthorized, setDefaultSecurityHeaders, - setSseHeaders, watchClientDisconnect, - writeDone, } from "./http-common.js"; import { makeMockHttpReqRes, makeMockHttpResponse } from "./test-http-response.js"; @@ -176,20 +173,6 @@ describe("fuzz: sendMethodNotAllowed", () => { }); }); -describe("fuzz: sendUnauthorized", () => { - it("is deterministic: always 401 with the canonical error payload", () => { - const expected = JSON.stringify({ - error: { message: "Unauthorized", type: "unauthorized" }, - }); - for (let i = 0; i < ITERATIONS; i += 1) { - const { res, end } = makeMockHttpResponse(); - sendUnauthorized(res); - expect(res.statusCode).toBe(401); - expect(end).toHaveBeenCalledWith(expected); - } - }); -}); - describe("fuzz: sendRateLimited", () => { it("sets Retry-After iff retryAfterMs is truthy and > 0, with ceil-seconds value", () => { const rng = makeRng(0x429); @@ -318,42 +301,6 @@ describe("fuzz: readJsonBodyOrError", () => { }); }); -describe("fuzz: writeDone", () => { - it("always writes the DONE sentinel exactly once per call", () => { - for (let i = 0; i < ITERATIONS; i += 1) { - const { res } = makeMockHttpResponse(); - const write = vi.spyOn(res, "write"); - writeDone(res); - expect(write).toHaveBeenCalledTimes(1); - expect(write).toHaveBeenCalledWith("data: [DONE]\n\n"); - } - }); -}); - -describe("fuzz: setSseHeaders", () => { - it("sets SSE headers and invokes flushHeaders when present", () => { - const rng = makeRng(0x55e); - for (let i = 0; i < ITERATIONS; i += 1) { - const { res, setHeader } = makeMockHttpResponse(); - const hasFlush = rng() < 0.5; - const flushHeaders = vi.fn(); - if (hasFlush) { - (res as unknown as { flushHeaders: () => void }).flushHeaders = flushHeaders; - } - setSseHeaders(res); - expect(res.statusCode).toBe(200); - expect(setHeader).toHaveBeenCalledWith("Content-Type", "text/event-stream; charset=utf-8"); - expect(setHeader).toHaveBeenCalledWith("Cache-Control", "no-cache"); - expect(setHeader).toHaveBeenCalledWith("Connection", "keep-alive"); - if (hasFlush) { - expect(flushHeaders).toHaveBeenCalledTimes(1); - } else { - expect(flushHeaders).not.toHaveBeenCalled(); - } - } - }); -}); - describe("fuzz: watchClientDisconnect", () => { it("invariants hold for arbitrary socket/controller/callback combinations", () => { const rng = makeRng(0xc105e); diff --git a/src/infra/boundary-file-read.test.ts b/src/infra/boundary-file-read.test.ts index d4cd1a647980..051ed5fbac96 100644 --- a/src/infra/boundary-file-read.test.ts +++ b/src/infra/boundary-file-read.test.ts @@ -9,13 +9,6 @@ import * as shim from "./boundary-file-read.js"; const tempDirs = useAutoCleanupTempDirTracker(afterEach); describe("root file open shim", () => { - it("re-exports the fs-safe root file helpers", () => { - expect(shim.canUseRootFileOpen).toBe(upstream.canUseRootFileOpen); - expect(shim.matchRootFileOpenFailure).toBe(upstream.matchRootFileOpenFailure); - expect(shim.openRootFile).toBe(upstream.openRootFile); - expect(shim.openRootFileSync).toBe(upstream.openRootFileSync); - }); - it("separates missing, unreadable, and boundary-violating open failures", () => { const messageFor = (failure: upstream.RootFileOpenFailure) => shim.describeRootFileOpenFailure({