Skip to content

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

Merged
mldangelo merged 2 commits intomainfrom
fix/update-cdn-cache
Feb 23, 2026
Merged

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

Conversation

@mldangelo
Copy link
Copy Markdown
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>
@mldangelo mldangelo merged commit 29f04fa into main Feb 23, 2026
2 checks passed
@mldangelo mldangelo deleted the fix/update-cdn-cache branch February 23, 2026 03:04
This was referenced Mar 18, 2026
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