fix: add rate limiting to /poll endpoint + fix test type errors (BUG-S3)

- Add rateLimit(1_000, 30) middleware to GET /poll endpoint
- Fix Challenge type errors in human-responses test files (missing baseDamage)
- Add rate-limit unit test verifying 429 after exceeding limit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-12 22:41:59 +00:00
co-authored by Claude Opus 4.6
parent 48847d879c
commit c6a54d63c4
4 changed files with 101 additions and 4 deletions
@@ -9,7 +9,7 @@ const testChallenge: Challenge = {
answers: ['2009'],
scoring: 'factual',
timeout_ms: 8000,
difficulty: 'easy',
baseDamage: 20,
choices: ['2009', '2010', '2008'],
}
+1 -1
View File
@@ -9,7 +9,7 @@ const mockChallenge: Challenge = {
answers: ['2009'],
scoring: 'factual',
timeout_ms: 8000,
difficulty: 'medium',
baseDamage: 20,
choices: ['2009', '2010', '2008'],
}