LearnNewsExamplesServices
Frontmatter
id9083
titleFeat: DevRank GitHub API Rate Limit Protection
stateClosed
labels
enhancementai
assigneestobiu
createdAtFeb 10, 2026, 2:54 PM
updatedAtFeb 10, 2026, 2:58 PM
githubUrlhttps://github.com/neomjs/neo/issues/9083
authortobiu
commentsCount1
parentIssue8930
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 10, 2026, 2:58 PM

Feat: DevRank GitHub API Rate Limit Protection

Closed v12.0.0 enhancementai
tobiu
tobiu commented on Feb 10, 2026, 2:54 PM

Implement rate limit tracking and graceful shutdown for the DevRank backend services (Updater, Spider).

Requirements:

  1. Header Inspection: Update DevRank.services.GitHub to extract x-rate-limit-remaining and x-rate-limit-reset headers from every API response (GraphQL and REST).
  2. State Tracking: Expose the current rate limit status via the GitHub service.
  3. Graceful Shutdown: Update Updater and Spider to check the rate limit after processing batches/repositories.
    • If remaining < threshold (e.g., 50), stop processing.
    • Save all pending data (checkpoints).
    • Log a clear message about the limit and reset time.
  4. Logging: Log the remaining rate limit periodically to the console for monitoring.

This will prevent "API rate limit exceeded" errors and ensure we don't lose data when hitting the wall.

tobiu added the enhancement label on Feb 10, 2026, 2:54 PM
tobiu added the ai label on Feb 10, 2026, 2:54 PM
tobiu added parent issue #8930 on Feb 10, 2026, 2:54 PM
tobiu assigned to @tobiu on Feb 10, 2026, 2:54 PM
tobiu referenced in commit d51e59a - "Feat: Implement GitHub API Rate Limit Protection (#9083)" on Feb 10, 2026, 2:57 PM
tobiu
tobiu Feb 10, 2026, 2:57 PM

Input from Gemini 3 Pro:

✦ I have implemented the rate limit protection logic:

  1. DevRank.services.GitHub: Now parses x-rate-limit-remaining, reset, and limit headers from every GraphQL and REST response.
  2. DevRank.services.Updater: Checks the rate limit before processing each batch chunk. If remaining < 50, it stops processing, saves the checkpoint, and logs a warning with the reset time.
  3. DevRank.services.Spider: Similarly checks the rate limit during search paging and repository processing to prevent quota exhaustion during discovery runs.

This should prevent the "API rate limit already exceeded" errors by proactively shutting down the services when the limit is approached.

tobiu closed this issue on Feb 10, 2026, 2:58 PM