From 4214ae205d3dbd8d99a6ff67f63fa5670712cad4 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Wed, 1 Apr 2026 23:48:30 +0000 Subject: [PATCH] chore: generate --- .../app/e2e/session/session-review.spec.ts | 4 +--- .../test/session/snapshot-tool-race.test.ts | 19 +++++++++---------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/packages/app/e2e/session/session-review.spec.ts b/packages/app/e2e/session/session-review.spec.ts index fb6a7ad1db..c7529112ff 100644 --- a/packages/app/e2e/session/session-review.spec.ts +++ b/packages/app/e2e/session/session-review.spec.ts @@ -64,9 +64,7 @@ async function patchWithMock( // Wait for the agent loop to actually start before checking idle. // promptAsync is fire-and-forget — without this, waitSessionIdle can // return immediately because the session status is still undefined. - await expect - .poll(() => llm.calls().then((c) => c > callsBefore), { timeout: 30_000 }) - .toBe(true) + await expect.poll(() => llm.calls().then((c) => c > callsBefore), { timeout: 30_000 }).toBe(true) await waitSessionIdle(sdk, sessionID, 120_000) } diff --git a/packages/opencode/test/session/snapshot-tool-race.test.ts b/packages/opencode/test/session/snapshot-tool-race.test.ts index b6c2718c67..65fd62aa38 100644 --- a/packages/opencode/test/session/snapshot-tool-race.test.ts +++ b/packages/opencode/test/session/snapshot-tool-race.test.ts @@ -183,15 +183,11 @@ it.live("tool execution produces non-empty session diff (snapshot race)", () => // Use bash tool (always registered) to create a file const command = `echo 'snapshot race test content' > ${path.join(dir, "race-test.txt")}` - yield* llm.toolMatch( - (hit) => JSON.stringify(hit.body).includes("create the file"), - "bash", - { command, description: "create test file" }, - ) - yield* llm.textMatch( - (hit) => JSON.stringify(hit.body).includes("bash"), - "done", - ) + yield* llm.toolMatch((hit) => JSON.stringify(hit.body).includes("create the file"), "bash", { + command, + description: "create test file", + }) + yield* llm.textMatch((hit) => JSON.stringify(hit.body).includes("bash"), "done") // Seed user message yield* prompt.prompt({ @@ -208,7 +204,10 @@ it.live("tool execution produces non-empty session diff (snapshot race)", () => // Verify the file was created const filePath = path.join(dir, "race-test.txt") const fileExists = yield* Effect.promise(() => - fs.access(filePath).then(() => true).catch(() => false), + fs + .access(filePath) + .then(() => true) + .catch(() => false), ) expect(fileExists).toBe(true)