Area
Backend — API / GraphQL
Category
Test coverage
Description
The redis package is imported by 36 files and handles session event storage, caching, distributed locks, and async processing queues. It has only 3 tests covering CachedEval and locking — the session data hot path is completely untested.
Critical untested paths:
- Session payload round-trip — AddPayload → GetSessionData with Snappy compression
- Processing queue — Lua script atomicity (AddSessionToProcess → GetSessionsToProcess → RemoveSessionToProcess)
- Beacon payload filtering — decimal score handling in GetSessionData (counterintuitive logic)
- Flag tristate — nil vs true vs false for billing quota, GitHub rate limiting
- Snappy fallback — silent fallback to raw bytes on decompression failure
Known gotchas:
- Lua scripts for session locking use a
.5 score offset trick — undocumented, untested - Snappy decode failure silently falls back to raw bytes — could mask corruption
- FlushDB/Del are silent no-ops in production — callers may not realize
See src/backend/redis/MODULE.md for full analysis.
Affected Files / Packages
src/backend/redis/utils.go (696 lines — all operations)
src/backend/redis/cache.go (74 lines — generic CachedEval)
src/backend/redis/utils_test.go (102 lines — 3 tests)
Area
Backend — API / GraphQL
Category
Test coverage
Description
The
redispackage is imported by 36 files and handles session event storage, caching, distributed locks, and async processing queues. It has only 3 tests covering CachedEval and locking — the session data hot path is completely untested.Critical untested paths:
Known gotchas:
.5score offset trick — undocumented, untestedSee
src/backend/redis/MODULE.mdfor full analysis.Affected Files / Packages