fix(core): handle absolute URLs in update check redirect parser - #994
Merged
Conversation
GitHub 302 redirects return absolute URLs (https://github.com/codecoradev/uteke/releases/tag/v0.13.1), not relative paths. The previous strip_prefix('/codecoradev/...') always failed on absolute URLs, falling through to the rsplit fallback which required a 'v' prefix. Fix: use find() to locate the tag marker anywhere in the URL, and relax the rsplit fallback to accept any non-empty tag. Found by Cora Code review on PR #990.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
Cora finding: byte-indexed slicing (&loc[idx+len..]) could panic on non-char-boundary if Location header contains multi-byte UTF-8. Replace with split_once() — idiomatic, zero-cost, UTF-8 safe.
Merged
ajianaz
added a commit
that referenced
this pull request
Aug 11, 2026
Version bump 0.13.1 → 0.13.2 + CHANGELOG. Changes since v0.13.1: - feat: update check (CLI, MCP, HTTP) (#990) - fix: NULL embeddings crash vector index (#992, #993) - fix: absolute URL in update check redirect (#994) - fix: LongMemEval benchmark threshold false negatives (#995, #996) - chore: branding refresh (#991) Co-authored-by: ajianaz <ajianaz@users.noreply.github.com>
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.
What
Fix Cora finding on PR #990:
strip_prefixused relative path but GitHub returns absolute URLs in 302 redirects.Why
GitHub's 302 redirect returns
Location: https://github.com/codecoradev/uteke/releases/tag/v0.13.1(absolute URL). The previous code usedstrip_prefix("/codecoradev/uteke/releases/tag/")which always failed on absolute URLs, falling through to thersplit('/')fallback that required avprefix.Changes
strip_prefix→find()to locate tag marker anywhere in URLstarts_with('v')check →!tag.is_empty()(accept any valid tag format)Testing
cargo fmt✅cargo clippy --workspace --all-targets✅cargo test --workspace✅ — 480 pass, 0 fail