diff --git a/src/agents/bash-tools.e2e.test.ts b/src/agents/bash-tools.e2e.test.ts index a619e186d03..5484ab84975 100644 --- a/src/agents/bash-tools.e2e.test.ts +++ b/src/agents/bash-tools.e2e.test.ts @@ -223,7 +223,7 @@ describe("exec tool backgrounding", () => { }); it("defaults process log to a bounded tail when no window is provided", async () => { - const lines = Array.from({ length: 260 }, (_value, index) => `line-${index + 1}`); + const lines = Array.from({ length: 220 }, (_value, index) => `line-${index + 1}`); const sessionId = await runBackgroundEchoLines(lines); const log = await processTool.execute("call2", { @@ -232,11 +232,11 @@ describe("exec tool backgrounding", () => { }); const textBlock = log.content.find((c) => c.type === "text")?.text ?? ""; const firstLine = textBlock.split("\n")[0]?.trim(); - expect(textBlock).toContain("showing last 200 of 260 lines"); - expect(firstLine).toBe("line-61"); - expect(textBlock).toContain("line-61"); - expect(textBlock).toContain("line-260"); - expect((log.details as { totalLines?: number }).totalLines).toBe(260); + expect(textBlock).toContain("showing last 200 of 220 lines"); + expect(firstLine).toBe("line-21"); + expect(textBlock).toContain("line-21"); + expect(textBlock).toContain("line-220"); + expect((log.details as { totalLines?: number }).totalLines).toBe(220); }); it("supports line offsets for log slices", async () => { @@ -258,7 +258,7 @@ describe("exec tool backgrounding", () => { }); it("keeps offset-only log requests unbounded by default tail mode", async () => { - const lines = Array.from({ length: 260 }, (_value, index) => `line-${index + 1}`); + const lines = Array.from({ length: 220 }, (_value, index) => `line-${index + 1}`); const sessionId = await runBackgroundEchoLines(lines); const log = await processTool.execute("call2", { @@ -270,9 +270,9 @@ describe("exec tool backgrounding", () => { const textBlock = log.content.find((c) => c.type === "text")?.text ?? ""; const renderedLines = textBlock.split("\n"); expect(renderedLines[0]?.trim()).toBe("line-31"); - expect(renderedLines[renderedLines.length - 1]?.trim()).toBe("line-260"); + expect(renderedLines[renderedLines.length - 1]?.trim()).toBe("line-220"); expect(textBlock).not.toContain("showing last 200"); - expect((log.details as { totalLines?: number }).totalLines).toBe(260); + expect((log.details as { totalLines?: number }).totalLines).toBe(220); }); it("scopes process sessions by scopeKey", async () => { diff --git a/src/agents/bash-tools.exec.background-abort.e2e.test.ts b/src/agents/bash-tools.exec.background-abort.e2e.test.ts index 2e1e2fb8bbc..5191ef54c79 100644 --- a/src/agents/bash-tools.exec.background-abort.e2e.test.ts +++ b/src/agents/bash-tools.exec.background-abort.e2e.test.ts @@ -7,11 +7,11 @@ import { import { createExecTool } from "./bash-tools.exec.js"; import { killProcessTree } from "./shell-utils.js"; -const BACKGROUND_HOLD_CMD = 'node -e "setTimeout(() => {}, 500)"'; +const BACKGROUND_HOLD_CMD = 'node -e "setTimeout(() => {}, 250)"'; const ABORT_SETTLE_MS = process.platform === "win32" ? 200 : 60; -const ABORT_WAIT_TIMEOUT_MS = process.platform === "win32" ? 1_500 : 450; +const ABORT_WAIT_TIMEOUT_MS = process.platform === "win32" ? 1_500 : 320; const POLL_INTERVAL_MS = 15; -const FINISHED_WAIT_TIMEOUT_MS = process.platform === "win32" ? 8_000 : 1_200; +const FINISHED_WAIT_TIMEOUT_MS = process.platform === "win32" ? 8_000 : 900; const BACKGROUND_TIMEOUT_SEC = process.platform === "win32" ? 0.2 : 0.12; const TEST_EXEC_DEFAULTS = { security: "full" as const,