Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/build-runlog-index.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,11 @@ def main_github(repo, branch, write, only):
head, tail = head_tail(text)
else:
head = _raw_range(repo, branch, it['path'], f'bytes=0-{HEAD_BYTES-1}')
tail = _raw_range(repo, branch, it['path'], f'bytes=-{TAIL_BYTES}') if it['size'] > TAIL_BYTES else head
# Explicit start-end, never a suffix range (`bytes=-N`): on a PRIVATE repo the
# token-authenticated raw host answers suffix ranges with "501 Unsupported
# client range" (arena-experiments, 2026-11-04), while the public course repo
# accepted them. The size comes from the contents listing, so no probe needed.
tail = _raw_range(repo, branch, it['path'], f"bytes={it['size'] - TAIL_BYTES}-{it['size'] - 1}") if it['size'] > TAIL_BYTES else head
runs.append(bookends(it['path'], it['size'], head, tail, err))
index = {'format_version': 1, 'folder': name, 'generated': 'scripts/build-runlog-index.py', 'runs': runs}
total += len(runs)
Expand Down
Loading