site: never show "no release" because GitHub rate-limited us - #6
Merged
Conversation
diskpush.com/download showed no release at all while v0.1.9 was published,
built and downloadable. /api/releases/latest answered
{"version":null,...} on every request.
Unauthenticated GitHub allows exactly 60 requests an hour per IP, and this is
a shared host, so that budget is not ours alone. Dropping the release cache
from an hour to a minute (1798a06) made 60/hour the ceiling rather than a
limit we never approached — and then fifteen AEO audit engines plus a
recursive link checker crawled the site and spent it. Every call came back
403, latestRelease returned null, and the page rendered as though the project
had never shipped.
Rate limiting is a fact about our IP. It is not a fact about the project, and
the site must not present it as one.
- latestRelease keeps the last release it read and returns that when a fetch
is refused, fails, or throws. A version a few minutes old is a far better
answer than no version. It still returns null before it has ever read one,
which is the real pre-launch state the page has a rendering for.
- GITHUB_TOKEN, when set, lifts the ceiling from 60/hour to 5,000. Optional
on purpose: the site has to work without one, which is what the fallback
is for. Set it on the service to stop relying on the fallback at all.
The shorter cache stays. It is the reason a release now appears within a
minute, and with a fallback behind it the spent budget is no longer a failure.
The three tests that pin this fail without the change; the two describing
unchanged behaviour — asset mapping, and null before the first read — pass
either way.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y5jnkZKX4AdPgBMzMosxE7
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.
diskpush.com/downloadshowed no release at all while v0.1.9 was published, built and downloadable./api/releases/latestanswered{"version":null,...}on every request.What happened
Unauthenticated GitHub allows exactly 60 requests an hour per IP, and this is a shared host, so that budget is not ours alone.
Dropping the release cache from an hour to a minute (#1,
1798a06) made 60/hour the ceiling rather than a limit we never approached. Then fifteen AEO audit engines plus a recursive link checker crawled the site and spent it. Every call came back 403,latestRelease()returnednull, and the page rendered as though the project had never shipped.I flagged this risk when making that change; this is it happening. Confirmed live:
The fix
Rate limiting is a fact about our IP. It is not a fact about the project, and the site must not present it as one.
latestRelease()keeps the last release it read and returns that when a fetch is refused, fails, or throws. A version a few minutes old is a far better answer than no version. It still returnsnullbefore it has ever read one — that is the real pre-launch state the page has a rendering for.GITHUB_TOKEN, when set, lifts the ceiling to 5,000/hour. Optional on purpose: the site has to work without one, which is what the fallback is for.The shorter cache stays. It is why a release now appears within a minute, and with a fallback behind it a spent budget is no longer a failure.
Follow-up for you
Set
GITHUB_TOKENon thediskpush-webRailway service (a bare public-repo-read token is enough) and the fallback stops being load-bearing. Not required for this PR to fix the outage.Tests
5 new tests in
apps/web/lib/releases.test.ts. The three that pin the fix fail without it; the two describing unchanged behaviour — asset mapping, andnullbefore the first read — pass either way.Full suite 243 passing, typecheck clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Y5jnkZKX4AdPgBMzMosxE7