Skip to content

ci(measure): resume a reference model that comes back short instead of restarting it (#1386) - #1387

Merged
DrunkOnJava merged 1 commit into
mainfrom
ci/fetch-models-resume
Nov 4, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
ci/fetch-models-resume

Conversation

@DrunkOnJava

Copy link
Copy Markdown
Owner

Summary

Closes #1386. tools/fetch-reference-models.sh deleted a download that came back short and fetched it again from zero, three times in all. Measure run 41907340876 lost all three attempts at the 33.7 MB Core Interior to truncation by the LFS CDN, and the run failed after 22 minutes without measuring anything.

A short download now resumes from the bytes it has, with an HTTP Range request. A 206 response continues the file, and any other success is the whole file. There are six attempts, with a pause of min(10·attempt, 60) s. A full-size file whose hash differs, or an oversized one, is a real mismatch: it is deleted and fetched again from the start, and fails the run if it never matches.

Testing

  • Resume on the real file: I ran the script's own Python against a one-artifact registry (Einhoven, 913,408 bytes) with a 400,000-byte truncated copy in place. It resumed and verified the pinned sha256, exiting 0.
  • Python check: the script parses.
  • Measure: the next run exercises it on every model.

Related issues

#1386

… bytes it has instead of restarting, six attempts with a growing pause (#1386)
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 4, 2026 20:56
@DrunkOnJava
DrunkOnJava merged commit ec61d8c into main Nov 4, 2026
51 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/fetch-models-resume branch November 4, 2026 21:05
DrunkOnJava added a commit that referenced this pull request Nov 4, 2026
… restarting it (#1386) (#1391)

## Summary

Refs #1386. #1387 made `tools/fetch-reference-models.sh` resume a
reference model the CDN returned short. The held-out fetchers
(`tools/ci/fetch-holdout-models.sh`,
`tools/ci/fetch-holdout-archives.sh`) still used `curl --retry 3`, which
restarts from zero on every retry. Measure run 41917795170's held-out
shard reported "held-out models NOT MEASURED: a file could not be
downloaded", so #1382's holdout check measured nothing.

Both now go through `tools/ci/fetch-resume.sh` (`fetch_resume URL OUT`):
- `curl -C -` resumes a partial file.
- A server that refuses the range (curl 33 or 36) starts the file again.
- Six attempts, with a pause of 10, 20 … 60 s.

The pin checks (sha256 and byte count, exit 1 on a mismatch, 2 when a
file cannot be fetched) are unchanged.

## Testing

- **Resume on the real file:** `fetch_resume` resumed a 300,000-byte
partial of Einhoven (media.githubusercontent.com) to 913,408 bytes, and
the result matches its pinned sha256.
- **A missing URL:** it retries, then returns non-zero.
- **Syntax and lint:** `bash -n` and `shellcheck -x` are clean on all
three scripts.
- **Measure:** the next held-out run exercises it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Measure: a reference model the LFS CDN keeps truncating fails the run; resume short downloads instead of restarting them

1 participant