Repository navigation
v3.23.2 — Rate Limiting as a Domain 🚦
v3.23.2 — Rate Limiting as a Domain 🚦
Release date: 12 October 2026
Type: Refactor with deliberate behavior changes
PRs: #341 · #342 · #344 · Issues: #338 · #339 · #340 · follows v3.21.2
What's New
- One
backend/src/rateLimiting/module. Every rate-limited resolver and route names a Rate limit from one list; no call site passes numbers. Seven call sites, previously three call styles, now go through one door. - Fail closed where it costs money. Chatbot, Goggins and register refuse with
SERVICE_UNAVAILABLEwhen Redis is down instead of running unlimited. APOD and the health probe still fail open. - No hanging on a reconnecting Redis. The counter gives Redis 1s, then falls into fail open / fail closed.
- Silent rate limits for register and the health probe: refused with a generic message and no numbers to probe.
- One
RateLimitInfo { limit, remaining, resetTime }, on success and in theRATE_LIMITEDerror. Goggins counts down fromresetTimelike chatbot and APOD. - Vocabulary and a first ADR: Rate limit, Subject, Window, Visible / Silent, Fail open / closed in
CONTEXT.md;docs/adr/0001-rate-limiting-domain.md. - Gone: the three old limiter files,
testRateLimit, theRATE_LIMIT_*env vars, the ESLint rate-limit allow-list, the last rawnew GraphQLErrorsites.
Before / After
| Rate limit | Before | After |
|---|---|---|
| Chatbot | 5/h per user, fail open | 5/h per user, fail closed |
| APOD (signed in) | 5/h today + 5/h by date, separate | 10/h shared |
| APOD (anonymous) | 5/h per IP | 5/h per IP |
| Goggins | 2/24h per email, fail open | 2/24h per email, fail closed |
| Register by IP | 5/h, skipped without an IP, BAD_USER_INPUT |
5/h, missing IP counted as unknown, silent RATE_LIMITED, fail closed |
| Register by email | 3/h, BAD_USER_INPUT |
3/h, silent RATE_LIMITED, fail closed |
/health/ready |
30/min, 429 with resetTime |
30/min, 429 with no numbers |
| Redis keys | rate-limit:*, goggins:* |
rl:<rateLimit>:<subjectKind>:<id> (counters reset once on deploy) |
Tests
- Backend: 321 passing (new: 12 module tests against real Redis, 7 behavior tests that were red on the old code)
- Frontend: 229 passed, 5 skipped (Goggins rate-limit tests rewritten for
resetTime)
Also in this release (since v3.21.2)
- v3.22.0 — Admin shell (#320): mobile drawer, grouped nav, back to site
- v3.22.1 — Admin dashboard (#321): needs-attention strip + launch tiles
- v3.22.2 — Backend guardrails (#324): lint + typecheck, Redis pretest guard, pre-commit hook
- v3.22.3 — Coding standards (#331): raw
GraphQLErrorbanned by ESLint,CODING_STANDARDS.md
Deploy notes
- Backend and frontend ship together (the Goggins mutation no longer selects
allowed/resetIn). RATE_LIMIT_WINDOW,RATE_LIMIT_MAX_REQUESTS,RATE_LIMIT_ANONYMOUS_REQUESTScan be removed from the production env; they are ignored.