1. 29 Apr, 2026 1 commit
    • shaw's avatar
      fix(scheduler): resolve SetSnapshot race conditions and remove usage throttle · 8bf2a7b8
      shaw authored
      Backend: Fix three race conditions in SetSnapshot that caused account
      scheduling anomalies and broken sticky sessions:
      - Use Lua CAS script for atomic version activation, preventing version
        rollback when concurrent goroutines write snapshots simultaneously
      - Add UnlockBucket to release rebuild lock immediately after completion
        instead of waiting 30s TTL expiry
      - Replace immediate DEL of old snapshots with 60s EXPIRE grace period,
        preventing readers from hitting empty ZRANGE during version switches
      
      Frontend: Remove serial queue throttle (1-2s delay per request) from
      usage loading since backend now uses passive sampling. All usage
      requests execute immediately in parallel.
      8bf2a7b8
  2. 14 Apr, 2026 1 commit
    • erio's avatar
      fix: flaky WebSocket test, usage request queue, and test improvements · 3fa5b8bc
      erio authored
      - Fix flaky WebSocket passthrough test: allow StatusNormalClosure after
        client close instead of requiring NoError (race condition fix)
      - Fix ratelimit 401 test: use PlatformOpenAI instead of PlatformGemini
        for OAuth token cache invalidation scenario (more accurate)
      - Add usageLoadQueue: Anthropic OAuth/setup-token accounts sharing the
        same proxy exit are serialized with 1-2s jitter to prevent upstream 429
      - AccountUsageCell: add module-level usage cache (5min TTL), unmounted
        safety guard, and integrate enqueueUsageRequest for throttled fetching
      3fa5b8bc