Repository navigation
Conversation
|
All contributors have signed the CLA. ✅ |
I have read the CLA Document and I hereby sign the CLA |
|
I have read the CLA Document and I hereby sign the CLA |
408d973 to
5578cea
Compare
Keep shared and Fable weekly snapshots until their own reset times. Continue clearing expired or invalid windows and accepting new response headers. Also clear a kept snapshot once its own reset time passes while the 5h window is still active, so an expired weekly value is not shown as current usage. Cover independent window expiry and account reloads after restart. Fixes Wei-Shaw#7989
5578cea to
e051bee
Compare
- 普通周额度与 Fable 周额度各按自己的重置时间判断:未到期保留,已到期清除,没有有效重置时间的只在 5h 换窗时清除 - 与 fork 的会话窗口写入节流冲突处采用上游写法,原 windowReset 变量无其他引用 测试:service 包会话窗口与限流相关单测通过。
- OpenAI/Codex 稳定性:OAuth 缺过期时间时按 JWT 判定并在 WS 上恢复 401(Wei-Shaw#8034,替换 fork 原有的 Wei-Shaw#7826 实现)、模型拒绝不计入调度错误率(Wei-Shaw#8013)、首包前预算耗尽换号(Wei-Shaw#8005)、Sol 别名误判修正(Wei-Shaw#8063) - 流与协议:原生 Claude 转 Chat 转发心跳(Wei-Shaw#8052)、Codex 流式出图兼容 JSON 响应(Wei-Shaw#8028)、Antigravity 工具结果图片(Wei-Shaw#8045) - 用量显示:5h 换窗保留未到期周额度(Wei-Shaw#7990)、缓存命中率口径修正与单次命中率显示(Wei-Shaw#8018、Wei-Shaw#7995) 测试:go test -tags=unit ./... 全部通过,golangci-lint 0 issues;前端 make test-frontend 通过;集成测试交 CI。
|
感谢贡献!5h 窗口重置时误清周用量读数的问题,已由修复相同问题的 #8723 合入 main 解决。两个 PR 重写的是同一段 Thanks! #8723 (now merged) fixes the same weekly-usage-cleared-on-5h-reset issue and rewrites the same |
5 小时额度重置后,Fable 周额度不应跟着变成空白。这里让普通周额度和 Fable 周额度分别检查自己的重置时间:没到时间就保留上次的值,已过期或没有有效重置时间就清空。新的响应头仍按原来的方式更新。
账号经过 JSON 保存、重新加载,再创建新的服务实例,检查未过期的周窗口仍保持原来的到期时间,停机期间已经过期的 Fable 窗口会被清理。包含 UTC+8 时间和 JSON 数字反序列化的情况。
Fixes #7989
验证
go test -tags=unit ./internal/service -run '^TestUpdateSessionWindow' -count=1通过。go test -race -tags=unit ./internal/service -run '^TestUpdateSessionWindow' -count=10通过。go vet -tags=unit ./internal/service通过。