1. 10 Mar, 2026 2 commits
  2. 09 Mar, 2026 12 commits
  3. 08 Mar, 2026 7 commits
  4. 07 Mar, 2026 17 commits
  5. 06 Mar, 2026 2 commits
    • JIA-ss's avatar
      fix: resolve golangci-lint errors (gofmt alignment, errcheck) · 1f3f9e13
      JIA-ss authored
      
      
      - Fix gofmt: align struct field comments in UsageCache, trim trailing
        whitespace on const comments
      - Fix errcheck: use comma-ok on type assertion for singleflight result
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      1f3f9e13
    • JIA-ss's avatar
      fix(usage): add negative caching, singleflight, and jitter to usage queries · 3ebebef9
      JIA-ss authored
      
      
      Prevents 429 rate-limit retry storms and reduces upstream correlation risk
      for Anthropic usage API queries.
      
      Three changes:
      1. Negative caching (1 min TTL) — 429/error responses are now cached,
         preventing every subsequent page load from re-triggering failed API calls.
      2. singleflight dedup — concurrent requests for the same account are
         collapsed into a single upstream call, preventing cache stampede.
      3. Random jitter (0–800 ms) — staggers multi-account cache-miss bursts so
         requests from different accounts don't hit upstream simultaneously with
         identical TLS fingerprints, reducing anti-abuse correlation risk.
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      3ebebef9