docs: record bounded log excerpt ordering invariant

This commit is contained in:
Orca Worker
2026-09-12 00:25:17 -07:00
parent 2a60b9a847
commit 52a4694fd5
+1
View File
@@ -34,6 +34,7 @@ function joinLogExcerptWithByteCap(prefixLines: string[], recentLines: string[])
function collectEarlierErrorLineIndexes(lines: string[], recentStart: number): number[] {
const indexes = new Set<number>()
// 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