Skip to content

feat(engines): take a download from Filee's mirror when its URL fails - #1487

Open
KnifeLemon wants to merge 2 commits into
mainfrom
feat/engine-download-mirror
Open

KnifeLemon wants to merge 2 commits into
mainfrom
feat/engine-download-mirror

Conversation

@KnifeLemon

Copy link
Copy Markdown
Owner

Follow-up to #1474 / #1484: a released Filee can't change the engine URLs it pinned, so when a download site drops a version (LibreOffice's "stable" folder lost 26.2.6), every installed copy fails until the next release. This adds a second source.

What changed

  • EngineDownloads.MirrorUrl: https://dl.filee.sh/engines/<sha256>/<file name>, Filee's own copy on Cloudflare R2 (bucket filee-downloads). Files live under their hash, so a pin and its copy can't get mixed up, and old pins stay for the versions that use them.
  • EngineInstaller: when the pinned URL answers an error, times out, breaks off or serves a file with another SHA-256, the same download comes from the mirror. The pinned SHA-256 is checked either way, so the mirror can't hand out anything else. If both fail, the URL's error is the one reported, and both attempts are logged. Local files ("Install from downloaded files…") are unchanged.
  • build/fetch-engines.ps1: the same fallback, so CI and release builds don't stop on a retired URL.
  • build/mirror-engines.ps1 (new): copies every pinned download, for every runtime, to the mirror. It skips what's already served at the right size, checks each SHA-256 before uploading with Wrangler, and checks the served file afterwards. -WhatIf lists what's missing.
  • docs/ENGINES.md: run the mirror script after bumping a pin.

Tests

  • EngineInstallerTests:
    • a 404 URL is taken from the mirror;
    • a replaced file is taken from the mirror and checked again;
    • a mirror with the wrong file is refused;
    • both failing reports the URL's error;
    • the mirror URL's shape.
  • Engine tests: 74 passed. App engine tests: 10 passed. CLI engine tests: 22 passed. dotnet format is clean.

The mirror is filled with build/mirror-engines.ps1 before this ships (2.4.1).

🤖 Generated with Claude Code

KnifeLemon and others added 2 commits November 14, 2026 03:53
Download sites drop old versions: LibreOffice 26.2.6 left the "stable" folder when
26.2.7 came out, and every released Filee then failed to download it (#1474). A
released Filee can't change its pinned URLs, so the installer now keeps a second
source: https://dl.filee.sh/engines/<sha256>/<file name>, Filee's copy on Cloudflare
R2. When the pinned URL answers an error, times out, breaks off or serves another
file, the same download comes from there, checked against the same SHA-256; the
first error is reported if both fail. build/fetch-engines.ps1 does the same, and
build/mirror-engines.ps1 copies every pinned download (all runtimes) to the mirror.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant