Skip to content

fix(windows): check for updates through the release download links, not GitHub's API - #50

Merged
mayuki merged 1 commit into
mainfrom
claude/velopack-windows-update-403-d92acc
Nov 2, 2026
Merged

mayuki merged 1 commit into
mainfrom
claude/velopack-windows-update-403-d92acc

Conversation

@mayuki

@mayuki mayuki commented Nov 2, 2026

Copy link
Copy Markdown
Member

Summary

  • The in-app update check on Windows failed with Response status code does not indicate success: 403 (rate limit exceeded). Velopack's GithubSource lists the releases through GitHub's API, and without a token that API allows 60 requests an hour per source address. Everyone behind the same NAT (an office network, a VPN) shares those 60, and so do other tools that call the API without a token. On the machine where this was reported, https://api.github.com/rate_limit showed core at 60/60 used. A token cannot be shipped in the app.
  • New LatestReleaseUpdateManager (Preferis.Platform.Windows, Windows only under VELOPACK): an UpdateManager over SimpleWebSource("https://github.com/Cysharp/Preferis/releases/latest/download/"). GitHub redirects releases/latest/download/<file> to that file of the latest release, which skips drafts and prereleases as prerelease: false did, and does not go through the API. VelopackUpdater in the settings app now uses it.
  • Deltas: GithubSource merged the feeds of the last 10 releases, so an installation several versions behind could chain deltas. The latest release's feed only lists what PackageWindows packed with it: its full and delta packages, plus the full package of the release before, which vpk download github fetched to make the delta. Velopack would apply that one delta to an older installation as well. Files the delta marks as unchanged would then stay at the installed version, and Velopack does not verify the patched result. CreateDeltaUpdateStrategy is overridden so deltas are used only when the feed has the installed version's full package, which means the installation is exactly one release behind. Anything older downloads the full package.
  • Docs: Platform.ja.md §2.1 now explains why the API is not used and when deltas apply. Design.ja.md §4.4 is updated and the decision log has a new row.

Verification

  • dotnet test Preferis.Windows.slnf -p:Platform=x64: 984 passed (Core 606, Platform 134, Settings.Core 244), including the 3 new LatestReleaseUpdateManagerTests (written first and seen failing).
  • dotnet build src/Preferis.Settings.Windows -p:Platform=x64: 0 warnings, 0 errors.
  • releases/latest/download/releases.win-x64.json with the query string SimpleWebSource appends (arch, os, rid, id, localVersion) returns the 1.0.0 feed (HTTP 200).
  • Not verified: an actual update from an installed copy, which needs a second public release, and the NativeAOT publish (PackageWindows).

🤖 Generated with Claude Code

…ot GitHub's API

GithubSource lists the releases through GitHub's API, which allows 60
requests an hour per address without a token, shared by everyone behind
the same NAT, so the check failed with 403 (rate limit exceeded).
LatestReleaseUpdateManager reads releases/latest/download/ with
SimpleWebSource instead. The latest release's feed only holds the delta
from the release before, so an installation further behind takes the
full package rather than a delta applied to the wrong base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mayuki
mayuki merged commit d3e9a2f into main Nov 2, 2026
3 checks passed
@mayuki
mayuki deleted the claude/velopack-windows-update-403-d92acc branch November 2, 2026 08:25
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