From 52a4694fd58d2f2a6bcab7f2ef47cc3679e184ea Mon Sep 17 00:00:00 2001 From: Orca Worker Date: Sat, 12 Sep 2026 00:25:17 -0700 Subject: [PATCH] docs: record bounded log excerpt ordering invariant --- src/shared/check-job-log-tail-slice.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/check-job-log-tail-slice.ts b/src/shared/check-job-log-tail-slice.ts index 7208c89b0e3..7eef5026c0a 100644 --- a/src/shared/check-job-log-tail-slice.ts +++ b/src/shared/check-job-log-tail-slice.ts @@ -34,6 +34,7 @@ function joinLogExcerptWithByteCap(prefixLines: string[], recentLines: string[]) function collectEarlierErrorLineIndexes(lines: string[], recentStart: number): number[] { const indexes = new Set() + // Newest-first errors and descending windows add the newest unique indexes first. for (let index = recentStart - 1; index >= 0; index -= 1) { if (!ERROR_LINE_PATTERN.test(lines[index] ?? '')) { continue