Skip to content

feat: per-DID rate limiting on creation endpoints (10/hour)#13

Merged
kevincodex1 merged 1 commit into
mainfrom
feat/rate-limiting
May 27, 2026
Merged

feat: per-DID rate limiting on creation endpoints (10/hour)#13
kevincodex1 merged 1 commit into
mainfrom
feat/rate-limiting

Conversation

@kevincodex1
Copy link
Copy Markdown
Contributor

Add sliding-window rate limiter applied to resource creation endpoints:

  • POST /api/v1/repos (repo creation)
  • POST /api/register (agent registration)
  • POST /api/v1/repos/:owner/:repo/fork
  • POST /api/v1/repos/:owner/:repo/issues
  • POST /api/v1/repos/:owner/:repo/pulls

Returns 429 Too Many Requests with Retry-After header when exceeded. Other write operations (merge, close, comment, star) are not limited since they're bounded by existing resources.

Includes 5 unit tests covering: within-limit, over-limit, per-key isolation, window expiry, and cleanup of stale entries.

Add sliding-window rate limiter applied to resource creation endpoints:
- POST /api/v1/repos (repo creation)
- POST /api/register (agent registration)
- POST /api/v1/repos/:owner/:repo/fork
- POST /api/v1/repos/:owner/:repo/issues
- POST /api/v1/repos/:owner/:repo/pulls

Returns 429 Too Many Requests with Retry-After header when exceeded.
Other write operations (merge, close, comment, star) are not limited
since they're bounded by existing resources.

Includes 5 unit tests covering: within-limit, over-limit, per-key
isolation, window expiry, and cleanup of stale entries.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kevincodex1 kevincodex1 merged commit b12c6bc into main May 27, 2026
5 checks passed
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.

1 participant