|
| 1 | +--- |
| 2 | +title: "What's new in v1.8.2" |
| 3 | +description: "Bug fix: multi-page searches no longer abort when GitHub rate-limits mid-pagination — the CLI now waits and resumes automatically." |
| 4 | +date: 2026-03-09 |
| 5 | +--- |
| 6 | + |
| 7 | +# What's new in github-code-search v1.8.2 |
| 8 | + |
| 9 | +> Full release notes: <https://github.com/fulll/github-code-search/releases/tag/v1.8.2> |
| 10 | +
|
| 11 | +## Highlights |
| 12 | + |
| 13 | +### Fix: multi-page searches aborted by rate limits now auto-resume |
| 14 | + |
| 15 | +When searching across a large organisation with many results (close to the |
| 16 | +GitHub 1 000-result cap), the CLI could crash mid-way through pagination with: |
| 17 | + |
| 18 | +``` |
| 19 | + Fetching results from GitHub… ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ page 9/10 |
| 20 | +error: GitHub API rate limit exceeded. Please retry in 53 seconds. |
| 21 | +``` |
| 22 | + |
| 23 | +The search was lost at ~90 % completion and had to be restarted from scratch. |
| 24 | + |
| 25 | +#### Root causes (three compounding issues) |
| 26 | + |
| 27 | +**1. Long rate-limit waits threw immediately.** |
| 28 | +When `x-ratelimit-reset` indicated a wait longer than 10 seconds, |
| 29 | +`fetchWithRetry` threw an error instead of waiting. The pagination loop |
| 30 | +propagated this exception and discarded all pages already fetched. |
| 31 | + |
| 32 | +**2. Secondary rate limits were not recognised.** |
| 33 | +GitHub secondary rate limits return `403 + Retry-After` (without |
| 34 | +`x-ratelimit-remaining: 0`). This pattern bypassed the retry logic entirely |
| 35 | +and surfaced as an unhandled API error. |
| 36 | + |
| 37 | +**3. 422 error when results hit exactly 1 000.** |
| 38 | +When `total_count` was an exact multiple of 100 (e.g. 1 000 results across 10 |
| 39 | +full pages), the pagination loop attempted a page 11. GitHub rejects this with |
| 40 | +`422 Cannot access beyond the first 1000 results`. |
| 41 | + |
| 42 | +#### What changed |
| 43 | + |
| 44 | +- **Auto-wait with visible feedback.** When a rate-limit response is received |
| 45 | + during pagination, the CLI now prints a message, waits for the exact duration |
| 46 | + indicated by GitHub (`x-ratelimit-reset` or `Retry-After` + 1 s clock-skew |
| 47 | + buffer), and resumes automatically — no retry counting, no data lost: |
| 48 | + |
| 49 | + ``` |
| 50 | + Fetching results from GitHub… ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ page 9/10 |
| 51 | + Rate limited — waiting 53 seconds, resuming automatically… |
| 52 | + Fetching results from GitHub… ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ page 10/10 |
| 53 | + ``` |
| 54 | + |
| 55 | +- **Secondary rate limit detection.** Any `403 + Retry-After` response is now |
| 56 | + treated as a retriable rate-limit condition. |
| 57 | + |
| 58 | +- **Page 11 guard.** `fetchAllResults` now short-circuits before requesting |
| 59 | + a page beyond `totalPages`, preventing the 422 error at the cap. |
| 60 | + |
| 61 | +**Before:** error at page 9, search lost. |
| 62 | +**After:** transparent pause, TUI opens with all 1 000 results. |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +## Upgrade |
| 67 | + |
| 68 | +```bash |
| 69 | +github-code-search upgrade |
| 70 | +``` |
| 71 | + |
| 72 | +Or download the latest binary directly from the |
| 73 | +[GitHub Releases page](https://github.com/fulll/github-code-search/releases/tag/v1.8.2). |
0 commit comments