From 8daf48d5ea7c215c52231927e90af7e726c10c99 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 31 Oct 2026 14:20:14 +0000 Subject: [PATCH] fix: pre-landing review fixes Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- test/llm-judge-stream.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/llm-judge-stream.test.ts b/test/llm-judge-stream.test.ts index d5365d49a..204368c01 100644 --- a/test/llm-judge-stream.test.ts +++ b/test/llm-judge-stream.test.ts @@ -259,6 +259,7 @@ test('pings after the last SDK event show a live connection; a silent socket sho const event = JSON.parse(diagnostics.mock.calls[0]![0]); expect(event).toMatchObject({ type: 'llm-judge-aborted', httpStatuses: [200], block: 'thinking', thinkingChars: 0, textChars: 0, messageId: 'msg_quiet', bytesReceived: opened + pings * ping.byteLength }); - expect(event.lastByteMs).toBeGreaterThanOrEqual(event.lastEventMs); // gstack-timing-ok: ordering of two recorded offsets, not an elapsed-time bound + if (pings) expect(event.lastByteMs).toBeGreaterThanOrEqual(event.lastEventMs); // gstack-timing-ok: ordering of two recorded offsets, not an elapsed-time bound + else expect(event.lastByteMs).toBeLessThanOrEqual(event.lastEventMs); // gstack-timing-ok: the last byte is counted before the SDK parses it } });