Skip to content

fix(provider-github): retry primary rate limit errors and respect reset headers (#175) - #193

Open
devarshishimpi wants to merge 1 commit into
feature/aicss-file-difffrom
lane/issue-175-github-rate-limit-retry
Open

devarshishimpi wants to merge 1 commit into
feature/aicss-file-difffrom
lane/issue-175-github-rate-limit-retry

Conversation

@devarshishimpi

Copy link
Copy Markdown
Owner

Closes #175

Summary

Fixes GitHub primary rate limit errors (HTTP 403) aborting reviews by making them retryable and respecting reset headers:

  • Updates GitHubError to capture and forward response headers.
  • Detects primary rate limit 403 responses (rate limit exceeded / api rate limit) in withRetry.
  • Calculates sleep duration using x-ratelimit-reset epoch timestamp and Retry-After header.
  • Maintains exponential backoff fallback.
  • Adds comprehensive unit test suite in packages/provider-github/test/http.test.ts.

@codra-app-personal codra-app-personal Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Codra Review

✅ Nothing to flag. Reviewed 3 files (421 changed lines) and found no issues worth raising.

Reviewed commit: 2965bba9bb

ℹ️ About Codra in GitHub

Your team has set up Codra to review pull requests in this repo. Reviews are triggered when you:

  • Open a pull request for review
  • Mark a draft as ready

Every review posts a summary here. A clean pass also gets a 👍 on the pull request itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant