Skip to content

fix: resolve install.sh latest version without the GitHub API (#325)#336

Merged
colbymchenry merged 1 commit into
mainfrom
fix/325-install-sh-github-api-ratelimit
May 22, 2026
Merged

fix: resolve install.sh latest version without the GitHub API (#325)#336
colbymchenry merged 1 commit into
mainfrom
fix/325-install-sh-github-api-ratelimit

Conversation

@colbymchenry
Copy link
Copy Markdown
Owner

Problem

On shared/cloud hosts (the reporter is on root@devbox), install.sh fails with curl: (22) 403could not resolve latest version (#325). It resolved the latest release through api.github.com, and GitHub's unauthenticated API is rate-limited to 60 requests/hour per IP — easily exhausted where many users share an address — returning 403.

(The no prebuilt bundle for linux-x64 in the same screenshot is #303, already fixed in #335; this PR covers the install.sh half.)

Fix

  • Resolve "latest" from the releases/latest web redirect (github.com/<repo>/releases/latestLocation: .../tag/vX.Y.Z) instead of the API — no token, no rate limit. Falls back to the API if the redirect can't be read.
  • Normalize CODEGRAPH_VERSION so a bare 0.9.4 works as well as v0.9.4 (the release-tag form). The reporter's CODEGRAPH_VERSION=0.9.3 wouldn't have matched the v0.9.3 tag even if it had been passed through.

Validation

End-to-end on darwin-arm64 into temp dirs (CODEGRAPH_INSTALL_DIR/CODEGRAPH_BIN_DIR):

  • No CODEGRAPH_VERSION → redirect resolves v0.9.3 → installs → codegraph --version = 0.9.3.
  • CODEGRAPH_VERSION=0.9.3 (bare) → normalized to v0.9.3 → installs → works.
  • sh -n install.sh passes.

Closes #325

🤖 Generated with Claude Code

The standalone installer resolved the latest release via the GitHub API, which
rate-limits unauthenticated requests to 60/hr per IP and returns 403 on shared
or cloud hosts (devboxes, CI) — leaving "could not resolve latest version". It
now reads the version from the releases/latest web redirect (no rate limit),
falling back to the API, and normalizes CODEGRAPH_VERSION so a bare "0.9.4"
works as well as "v0.9.4".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@colbymchenry colbymchenry merged commit 4e34ba8 into main May 22, 2026
@colbymchenry colbymchenry deleted the fix/325-install-sh-github-api-ratelimit branch May 22, 2026 17:53
@colbymchenry colbymchenry mentioned this pull request May 22, 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.

linux install? how?

1 participant