Skip to content

v1.8.2 — rate-limit auto-retry + release workflow improvements#104

Merged
shouze merged 1 commit intomainfrom
release/1.8.2
Mar 9, 2026
Merged

v1.8.2 — rate-limit auto-retry + release workflow improvements#104
shouze merged 1 commit intomainfrom
release/1.8.2

Conversation

@shouze
Copy link
Contributor

@shouze shouze commented Mar 9, 2026

What's in this release

Patch: fix rate-limit errors aborting multi-page searches (closes #102)

See #103 for the detailed root cause. Three fixes:

  1. fetchWithRetry now calls an onRateLimit callback (instead of throwing) when a long wait is needed during pagination — the search pauses with a visible message and resumes automatically.
  2. Secondary rate limits (403 + Retry-After) are now detected and retried.
  3. Added a page-cap guard in fetchAllResults to prevent the 422 Cannot access beyond the first 1000 results error when results hit exactly 1 000.

Release workflow improvements

  • Replace bun pm version with direct package.json editing across all release instructions, skills and AGENTS.md. bun pm version automatically creates both a git commit and a git tag in one shot, which conflicts with the workflow (tag must be pushed from the release branch after blog post and CHANGELOG are ready).

  • Add "ask the user interactively" requirement before writing any release blog post in AGENTS.md, release.instructions.md, skills/release.md, bug-fixing.instructions.md, and implement-feature.instructions.md.

Docs

  • docs/blog/release-v1-8-2.md — patch release notes.
  • docs/blog/index.md — new row for v1.8.2.
  • CHANGELOG.md — new row for v1.8.2.

Post-merge

git tag v1.8.2
git push origin v1.8.2

The tag push triggers cd.yaml (build + GitHub Release).

Copilot AI review requested due to automatic review settings March 9, 2026 01:27
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

Coverage after merging release/1.8.2 into main will be

96.66%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts98.23%100%100%98%52, 60
   api.ts94.29%100%100%93.52%307–311, 367, 384, 63–69
   cache.ts98.08%100%100%97.87%28
   completions.ts99.35%100%100%99.29%252
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts94.05%100%88.89%94.33%153, 177–182, 184–186, 188–189, 216, 380–381, 424–427
   upgrade.ts88.46%100%94.44%87.89%127–128, 148–155, 158–164, 169, 174, 210–213
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.62%100%90.40%99.31%284–285
   rows.ts97.87%100%100%97.73%54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@github-actions
Copy link

github-actions bot commented Mar 9, 2026

🔦 Lighthouse Report

Page ⚡ Perf ♿ A11y 🛡️ BP 🔍 SEO Report
/github-code-search/getting-started/ 🟢 99 (≥97) 🟢 100 (≥99) 🟢 100 (≥99) 🟢 100 (≥99) 🔗 view
/github-code-search/ 🟢 98 (≥97) 🟢 100 (≥99) 🟢 100 (≥99) 🟢 100 (≥99) 🔗 view

Thresholds: Perf ≥ 97 · A11y ≥ 99 · BP ≥ 99 · SEO ≥ 99
commit 6b7fe73 · full workflow run

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Prepares the v1.8.2 release by bumping the package version, adding release documentation (blog/changelog), and updating release workflow guidance (avoid bun pm version, require interactive user input before drafting blog posts).

Changes:

  • Bump package.json version to 1.8.2.
  • Add v1.8.2 release blog post and link it from the blog index + changelog.
  • Update release/process instructions to avoid bun pm version and to require interactive user confirmation before writing blog posts.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
package.json Version bump to 1.8.2.
docs/blog/release-v1-8-2.md New release post describing the v1.8.2 changes.
docs/blog/index.md Adds v1.8.2 row linking to the new post.
CHANGELOG.md Adds v1.8.2 row pointing to the blog post.
AGENTS.md Updates release steps (manual version edit) + blog-post interaction requirement.
.github/skills/release.md Documents version bump approach + blog-post interaction requirement.
.github/instructions/release.instructions.md Updates Copilot release instructions (manual version edit + interaction requirement).
.github/instructions/implement-feature.instructions.md Updates post-merge release guidance (manual version edit + interaction requirement).
.github/instructions/bug-fixing.instructions.md Updates patch release guidance (manual version edit + interaction requirement).

Comment on lines +182 to +183
# automatically, which conflicts with the release workflow below.
sed -i '' 's/"version": ".*"/"version": "X.Y.Z"/' package.json
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sed -i '' is BSD/macOS-specific and fails on GNU sed (common on Linux CI/dev machines). Consider documenting a cross-platform version bump command (e.g. use sed -i.bak … and remove the backup, or use a small Node/Bun script), or explicitly provide both macOS and Linux variants.

Suggested change
# automatically, which conflicts with the release workflow below.
sed -i '' 's/"version": ".*"/"version": "X.Y.Z"/' package.json
# automatically, which conflicts with the release workflow below.
# macOS (BSD sed)
sed -i '' 's/"version": ".*"/"version": "X.Y.Z"/' package.json
# Linux (GNU sed)
sed -i 's/"version": ".*"/"version": "X.Y.Z"/' package.json

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +33
# Option A — in-place sed (reliable, no interactive editor needed)
sed -i '' 's/"version": ".*"/"version": "X.Y.Z"/' package.json
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This in-place sed -i '' example is macOS/BSD-specific and will break on GNU sed. Since this is meant to be “reliable”, it should either be made portable or split into explicit macOS and Linux instructions.

Suggested change
# Option A — in-place sed (reliable, no interactive editor needed)
sed -i '' 's/"version": ".*"/"version": "X.Y.Z"/' package.json
# Option A — non-interactive sed (no editor needed)
# macOS / BSD sed:
sed -i '' 's/"version": ".*"/"version": "X.Y.Z"/' package.json
# GNU sed (Linux):
sed -i 's/"version": ".*"/"version": "X.Y.Z"/' package.json

Copilot uses AI. Check for mistakes.
# or
bun pm version major # breaking change: 1.2.4 → 2.0.0

sed -i '' 's/"version": ".*"/"version": "X.Y.Z"/' package.json # bump directly — do NOT use bun pm version
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documented version bump command uses sed -i '', which is not portable to GNU sed (Linux). Please adjust the instructions to a cross-platform approach or provide OS-specific variants.

Suggested change
sed -i '' 's/"version": ".*"/"version": "X.Y.Z"/' package.json # bump directly — do NOT use bun pm version
jq '.version = "X.Y.Z"' package.json > package.tmp.json && mv package.tmp.json package.json # bump directly — do NOT use bun pm version

Copilot uses AI. Check for mistakes.

```bash
bun pm version patch # bumps package.json: 1.2.4 → 1.2.5
sed -i '' 's/"version": ".*"/"version": "X.Y.Z"/' package.json # bump directly — do NOT use bun pm version
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release command uses sed -i '', which is BSD/macOS-specific and can fail on GNU sed. Please provide a portable alternative or separate commands for macOS vs Linux.

Suggested change
sed -i '' 's/"version": ".*"/"version": "X.Y.Z"/' package.json # bump directly — do NOT use bun pm version
tmpfile="$(mktemp)"
jq '.version = "X.Y.Z"' package.json > "$tmpfile" && mv "$tmpfile" package.json # bump directly — do NOT use bun pm version

Copilot uses AI. Check for mistakes.
Comment on lines +44 to +47
- **Auto-wait with visible feedback.** When a rate-limit response is received
during pagination, the CLI now prints a message, waits for the exact duration
indicated by GitHub (`x-ratelimit-reset` or `Retry-After` + 1 s clock-skew
buffer), and resumes automatically — no retry counting, no data lost:
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release notes claim multi-page searches now auto-wait and resume on long rate-limit delays, but the current implementation of fetchWithRetry still throws when the computed delay exceeds MAX_AUTO_RETRY_WAIT_MS (10s) and there is no onRateLimit callback support in the codebase. Either include the rate-limit retry implementation changes in this PR, or adjust the release post to match the actual shipped behavior.

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +21
```
Fetching results from GitHub… ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ page 9/10
error: GitHub API rate limit exceeded. Please retry in 53 seconds.
```
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fenced code block is missing a language identifier. The docs guidelines for this repo require every code block to declare its language (e.g. text for CLI output).

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +53
```
Fetching results from GitHub… ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░ page 9/10
Rate limited — waiting 53 seconds, resuming automatically…
Fetching results from GitHub… ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ page 10/10
```
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fenced code block is missing a language identifier. Please add one (likely text) so the docs conform to the repo convention of language-tagged code fences.

Copilot uses AI. Check for mistakes.
{
"name": "github-code-search",
"version": "1.8.1",
"version": "1.8.2",
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version is bumped to v1.8.2 here, but the PR description/release notes mention rate-limit auto-retry changes (e.g. onRateLimit callback, secondary rate-limit detection) that are not present in the current source (src/api-utils.ts still throws for waits > 10s). Either include the implementation changes in this PR, or delay the version bump/release artifacts until the code changes are actually included.

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +30
```bash
# Bump directly in package.json
sed -i '' 's/"version": ".*"/"version": "X.Y.Z"/' package.json

# Verify
jq -r .version package.json
```
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggested sed -i '' command is not portable (GNU sed on Linux treats '' differently and often errors). Please update this section to include a cross-platform approach or separate macOS vs Linux commands.

Copilot uses AI. Check for mistakes.
Patch release for #102: rate-limit errors aborting multi-page searches.

Also:
- Add docs/blog/release-v1-8-2.md and update docs/blog/index.md
- Replace \`bun pm version\` with direct package.json editing across all release
  instructions, skills and AGENTS.md (\`bun pm version\` auto-creates a git
  commit and tag, which conflicts with the release workflow)
- Add explicit "ask the user interactively" requirement before writing any
  release blog post in AGENTS.md, release.instructions.md, skills/release.md,
  bug-fixing.instructions.md and implement-feature.instructions.md
@github-actions
Copy link

github-actions bot commented Mar 9, 2026

Coverage after merging release/1.8.2 into main will be

96.38%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api-utils.ts93.20%100%93.75%93.13%101–103, 65, 73, 86–87, 91–92
   api.ts94.55%100%100%93.86%318–322, 383, 400, 63–69
   cache.ts98.08%100%100%97.87%28
   completions.ts99.35%100%100%99.29%252
   group.ts100%100%100%100%
   output.ts99.12%100%94.74%99.52%58
   render.ts94.05%100%88.89%94.33%153, 177–182, 184–186, 188–189, 216, 380–381, 424–427
   upgrade.ts88.46%100%94.44%87.89%127–128, 148–155, 158–164, 169, 174, 210–213
src/render
   filter-match.ts97.44%100%92.31%100%
   filter.ts100%100%100%100%
   highlight.ts96.62%100%90.40%99.31%284–285
   rows.ts97.87%100%100%97.73%54–55
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@shouze shouze merged commit 7d24c32 into main Mar 9, 2026
15 checks passed
@shouze shouze deleted the release/1.8.2 branch March 9, 2026 02:40
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.

Rate limit errors abort multi-page searches instead of waiting and retrying

2 participants