From 5039b33a11b4a5cb0b74e7a3080d06ef5daa0813 Mon Sep 17 00:00:00 2001 From: can1357 Date: Mon, 3 Aug 2026 06:52:11 +0200 Subject: [PATCH] test(utils): skipped torn log lines in logger poll loop - waitForLogEntry raced winston's async flush and JSON.parsed a partially written line, failing the error-serialization tests on loaded CI runners; unparseable lines now wait for the next poll. --- packages/utils/test/logger-error-serialization.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/utils/test/logger-error-serialization.test.ts b/packages/utils/test/logger-error-serialization.test.ts index 68594cb36..4204dd8ef 100644 --- a/packages/utils/test/logger-error-serialization.test.ts +++ b/packages/utils/test/logger-error-serialization.test.ts @@ -47,7 +47,13 @@ async function waitForLogEntry(targetMessage: string): Promise; + let entry: Record; + try { + entry = JSON.parse(line) as Record; + } catch { + // Torn tail of an in-flight write; the line completes on a later poll. + continue; + } if (entry.message === targetMessage) return entry; } }