Dorian and Claude Opus 4.6
3b863d1f5f
feat: add theme system, improve creative scoring spam detection
...
Theme system (Section 5.1):
- Add PromptTheme type ('bitcoin' | 'conspiracy' | 'pc_culture' | 'bot_coding')
- Add optional theme field to PromptEntry interface
- pickChallenge now accepts optional theme bias, picks target theme with
30/20/20/30 distribution, prefers themed prompts when available
- challenges-extra.ts now imports PromptEntry type from challenge-data.ts
Creative scoring improvements (Section 7.2):
- Detect repeated phrases via trigram analysis (>25% duplicate = spam)
- Detect question echo (answer copies prompt back)
- Detect all-caps spam (>80% uppercase letters)
- Detect punctuation-only spam (<30% letter content)
- Minimum word count threshold (< 3 words = low score)
- 5 new tests: repeated phrases, question echo, all-caps, short answer, legit short
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-09 07:56:51 +00:00
Dorian and Claude Opus 4.6
4074ef94eb
feat: add leaderboard cache, performance benchmarks, and verify SSE cleanup
...
- Add 30s TTL leaderboard cache with invalidation on fight completion
- Add scoreRound performance benchmark: 1000 rounds in <100ms
- Add checkAnswer performance benchmark: 1000 checks in <50ms
- Add adversarial regex backtracking test for checkAnswer
- Verify SSE cleanup: connections, IP counters, spectator counts, event listeners
all properly decremented in finally block on disconnect
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-09 07:50:46 +00:00
Dorian and Claude Opus 4.6
f837153771
test: add 65 server engine tests — answers, scoring, challenges
...
- answers.test.ts: 19 tests covering all 10 checkAnswer() tiers
- scoring.test.ts: 30 tests for scoreRound, calculateElo, calculateTier, applyModifiers
- challenges.test.ts: 16 tests for pickChallenge, type exclusion, data integrity
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-07 23:55:36 +00:00