Repository navigation
Give the mood, location and security lists their own rate limit - #497
Conversation
The entry form loads all three together every time it opens, and they shared the per-address page bucket (50 per 10 seconds, 300 per 10 minutes) with every page and API call, so writers got 429s on them. They are small read-only lists; they now skip the page bucket and have their own of 120 a minute and 1200 an hour. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThe PR updates Bucket4j URL matching so mood, location, and security lookup APIs bypass the shared pages bucket and use a dedicated per-address bucket with 120-per-minute and 1,200-per-hour limits. Redis-backed tests validate that the buckets are isolated, lookup traffic remains available after page throttling, and the existing page limit is unaffected. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| PHP | Nov 2, 2026 9:16p.m. | Review ↗ | |
| Java | Nov 2, 2026 9:16p.m. | Review ↗ | |
| Shell | Nov 2, 2026 9:16p.m. | Review ↗ | |
| JavaScript | Nov 2, 2026 9:16p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
Writers were getting 429s from
/api/mood,/api/locationand/api/security. The entry form loads all three every time it opens. They shared the per-addresspagesbucket with every page view and API call: 50 per 10 seconds and 300 per 10 minutes.Change
pagesno longer covers/api/mood,/api/locationand/api/security, including/{id}.lookupsfilter gives those three their own per-address bucket, 120 a minute and 1200 an hour. They are small read-only lists, so they stay limited, only more loosely.pagesandattachmentsare unchanged otherwise.Testing
RateLimitConfigTestsruns the real filter against Redis. Two new tests:Not changed
The general
pageslimit is still 300 per 10 minutes per address, and/fontsand/xslcount against it. If 429s move to other endpoints, that limit is the next thing to raise.🤖 Generated with Claude Code
Summary by Sourcery
Separate lookup endpoints from the general page rate limit to prevent entry-form requests from triggering page throttling.
New Features:
Bug Fixes:
Tests: