Repository navigation
fix(upgrade): make 302-redirect primary path actually work for latest-release resolution - #1308
Merged
Merged
Conversation
…-release resolution reqwest follows redirects by default, so the HEAD probe to /releases/latest landed on the tag page (200, no location header) and every invocation fell through to the unauthenticated GitHub API fallback (60 req/h per IP). Under rate limiting users got 'Failed to determine latest version' from uteke upgrade and the startup update check (#1307). Disable redirect following for the probe so the location header is observable, validate the extracted tag (v-prefix, numeric major.minor.patch, optional pre-release suffix, query strings stripped), and give the API fallback an explicit rate-limit error message instead of a generic one.
🔍 Cora AI Code ReviewReview powered by cora-code · BYOK · MIT |
This was referenced Oct 5, 2026
7 tasks done
ajianaz
added a commit
that referenced
this pull request
Oct 5, 2026
* chore(release): v0.19.1 - version bump, changelog, docs sync - Workspace + internal dependency versions 0.19.0 -> 0.19.1 (Cargo.lock synced) - CHANGELOG: [0.19.1] entry - upgrade-path reliability (#1307 via #1308/#1309/#1310), plain /remember explicit-type fix (#1303), committed Hermes plugin package (#1301) - Bundled uteke-memory skill + .agents canonical copy bumped in lockstep - README/README.id current-version line synced * chore(release): regenerate core-contract.json for 0.19.1 docgen embeds the workspace version; the API Docs Fresh gate caught the stale generated artifact. --------- Co-authored-by: ajianaz <[email protected]>
This was referenced Oct 5, 2026
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
get_latest_version()in bothuteke upgrade(crates/uteke-cli/src/commands/upgrade.rs) and the startup update check (crates/uteke-core/src/update_check.rs):https://github.com/codecoradev/uteke/releases/latest(Policy::none()), so the 302locationheader carrying the latest tag is actually observable.parse_tag_from_location()+is_valid_version_tag().Accept: application/vnd.github+json, explicit error on 403/429 (rate limit exceeded ... set GITHUB_TOKEN), andtag_namemust pass the same tag validation.Closes #1307.
Why
reqwest follows redirects by default (
Policy::limited(10)), so the "primary" HEAD probe landed on the tag page with HTTP 200 and nolocationheader — the primary path was dead code. Every invocation fell through to the unauthenticatedapi.github.comfallback, capped at 60 req/h per IP. When that budget is exhausted,uteke upgradeand the startup update banner fail withFailed to determine latest versioneven though the release is reachable. Observed live on 2026-10-05 from a client on 0.18.1.Evidence (verified live):
curl -I .../releases/latest→HTTP/2 302,location: https://github.com/codecoradev/uteke/releases/tag/v0.19.0200,location: Nonev0.19.0from the 302 alone — zero API calls, immune to rate limiting.Testing
cargo clippy -p uteke-core -p uteke-cli --all-features -- -D warnings— cleancargo test -p uteke-core update_check— 11 passed (6 new)cargo test -p uteke-cli upgrade::— 5 passed (3 new)uteke upgrade -y→[INFO] Already up to date (0.19.0)in 0.35s (version resolved via the 302, no API call)