The store version comes from the US storefront, so devices in China
mainland, where Folo was pulled from the App Store, would be asked to
install every new release from a page that says the app is unavailable.
Use the request country as a stand-in for the storefront and answer
none for iOS there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sync endpoint compared the request header with the configured token,
so on a deployment without the secret both were undefined and any request
could start a sync, spending the GitHub token's rate limit and writing
R2 and KV. Refuse requests unless a token is configured and sent, and
compare it in constant time.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The macOS download link always picked the Apple Silicon DMG, so Intel
Mac users had no link to the x64 installer that every release already
ships. Add /download/desktop/macos/dmg-x64.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every cron sync since 2026-09-23 exceeded the Worker memory limit. The
GitHub release list changes whenever download counts do, so each run
downloaded and fully decompressed every OTA archive on the first page
(a 58 MB desktop archive plus five mobile ones) into memory again.
- Skip releases whose stored record already matches, and only rewrite
the record when just the metadata changed; latest pointers are still
reconciled.
- Stream the archive through the zstd decompressor and tar extractor
with backpressure and upload each verified file as it is extracted,
so memory stays bounded by the largest referenced file. The download
is cancelled as soon as extraction fails.
- Sync each release independently so one broken release no longer
blocks the others; failures still fail the run and keep the stored
ETag so the next run retries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>