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