Updates and the installer downloaded every file from github.com, which
answered 504 for every release file for hours on 2026-11-08. The site now
keeps a copy on R2 (bucket magpie-releases, binding RELEASES):
- A five-minute cron copies the newest release and the Stable one from
github.com (or, when that fails, GitHub's API) into R2. R2's put takes a
file only with the SHA-256 the release's SHA256SUMS gives. A run starts
no copy after 4 minutes; the feeds' tags and the 4 newest besides are
kept, older ones deleted.
- /files/<tag>/<file> serves R2's copy, Range and conditional asks
included; a file R2 doesn't hold, or a failing R2, is a 302 to
github.com.
- /api/latest (both channels) and /download name /files only for a file
R2 holds under the release's hash, and give every file's github.com
address as `github`, which the previous commit's clients fall back to.
Older clients only mirror a github.com address, so a mirror never goes
in front of the site's.
- start (en, zh, ja), privacy (en, zh, ja) and reference.md say where
files come from.
Run (mote): node --test site/*.test.mjs 104/104, with files.test.mjs
(R2 stood in for by r2stub.mjs) and new worker tests for the feed,
/download, /files and the cron. wrangler deploy --dry-run binds RELEASES.
Broken by hand: onR2 taking any held file regardless of hash, two tests
red (the feed test and "bytes R2 holds under another hash").
Not tried yet: the real cron run and R2 serving (after deploy).