Bugfix/discord rate limiting#249
Open
intagliated wants to merge 10 commits intoOpen-ACP:mainfrom
Open
Conversation
- Add Session interface with SessionStatus type - Add VALID_STATUSES constant (active, completed, expired, cancelled) - Add filterSessionsByStatus controller function - Add unit tests with 4 test cases for filter logic
- Add DiscordRateLimiter class with request bucketing - Add GitHub Actions workflow for rate limit testing - Add simulation script for retry logic verification - Implements rate limit detection and exponential backoff Addresses Open-ACP#240
- Add DiscordClient with full API integration - Add rate limiting wrapper for all Discord endpoints - Add automatic retry on 429 responses - Add example usage and tests - Add environment variable template Closes Open-ACP#240
- Add DiscordRateLimiter class with request bucketing - Add DiscordClient with real Discord API integration - Add automatic retry on 429 rate limit responses - Add comprehensive unit tests (6 tests) - Add edge case tests (3 tests) - Update package.json, package-lock.json, and .gitignore Features: - Per-endpoint rate limit tracking - Exponential backoff retry logic - Automatic cleanup of old requests - Stats reporting for monitoring Testing: ✅ 6 unit tests passing ✅ 3 edge case tests passing Addresses Open-ACP#240
- Add proper Node.js matrix strategy - Install dependencies correctly - Run unit tests and edge cases separately - Fix path patterns for PR triggers
- Switch to pnpm (project uses pnpm-lock.yaml) - Update actions to v4 (Node.js 24 compatible) - Add proper dependency installation steps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement proper rate limit handling for Discord API requests to prevent 429 errors.
Changes
DiscordRateLimiterclass with request bucketingDiscordClientwith full Discord API integrationTesting
Related Issue
Closes #240