1. 08 Mar, 2026 3 commits
  2. 07 Mar, 2026 8 commits
  3. 06 Mar, 2026 17 commits
  4. 05 Mar, 2026 12 commits
    • erio's avatar
      fix: use real Concurrency instead of LoadFactor for metrics and monitoring · c87e6526
      erio authored
      LoadFactor should only affect scheduling weight, not load rate reporting.
      c87e6526
    • erio's avatar
      af3a5076
    • erio's avatar
      fix: address load_factor code review findings · 12b33f4e
      erio authored
      - Fix bulk edit: send 0 instead of null/NaN to clear load_factor
      - Fix edit modal: explicit NaN check instead of implicit falsy
      - Fix create modal: use ?? instead of || for load_factor
      - Add load_factor upper limit validation (max 10000)
      - Add //go:build unit tag and self-contained intPtrHelper in test
      - Add design intent comments on WaitPlan.MaxConcurrency
      12b33f4e
    • erio's avatar
    • erio's avatar
      fix: use range assertion for time-sensitive ExpiresInDays test · 77701143
      erio authored
      The test could flake depending on exact execution time near midnight
      boundaries. Use a range check (29 or 30) instead of exact equality.
      77701143
    • erio's avatar
      refactor: unify post-usage billing logic and fix account quota calculation · 02dea7b0
      erio authored
      - Extract postUsageBilling() to consolidate billing logic across
        GatewayService.RecordUsage, RecordUsageWithLongContext, and
        OpenAIGatewayService.RecordUsage, eliminating ~120 lines of
        duplicated code
      - Fix account quota to use TotalCost × accountRateMultiplier
        (was using raw TotalCost, inconsistent with account cost stats)
      - Fix RecordUsageWithLongContext API Key quota only updating in
        balance mode (now updates regardless of billing type)
      - Fix WebSocket client disconnect detection on Windows by adding
        "an established connection was aborted" to known disconnect errors
      02dea7b0
    • erio's avatar
      fix: route antigravity apikey account test to native protocol · c26f93c4
      erio authored
      Antigravity APIKey accounts were incorrectly routed to
      testAntigravityAccountConnection which calls AntigravityTokenProvider,
      but the token provider only handles OAuth and Upstream types, causing
      "not an antigravity oauth account" error.
      
      Extract routeAntigravityTest to route APIKey accounts to native
      Claude/Gemini test paths based on model prefix, matching the
      gateway_handler routing logic for normal requests.
      c26f93c4
    • erio's avatar
      feat: add quota limit for API key accounts · 05527b13
      erio authored
      - Add configurable spending limit (quota_limit) for apikey-type accounts
      - Atomic quota accumulation via PostgreSQL JSONB operations on TotalCost
      - Scheduler filters out over-quota accounts with outbox-triggered snapshot refresh
      - Display quota usage ($used / $limit) in account capacity column
      - Add "Reset Quota" action in account menu to reset usage to zero
      - Editing account settings preserves quota_used (no accidental reset)
      - Covers all 3 billing paths: Anthropic, Gemini, OpenAI RecordUsage
      
      chore: bump version to 0.1.90.4
      05527b13
    • guoyongchang's avatar
      refactor: 移除冗余中间类型和不必要代码 · 831abf79
      guoyongchang authored
      
      
      - 移除 ScheduledTestOutcome 中间类型,RunTestBackground 直接返回 *ScheduledTestResult
      - 简化 SaveResult 直接接受 *ScheduledTestResult
      - 移除 handler 中不必要的 nil 检查
      - 移除前端 ScheduledTestsPanel 中多余的 String() 转换
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      831abf79
    • guoyongchang's avatar
    • guoyongchang's avatar
      fix: 修复 golangci-lint depguard 和 gofmt 错误 · 9a8dacc5
      guoyongchang authored
      
      
      将 redis leader lock 逻辑从 service 层抽取为 LeaderLocker 接口,
      实现移至 repository 层,消除 service 层对 redis 的直接依赖。
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      9a8dacc5
    • guoyongchang's avatar
      feat: 支持基于 crontab 的定时账号测试 · 3a089242
      guoyongchang authored
      
      
      每个测试计划绑定一个账号和一个模型,按 cron 表达式定期执行测试,
      保存历史结果并在前端账号管理页面中提供完整的增删改查和结果查看功能。
      
      主要变更:
      - 新增 scheduled_test_plans / scheduled_test_results 两张表及迁移
      - 后端 service 层:CRUD 服务 + 后台 cron runner(每分钟扫描到期计划并发执行)
      - RunTestBackground 方法通过 httptest 在内存中执行账号测试并解析 SSE 输出
      - Redis leader lock + pg_try_advisory_lock 双重保障多实例部署只执行一次
      - REST API:5 个管理端点(计划 CRUD + 结果查询)
      - 前端 ScheduledTestsPanel 组件:计划管理、启用开关、内联编辑、结果展开查看
      - 中英文 i18n 支持
      Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
      3a089242