From c7fbd0e1827055a95c720e06483e0f61248f1692 Mon Sep 17 00:00:00 2001 From: Michael B Reiser Date: Wed, 4 Nov 2026 14:18:19 -0500 Subject: [PATCH] build-runlog-index: explicit tail range (private-repo raw host rejects suffix ranges) The first full rebuild in the private reiserlab/arena-experiments failed with "501 Unsupported client range" on bytes=-4096 for an uncompressed .jsonl; the public course repo accepted the same request. Read the tail as bytes=- instead (the size is in the contents listing). Already applied in arena-experiments (062614d); this keeps the source of truth in step. LAB-227. Co-Authored-By: Claude Fable 5.1 --- scripts/build-runlog-index.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/build-runlog-index.py b/scripts/build-runlog-index.py index 81c60269..3a489724 100755 --- a/scripts/build-runlog-index.py +++ b/scripts/build-runlog-index.py @@ -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)