From cb705c9856d89a8cece64cc4c90beac527a98736 Mon Sep 17 00:00:00 2001 From: dotta Date: Tue, 7 Apr 2026 17:56:39 -0500 Subject: [PATCH] Fix signoff PR follow-up tests --- .../__tests__/heartbeat-comment-wake-batching.test.ts | 6 +++--- tests/e2e/signoff-policy.spec.ts | 11 ++++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/server/src/__tests__/heartbeat-comment-wake-batching.test.ts b/server/src/__tests__/heartbeat-comment-wake-batching.test.ts index 7ac77ec4..5c5d8805 100644 --- a/server/src/__tests__/heartbeat-comment-wake-batching.test.ts +++ b/server/src/__tests__/heartbeat-comment-wake-batching.test.ts @@ -222,7 +222,7 @@ describe("heartbeat comment wake batching", () => { db = createDb(started.connectionString); instance = started.instance; dataDir = started.dataDir; - }, 20_000); + }, 45_000); afterAll(async () => { await instance?.stop(); @@ -406,7 +406,7 @@ describe("heartbeat comment wake batching", () => { await waitFor(async () => { const runs = await db.select().from(heartbeatRuns).where(eq(heartbeatRuns.agentId, agentId)); return runs.length === 2 && runs.every((run) => run.status === "succeeded"); - }); + }, 30_000); const secondPayload = gateway.getAgentPayloads()[1] ?? {}; expect(secondPayload.paperclip).toMatchObject({ @@ -422,7 +422,7 @@ describe("heartbeat comment wake batching", () => { gateway.releaseFirstWait(); await gateway.close(); } - }, 20_000); + }, 45_000); it("queues exactly one follow-up run when an issue-bound run exits without a comment", async () => { const gateway = await createControlledGatewayServer(); diff --git a/tests/e2e/signoff-policy.spec.ts b/tests/e2e/signoff-policy.spec.ts index 97e67746..934eeaf9 100644 --- a/tests/e2e/signoff-policy.spec.ts +++ b/tests/e2e/signoff-policy.spec.ts @@ -138,7 +138,16 @@ async function setupCompany(boardRequest: APIRequestContext): Promise { const agentRes = await boardRequest.post(`${BASE_URL}/api/companies/${companyId}/agents`, { - data: { name, role, title, adapterType: "process", adapterConfig: { command: "echo done" } }, + data: { + name, + role, + title, + adapterType: "process", + adapterConfig: { + command: process.execPath, + args: ["-e", "process.stdout.write('done\\n')"], + }, + }, }); expect(agentRes.ok()).toBe(true); const agent = await agentRes.json();