Repository navigation
fix(usage): advance five-hour window start on active quota sync - #8698
Merged
Wei-Shaw merged 1 commit intoNov 16, 2026
Merged
Conversation
riofutab
added a commit
to riofutab/sub2api
that referenced
this pull request
Nov 13, 2026
riofutab
added a commit
to riofutab/sub2api
that referenced
this pull request
Nov 13, 2026
- Claude 链路:令牌轮换后 401 同账号重试,per-turn beta 保留轮次输出配置,Stainless 版本头与抬升后的 UA 对齐(Wei-Shaw#8737 Wei-Shaw#8742 Wei-Shaw#8731 Wei-Shaw#8726 Wei-Shaw#8724 Wei-Shaw#8698)。 - Codex/OpenAI 链路:Desktop 独立上下文原样转发并删除 fork 的 bootstrap 扫描器,分叉会话沿用父会话缓存键,刷新后的令牌在补充信息超时时仍保存(Wei-Shaw#8680 Wei-Shaw#8664 Wei-Shaw#8671 Wei-Shaw#8735 Wei-Shaw#8682 Wei-Shaw#8703)。 - 构建:Go 升到 1.27.4 修复 GO-2026-6859(Wei-Shaw#8670);前端 Gemini 用量条刷新不再跳动(Wei-Shaw#8740)。 - fork 带的 Wei-Shaw#8034 测试改为断言轮换后的凭据被保存,并为测试桩补齐 CAS 方法。 - 后端全量 unit、golangci-lint、前端 lint/typecheck/账号组件测试通过;repository 集成测试未跑。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
主动查询 Claude 五小时额度时,
syncActiveToPassive调用UpdateSessionWindowEnd只更新结束时间。旧窗口的起点保留下来;下次读取账号时,GetCurrentWindowStartTime看到新的结束时间仍在未来,就把旧起点用于费用统计和本地限额判定。在同一次 UPDATE 中同步
start = reset - 5h和end = reset,与成功响应头路径的窗口计算一致。现有状态字段和 scheduler outbox 更新保持原有处理。Related to #8694 第 2 项:这是可独立复现的持久化缺口,尚未确认报告者的部署是否由此触发。#7990、#8644、#8569 的周窗口和主动刷新工作各自继续;此变更不改变上游额度、重置操作或账单记录。现有 30 秒费用缓存及 1 分钟统计缓存仍按原 TTL 生效。
验证(Go 1.27.3,macOS arm64):
go test -p=2 -tags=unit ./... -count=1:通过(Go JSON test/subtest 条目:26,879 pass / 41 skip)。go test -p=2 -tags=integration ./... -count=1:通过(16,144 pass / 16 skip),新增 PostgreSQL 回归实际 pass,未被跳过。golangci-lint run --timeout=30m --concurrency=2 ./...通过。当前基线 Go 1.27.3 的共享安全工具链升级由 #8670 跟踪。
AI 披露:由 AI agent 自主实现和验证,未经人工 review。测试未调用真实 provider,未验收用户部署。