Skip to content

fix(update): bypass GitHub raw CDN cache for self-update#22

Open
mldangelo wants to merge 2 commits intomainfrom
fix/update-cdn-cache
Open

fix(update): bypass GitHub raw CDN cache for self-update#22
mldangelo wants to merge 2 commits intomainfrom
fix/update-cdn-cache

Conversation

@mldangelo
Copy link
Member

Summary

  • crab update was always reporting "Already up to date" after a new version was merged because raw.githubusercontent.com serves cached content (max-age=300)
  • Added cache-busting via Cache-Control: no-cache header and a timestamp query parameter to force fresh downloads
  • Added validation that the downloaded file actually contains a version string before replacing the installed binary

Test plan

  • Run crab update immediately after merging a version bump — should detect the new version instead of reporting "Already up to date"
  • Run crab update when already on latest — should correctly report "Already up to date"
  • Simulate a corrupted download (e.g. empty file) — should error with "Downloaded file is invalid" instead of replacing the binary

🤖 Generated with Claude Code

mldangelo and others added 2 commits February 13, 2026 21:28
The `crab update` command was reporting "Already up to date" even after
a new version was merged, because raw.githubusercontent.com serves
cached content (max-age=300). Add cache-busting via Cache-Control header
and timestamp query param. Also validate the downloaded file contains a
version string before replacing the binary.

Co-Authored-By: Claude Opus 4.6 <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

Comments