You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Grok turn 结算被账单 API 网络请求阻塞(≤15s):turn.completed 延迟、时长虚增、期间新 turn 被拒 #179
Activity
wosnxn123 commentedon Sep 6, 2026
【状态:已修复,待合并】PR: #182 (commit
fix(grok,opencode): …)修复内容:
#settleFromHistory先#finish(...)发 terminal,再void #refreshCredits()(错误吞掉+注释说明),turn.completed不再等账单往返;GROK_CREDITS_TTL_MS = 60_000节流:距上次成功抓取不足 TTL 直接复用快照(保留并发去重);#cancel立即对未决审批 resolve + 发interaction.closed(reason cancelled),Stop 后审批对话框不再滞留到 settle。验证:新增/改写用例——turn.completed 不等 credits(deferred gate 断言)、TTL 跳过第二次抓取、历史重读失败保留 succeeded、cancel 立即关闭 approvals;grok+opencode 139 通过。顺带消除了每 turn 边界两次全量重读历史中"阻塞 terminal 的那一次"的影响(重读仍在 settle 内同步执行但不再 gate terminal——如需进一步降 O(会话长度) 成本可后续异步化)。