Repository navigation
fix(host): follow redirects when resolving the latest release tag - #220
Merged
Merged
Conversation
## Summary `resolve_latest_tag` built a client with `redirect::Policy::none()` and read the `Location` header of the first response, assuming GitHub answers `/releases/latest` with a single 302 to `/releases/tag/vX.Y.Z`. When the repository was moved to another owner, hop #1 became the rename 301 to the new owner's `/releases/latest`, so the parsed tag was `latest` and every `zedra update` failed with "failed to resolve latest release tag from GitHub". Follow redirects and read the tag off the final URL instead. ## Notes - The download path already used a redirect-following client, so `zedra update --version vX.Y.Z` kept working throughout — only tag resolution broke. - Makes any future owner or name change transparent to the updater. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rucg8rUeVtQhjeJfAGs4Uk
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rucg8rUeVtQhjeJfAGs4Uk
tanlethanh
force-pushed
the
fix/update-check-redirect
branch
from
August 27, 2026 12:22
0a11df6 to
f283fa1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
zedra updatefailed for every installed host withfailed to resolve latest release tag from GitHub.resolve_latest_tagusedredirect::Policy::none()and read hop #1'sLocation, assuming GitHub answers/releases/latestwith a single 302 to/releases/tag/vX.Y.Z. After the repository moved owners, hop #1 became the rename 301 to the new owner's/releases/latest, so the parsed tag waslatestand thestarts_with('v')guard rejected it.Now the client follows redirects and reads the tag off the final URL, which makes any future owner or name change transparent to the updater.
Notes
zedra update --version vX.Y.Zkept working — only tag resolution broke.tanlethanh/zedra, so old binaries resolve tags again without this fix; the fix is what makes a future move safe.v0.4.4, published as a pre-release so/releases/lateststays onv0.4.3until it is promoted.🤖 Generated with Claude Code
https://claude.ai/code/session_01Rucg8rUeVtQhjeJfAGs4Uk