Files
stack/apps
Jason WoltjeandClaude Opus 4.6 144495ae6b fix(CQ-API-5): Document throttler in-memory fallback as best-effort
Add comprehensive JSDoc and inline comments documenting the known race
condition in the in-memory fallback path of ThrottlerValkeyStorageService.
The non-atomic read-modify-write in incrementMemory() is intentionally
left without a mutex because:
- It is only the fallback path when Valkey is unavailable
- The primary Valkey path uses atomic INCR and is race-free
- Adding locking to a rarely-used degraded path adds complexity
  with minimal benefit

Also adds Logger.warn calls when falling back to in-memory mode
at runtime (Redis command failures).

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-06 15:15:11 -06:00
..