From 2a10d16114e7abb66021d4f0d0a663b10d7d574f Mon Sep 17 00:00:00 2001 From: Aaron Scherer <896295+cryptiklemur@users.noreply.github.com> Date: Thu, 20 Aug 2026 11:00:34 -0500 Subject: [PATCH] test(chatcore): wait for queued call log writes (#10683) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merged — locally validated (70/70 combined chatcore-translation-paths tests, typecheck:core clean, gates green). Thanks! --- tests/unit/chatcore-translation-paths.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/chatcore-translation-paths.test.ts b/tests/unit/chatcore-translation-paths.test.ts index 482f273332..db081c9345 100644 --- a/tests/unit/chatcore-translation-paths.test.ts +++ b/tests/unit/chatcore-translation-paths.test.ts @@ -36,7 +36,8 @@ const { setBackgroundDegradationConfig, resetStats: resetBackgroundStats, } = await import("../../open-sse/services/backgroundTaskDetector.ts"); -const { getCallLogs, getCallLogById } = await import("../../src/lib/usage/callLogs.ts"); +const { getCallLogs, getCallLogById, waitForCallLogSaves } = + await import("../../src/lib/usage/callLogs.ts"); const { handleChatCore, shouldUseNativeCodexPassthrough, @@ -286,6 +287,7 @@ async function flushAsyncSideEffects() { } async function getLatestCallLog() { + await waitForCallLogSaves(5000); const rows = await getCallLogs({ limit: 5 }); if (!Array.isArray(rows) || rows.length === 0) return null; return getCallLogById(rows[0].id);