Skip to content

CONV-299: Add API rate limiting baseline#259

Merged
menvil merged 1 commit into
developfrom
feature/CONV-299-add-api-rate-limiting-baseline
Jun 3, 2026
Merged

CONV-299: Add API rate limiting baseline#259
menvil merged 1 commit into
developfrom
feature/CONV-299-add-api-rate-limiting-baseline

Conversation

@menvil

@menvil menvil commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Registers api-v1 rate limiter in AppServiceProvider using FeatureAccessService::limit($user, 'api_rate_limit_per_minute') (defaults to 60 for authenticated, 30 for unauthenticated)
  • Protected API route group now includes throttle:api-v1
  • Smoke test confirms the limiter is registered

Test plan

  • RateLimiter::limiter('api-v1') is not null
  • composer test passes (551 tests)
  • composer lint passes

🤖 Generated with Claude Code


Summary by cubic

Adds api-v1 rate limiting to v1 API routes to prevent spikes and enforce plan-based limits. Implements the baseline defined in CONV-299.

  • New Features
    • Registers api-v1 limiter in AppServiceProvider using FeatureAccessService::limit(...).
    • Defaults: 60/min for authenticated, 30/min for unauthenticated; keyed by user ID or IP via RateLimiter.
    • Applies throttle:api-v1 to the protected API route group.
    • Adds tests to confirm limiter registration and expected 200/429 behavior.

Written for commit b0c2534. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil merged commit 36861d1 into develop Jun 3, 2026
1 check was pending
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c58fbfc9-a69a-4005-9af0-1299eb2093c9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-299-add-api-rate-limiting-baseline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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