Skip to content

fix(upgrade): honor GITHUB_TOKEN in the API fallback - #1309

Merged
ajianaz merged 1 commit into
developfrom
fix/upgrade-github-token-fallback
Oct 5, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/upgrade-github-token-fallback

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

What

  • Attach GITHUB_TOKEN as a bearer token on the GitHub API fallback request in get_latest_version() (both uteke upgrade and the startup update check), raising the cap from 60 to 5,000 req/h when the env var is present.
  • Split the 403/429 error message: one variant when no token was set (suggesting GITHUB_TOKEN), another when a token was set but the limit was still hit.

Follow-up to #1308 (the error message referenced GITHUB_TOKEN while the code never sent it — making the message honest).

Closes #1307 (comment follow-up).

Why

#1308 fixed the primary 302-redirect resolution path. The API fallback it kept as a safety net printed set GITHUB_TOKEN to raise the limit but ignored the variable entirely — misleading for users who had already set it.

Testing

  • cargo clippy -p uteke-core -p uteke-cli --all-features -- -D warnings — clean
  • cargo test -p uteke-core update_check — 11 passed
  • cargo test -p uteke-cli upgrade:: — 5 passed
  • Live E2E: uteke upgrade -y → [INFO] Already up to date (0.19.0) (302 primary path unaffected)

The rate-limit error told users to set GITHUB_TOKEN, but the
fallback request never sent it. Attach it as a bearer token when
present (raises the cap to 5k req/h) and make the 403/429 message
distinguish whether a token was in play (#1307).
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 9c06b22 into develop Oct 5, 2026
15 checks passed
@ajianaz
ajianaz deleted the fix/upgrade-github-token-fallback branch October 5, 2026 02:54
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]>
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.

fix: uteke upgrade fails with "Failed to determine latest version" when GitHub API is rate-limited (redirect primary path is dead code)

1 participant