Repository navigation
feat(ratelimit): add an hourly request quota per sign-in session and an API clients card - #3075
Conversation
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
Security findingsAdvisory findings (1)
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
The Evidence URL still contains the literal
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Hourly summaries and task wiring migrations/sql/20261025174621_add_api_client_usage_hourly.sql, internal/apiusage/*, internal/taskmanager/tasks/summarize_api_usage.go, cmd/silo/main.go, internal/apiusage/apiusage_db_test.go, scripts/ci/db-contracts.txt |
The store aggregates eligible requests and refusals by session and UTC hour, provides client and endpoint statistics, and prunes old summaries. A hidden task runs at startup and every 15 minutes. The application initializes the store from the database and registers the task. |
Admin usage endpoints and contracts internal/apiv2/admin_api_clients.go, internal/apiv2/admin_api_clients_test.go, internal/api/router.go, internal/apiv2/router.go, internal/apiv2/document.go, internal/apiv2/admin_dashboard_capabilities*, contracts/api/v2/openapi.json, web/src/api/v2/schema.ts, web/src/api/v2/operations.ts, internal/api/testdata/media_routes.txt, docs/admin-api.md |
Two admin GET endpoints return session rankings and per-session endpoint counts. The API advertises the api_clients capability. The API contracts, route fixtures, and admin API documentation include the new endpoints. |
API-client dashboard widget web/src/hooks/queries/admin/apiClients.ts, web/src/hooks/queries/keys.ts, web/src/components/admin/dashboard/widgets/ApiClientsWidget.tsx, web/src/components/admin/dashboard/registry.tsx, web/src/components/admin/dashboard/types.ts, web/src/pages/AdminDashboard.tsx |
The dashboard widget displays up to eight sessions and loads endpoint details for expanded rows. Active sessions can be signed out. Dashboard refresh invalidates the API-client queries. |
Session Quotas
| Layer / File(s) | Summary |
|---|---|
Quota settings and admin controls internal/ratelimit/config.go, internal/ratelimit/ratelimit.go, internal/api/handlers/rate_limits.go, internal/api/handlers/rate_limits_test.go, internal/apiv2/admin_rate_limit_*, contracts/api/v2/openapi.json, web/src/api/v2/schema.ts, web/src/api/types.ts, web/src/pages/admin-settings/SecurityAccessSettings.tsx, docs/auth-api.md |
Rate-limit configuration includes off, log, and enforce modes, an hourly request rate, and a burst. The admin API supports reading and updating these fields, validates quota values, and omits the setting from v1 responses and updates. The security settings page provides controls for the quota. |
Token-bucket enforcement internal/ratelimit/session_quota.go, internal/ratelimit/middleware.go, internal/ratelimit/session_quota_test.go, internal/api/media_routes_test.go, docs/auth-api.md |
Memory and Redis-backed limiters track quota tokens. Middleware skips specified request categories and media paths, logs over-quota requests in log mode, and rejects them in enforce mode. Tests cover bucket behavior, middleware modes, and Redis outage fallback. |
Estimated code review effort: 4 (Complex) | ~50 minutes
Change: Feature
Sequence Diagram(s)
sequenceDiagram
participant AdminDashboard
participant ApiClientsWidget
participant useAdminApiClients
participant AdminAPIClientsRoute
participant apiusageStore
participant PostgreSQL
AdminDashboard->>ApiClientsWidget: render widget
ApiClientsWidget->>useAdminApiClients: request session statistics
useAdminApiClients->>AdminAPIClientsRoute: GET API-client statistics
AdminAPIClientsRoute->>apiusageStore: query usage statistics
apiusageStore->>PostgreSQL: read hourly summaries
sequenceDiagram
participant Client
participant RateLimitMiddleware
participant RedisQuotaLimiter
participant Redis
Client->>RateLimitMiddleware: send request with session token
RateLimitMiddleware->>RedisQuotaLimiter: check session quota
RedisQuotaLimiter->>Redis: refill bucket and spend token
Redis-->>RedisQuotaLimiter: quota result
RedisQuotaLimiter-->>RateLimitMiddleware: allow or deny
RateLimitMiddleware-->>Client: serve request or return 429
Possibly related PRs
- Silo-Server/silo-server#2719: Changes authenticated account rate limiting and middleware ordering, which overlap with the per-session quota check added here.
Suggested labels: api-v2, impact: usability, needs-review, evidence-required
Suggested reviewers: rhainland
Merge Risk: 
Minimal · up to 5cb9e
-
No merge-blocking issue is established by the supplied evidence.
Security architecture risk: 
Low · up to 5cb9e
-
The inspected quota and reporting paths preserve existing authentication and administrator controls. No material security regression was established, but deployment behavior and some affected areas remain only partially verified.
Retained concerns
No architecture-level concerns identified.Security review details
-
Security Blast Radius
- inferred — The new allowance is independently scoped to each authenticated sign-in session, not to an entire account. Multiple sessions have separate buckets, while the existing IP, account, API-key, and global checks remain in the inspected request path. Reporting exposes server-wide session metadata only through acting-admin routes.
Trust Boundaries and Controls
- observed — The v2 gate chain authenticates before invoking the rate limiter and subsequently applies viewer and acting-admin gates where required. Production wiring supplies the shared limiter, resolving the potential nil-claims quota bypass caused by reversed middleware ordering.
- observed — Quota eligibility excludes admins, impersonation, API keys, and explicit media/logout paths. The path expression anchors its alternatives under the native API prefixes and is reused by reporting SQL. These exclusions skip the session quota, not the surrounding existing limits.
Resilience and Maintainability Implications
- observed — Memory bucket mutation is mutex-protected; Redis refill, spend, and expiry execute in one script with a bounded call timeout. Buckets expire after seven idle days, and administrative validation requires refill within that interval, preventing ordinary idle cleanup from prematurely replenishing a depleted bucket.
-
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
The pull request description clearly explains the session quota, API-client usage dashboard, settings, endpoints, migration, tests, validation results, and risks. These topics directly match the changeset.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments: 1
web/src/api/types.ts: 1
4865-4870:Trivial · Maintainability & Code Quality · Quick win Derive
RateLimitSessionQuotafrom the generated v2 schema.This change adds a handwritten mirror of
AdminRateLimitSessionQuota. The same PR regeneratesweb/src/api/v2/schema.ts, so the generated type already exists. A handwritten copy can drift from the contract. Themodeunion is the most likely field to drift.This file already derives other types from the generated schema, for example
DisplayRating. Use the same pattern here.♻️ Proposed change
-export interface RateLimitSessionQuota { - mode: "off" | "log" | "enforce"; - requests_per_hour: number; - burst: number; -} +export type RateLimitSessionQuota = V2Components["schemas"]["AdminRateLimitSessionQuota"];As per path instructions: "The handwritten mirror in
web/src/api/types.tsis retired as each consumer moves to the generated surface."Source: Coding guidelines

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
7ce416b1-78a1-4ea4-bfb4-ec77b9b3d56e
Files selected for processing: 36-
cmd/silo/main.gocontracts/api/v2/openapi.jsondocs/admin-api.mddocs/auth-api.mdinternal/api/handlers/rate_limits.gointernal/api/media_routes_test.gointernal/api/router.gointernal/api/testdata/media_routes.txtinternal/apiusage/apiusage.gointernal/apiusage/apiusage_db_test.gointernal/apiv2/admin_api_clients.gointernal/apiv2/admin_api_clients_test.gointernal/apiv2/admin_dashboard_capabilities.gointernal/apiv2/admin_dashboard_capabilities_test.gointernal/apiv2/admin_rate_limit_reads.gointernal/apiv2/admin_rate_limit_types.gointernal/apiv2/admin_rate_limit_write.gointernal/apiv2/document.gointernal/apiv2/router.gointernal/ratelimit/config.gointernal/ratelimit/middleware.gointernal/ratelimit/ratelimit.gointernal/ratelimit/session_quota.gointernal/ratelimit/session_quota_test.gointernal/taskmanager/tasks/summarize_api_usage.gomigrations/sql/20261025174621_add_api_client_usage_hourly.sqlscripts/ci/db-contracts.txtweb/src/api/types.tsweb/src/api/v2/operations.tsweb/src/api/v2/schema.tsweb/src/components/admin/dashboard/registry.tsxweb/src/components/admin/dashboard/types.tsweb/src/components/admin/dashboard/widgets/ApiClientsWidget.tsxweb/src/hooks/queries/admin/apiClients.tsweb/src/hooks/queries/keys.tsweb/src/pages/admin-settings/SecurityAccessSettings.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
-
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The Evidence line now points to https://evidence.siloserver.org/r/silo-server/pr-3075/, and the page is published with before-and-after desktop and phone captures of the Security settings and the dashboard's Add widget sheet, plus the new card. |
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
0c1857a8-1ed3-462f-b226-dd42fbb08388
Files selected for processing: 8-
contracts/api/v2/breaking-approvals.jsondocs/admin-api.mddocs/auth-api.mdinternal/ratelimit/session_quota.gointernal/ratelimit/session_quota_test.goweb/src/api/types.tsweb/src/components/admin/dashboard/widgets/ApiClientsWidget.tsxweb/src/pages/AdminDashboard.tsx
Files skipped from review as they are similar to previous changes: 3-
- web/src/components/admin/dashboard/widgets/ApiClientsWidget.tsx
- docs/auth-api.md
- docs/admin-api.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
-
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The corrected Evidence link and the reported desktop/phone captures cover the settings and dashboard card. The described evidence still does not establish:
Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
The evidence page now covers both gaps: before-and-after response excerpts for the same request sequence (the base commit serves all 25 requests; this branch, with the quota enforced at 60 an hour and a 20 burst, answers requests 21 to 25 with 429 and |
|
Suggested line: Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
|
Added: |
2aaf93b to
c7ec35b
Compare
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Quick104
left a comment
There was a problem hiding this comment.
Review of c7ec35b4f (this branch rebased onto current main). Six findings; I'm fixing all six in a commit on this branch, so there's nothing for you to change.
Minor: docs/admin-api.md doesn't describe session_quota in the rate-limit config section. GET and PATCH /api/v2/admin/rate-limits/config now carry session_quota and return 422 for an unknown mode or a burst that would take more than a week to refill. The "Rate-limit configuration reads" section still lists only API-key tiers and auth endpoint budgets, so a third-party admin tool built from that doc won't know about the field or the new 422. Repair: name the field and its 422 cases there and link to Session quota in auth-api.md. I'm fixing this in a commit on this branch, so there's no need to change it yourself.
🤖 Claude Code (claude-opus-5-5)
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
1 similar comment
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Review summaryReviewed head: Fixed on this branch
How it was verified
Left for maintainers
Validated features: I couldn't read the validation board (missing User manual: no siloserver.org issue exists yet. It needs one for the new Per sign-in session group and its modes and defaults ( Apple and Android: no change needed. First-party sessions stay well under the default quota, and enforce is off by default. I didn't check whether the apps honor Fit: 7/10 · Readiness: 8/10 — conditional (assuming CI is green)
🤖 Claude Code (claude-opus-5-5) |
The per-second and per-minute limits stop bursts but not volume: a client that stays just under them can send hundreds of thousands of API requests a day. Each sign-in session now also spends a token bucket (10,000 requests an hour, 30,000 burst) with off, log, and enforce modes; log is the default. Media transfer routes, admins, impersonating admins, and API keys are not counted. Admins get a Busiest API clients dashboard card, backed by hourly summaries of the activity log, that shows which sessions make the most requests, the routes they call, and lets an admin sign one session out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…on quota Review fixes for the session quota and API clients summary: - Exempt everything under /stream and /playback, so a player keeps reporting progress, replanning and stopping after its session runs out, and anchor the direct-download exemption so POST /direct-download/links is counted. - Share the window limiter's Redis outage pause instead of keeping a second one, and drop refilled memory buckets inline instead of in a goroutine that was never stopped. - Leave session_quota out of the frozen /api/v1 rate-limit config. - Summarize UTC hours whatever the database time zone, redo the previous hour on each pass to pick up rows the activity log writes late, and leave out admins and impersonation as the quota does. - Cap one session's endpoint read at 24 hours. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ients card Review fixes: - Keep an untouched quota bucket for seven days in memory and Redis instead of until the last request's rate would have refilled it, so lowering the rate cannot hand a drained session a fresh burst. - Refresh the Busiest API clients card with the rest of the dashboard. - Keep the sign-out dialog open until the request settles, so a failure shows its error. - Derive the web session quota type from the generated v2 schema, and add api_clients to the capability example in docs/admin-api.md. - Drop the two approvals #3050 left in breaking-approvals.json; the base already contains the changes they approve. Co-Authored-By: Claude Opus 5.5 <[email protected]>
An idle quota bucket is dropped after a week, so a quota that takes longer than that to refill from empty would get a fresh burst back early. The admin settings now reject a burst larger than 168 times the hourly rate. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… let a spent session sign out - Take a cluster advisory lock in the API usage summary task, so servers don't run overlapping scans and upserts of the same hours. - Read a card window from the start of the hour it begins in, so the one-hour range isn't empty while the current hour is being summarized, and read one session's routes over exactly the requested hours. - Treat a summarized hour ahead of this server's clock as the current hour instead of rescanning the 48-hour catch-up window. - Leave POST /auth/logout and GET /auth/provider-logout out of the session quota, so an exhausted session can still end itself. - Show an idle session's routes as empty rather than a load error. - Document session_quota in the admin rate-limit config section. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n empty list The hand-built empty result didn't carry the v2 contract brand, so the web build failed type-checking. Return only the endpoints the card reads. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…pass The task held a session advisory lock on one pooled connection while the summary and prune statements asked the pool for another. With database.max_connections at 1 the startup pass waited on itself and held the only connection. Refresh now takes a transaction-scoped lock and runs both statements in that transaction, and skips the pass when another server holds the lock. Co-Authored-By: Claude Opus 5.5 <[email protected]>
c196d58 to
f51e4fa
Compare
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
🛡️ Codex Security Review · Automatically triggered
Here are some automated security review suggestions for this pull request.
Reviewed commit: f51e4fa6bf
ℹ️ About Codex security reviews in GitHub
This is an experimental Codex feature. Security reviews are triggered when:
- You comment "@codex security review"
- A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review
Once complete, Codex will leave suggestions, or a comment if no findings are found.
…ould have refilled it Every bucket was kept a week after its last request, so a signed-in user who kept signing in again grew the in-process map (and Redis) by one bucket per session for a week. A bucket now goes after the share of a week it is missing: the admin settings require any rate to refill a full burst within a week, so by then any allowed rate has refilled it and dropping it grants nothing. A drained bucket is still kept a week, so lowering the rate can't hand it a fresh burst; one a client barely touched goes within seconds. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
The 🤖 Claude Code (claude-opus-5-5) |
Problem
Related issue: N/A
Validation tasks: changes #1188 C1, #1217 C1 and #1218 C1 (all not yet run)
Silo's rate limits only look at short windows, so a client that stays under them can poll the API around the clock, and nothing in the admin UI shows it. On one production server, a single household's integration sent about 700,000 requests a day, about 70% of all API traffic, re-reading the same catalog items roughly every 40 minutes. It never came near a limit: the account budget is 480 requests a second and 24,000 a minute. The traffic also grew the request log by about 2.5 GB a week.
This adds an hourly request quota per sign-in session, which can log or refuse that traffic, and a dashboard card that shows which sessions make the most requests and lets an admin sign one out.
Approach
ratelimit.session.burst,ratelimit.session.requests_per_hour).ratelimit.session.modeisoff,log(the default: serve and log once per session every 10 minutes) orenforce(429 withRetry-After). It runs in the existing limiter after the account check, on the same backend. With Redis, one bucket per session is shared by every instance, timed by the Redis clock, and the quota shares the window limiter's outage pause. Settings changes keep bucket balances./streamand/playback(so a player keeps reporting progress, replanning and stopping after its session runs out), the other media transfer routes, API-key requests (they have their own tiers), admins, impersonation, and signing out (POST /api/v2/auth/logoutandGET /api/v2/auth/provider-logout, so a session that spent its quota can still end itself).ratelimit.QuotaExemptPathPatterndefines the exempt routes once, for Go and for SQL; a test fails if a route in the native media route list isn't exempt. Jellyfin-compatible sessions are not covered; they have their own session model.activity_loginto a newapi_client_usage_hourlytable every 15 minutes, on one server at a time (a transaction-scoped advisory lock), in UTC hours, kept for 30 days and leaving out what the quota leaves out.GET /api/v2/admin/stats/api-clientsandGET /api/v2/admin/stats/api-clients/{session_id}/endpoints(admin-only;api_clientsin the dashboard capabilities) serve the card. It ranks sessions over 1 hour to 30 days, each window read from the start of the hour it begins in, with share of traffic, 429 count and signed-out state. Opening a row shows the routes the session called in the last 24 hours and a button that signs out just that session through the existing admin login-session revoke. The card is in the Add widget sheet, not the default layout./api/v1stays frozen: the v1 rate-limit config endpoints neither return nor acceptsession_quota.docs/auth-api.md(Session quota) anddocs/admin-api.md. The user manual needs an update for the new setting and card; that issue will follow on siloserver.org.Validation
make lint-changed(0 issues) andmake lint-router-recoverypass.make test-gopasses exceptTestPlaybackInfoWithoutStripOrToneMapStillHasNoRouteandTestPlaybackInfoSkipsStripWhenRPUCannotBeStrippedininternal/jellycompat, which fail the same way on the base commit on the test machine; they depend on the host's ffmpeg.TestAPIUsageSummaryDBpasses against a migrated pgvector database, including with the database session in a +05:30 time zone. It is listed inscripts/ci/db-contracts.txt.make test-webpass.verify-actionlintwas not run because actionlint 1.7.12 isn't installed; no workflows changed.Retry-After. The drained session could still sign out, and its token then got 401. The card listed sessions with their 429 counts, showed an idle session's routes as empty, and signing a session out from the card revoked its token.TestAPIUsageSummaryDBand the sign-out rows inTestSessionQuotaMiddleware.TestAPIUsageSummaryDBalso runs a summary pass on a one-connection pool and checks that a pass is skipped while another server holds the lock.Retry-After: 60, and an admin session was never limited. An invalid mode was rejected with 422. The card listed sessions with the right 429 counts and left out the admin session and playback calls. Signing a session out from the card revoked its token while other users kept working. Saving Enforce from the Security page persisted.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-3075/
Surface and build: web admin Security settings and dashboard, desktop and phone width. "Before" is main and "after" is this branch, on one test server rebuilt in place, so both use the same data.
Risks
log, which logs one line per over-quota session every 10 minutes.Retry-After.activity_logevery 15 minutes, or up to 48 hours after downtime.Checklist
AI Disclosure
code-reviewat high effort, claude-opus-5-5) read the full diff for correctness, security and performance. It found ten issues: playback control calls refused in enforce mode, an unanchored exemption pattern, time-zone-dependent hourly buckets, a new field on frozen/api/v1, admins and impersonation counted on the card, an unbounded per-session endpoint scan, a second Redis outage pause, a leaked eviction goroutine, late activity rows dropped, and one extra Redis call per request. The first nine are fixed with tests where they apply; the extra Redis call is kept and listed under Risks.docs/admin-api.mddidn't describesession_quota. Kody then found that the first lock fix could deadlock a one-connection pool; that is fixed too. Codex's security review then found that quota buckets were kept a week after their last request, so repeated sign-ins could grow memory; a bucket now expires once any allowed rate would have refilled it.Note
Add per-sign-in-session hourly request quota and an API clients dashboard
off/log/enforcemodes, defaultlogat 10,000 requests/hour with a 30,000 burst) enforced via token buckets in middleware.go. Checks run after the account quota and before the global limiter; admins, API keys, impersonated requests, and media/sign-out/download paths are exempt.GET /api/v2/admin/stats/api-clientsand per-session endpoints) backed by hourly summaries in the newapi_client_usage_hourlytable, refreshed every 15 minutes by a scheduled task in summarize_api_usage.go.Busiest API clientsdashboard widget with a revoke-session action.logmode and rejected with 429 only inenforcemode; summaries exclude impersonated, admin, and quota-exempt traffic, and the frozen v1 rate-limit handlers omit the newsession_quotafield.Macroscope summarized 5b891ef.