mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-08-08 06:46:11 +00:00
Addresses review on #812. Secondary rate limits were classed as permissions failures. GitHub serves them as 403 with Retry-After while X-RateLimit-Remaining is still nonzero, because the primary hourly quota is not what was hit -- so isRateLimited() returned false, blockedUntilMillis was never set, no stale release was served, and every About sheet open kept contacting GitHub through exactly the cooldown it had been asked to observe. The predicate now also admits a 403 carrying a usable Retry-After; one that cannot be parsed is still a permissions failure. The phase reported during the Tor wait was the wrong one. fetchLatestRelease() waits on the selected route itself, so the UI read "Checking latest release..." for the whole bootstrap and only switched to AwaitingNetworkRoute afterwards, when the second route check returns immediately -- putting the wrong label on the one wait the phase exists to explain. Reordering the two calls would have made cache hits wait on Tor, since the cache returns before the route check, so the fetch now reports from the inside via onAwaitingNetworkRoute and the caller keeps its own check for the cache-hit path. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>