forked from anomalyco/opencode
-
Notifications
You must be signed in to change notification settings - Fork 0
[REQ-162][CODE] 持续 401 不得形成每 30 秒一次的 respawn 自激循环 #601
Copy link
Copy link
Closed
Labels
area:runtimeServices, jobs, infrastructure, or operationsServices, jobs, infrastructure, or operationsprio:P0Critical safety, data, or broad production impactCritical safety, data, or broad production impacttype:bugSomething is incorrect or regressedSomething is incorrect or regressed
Description
Activity
Metadata
Metadata
Assignees
Labels
area:runtimeServices, jobs, infrastructure, or operationsServices, jobs, infrastructure, or operationsprio:P0Critical safety, data, or broad production impactCritical safety, data, or broad production impacttype:bugSomething is incorrect or regressedSomething is incorrect or regressed
来源:Codex 只读审计(2026-07-25,
alpha @ 0aa9a0b70)的 B3。基线明令「transient 失败禁循环 respawn(防 respawn 风暴)」——
docs/design/2026-07-23-startup-availability-baseline.md## ③。现状未守住。失败序列
main/alpha-account-request.ts:33,39、main/alpha-auth.ts:567、renderer/alpha-ui/model-recovery.ts:88now + 30scooldown。注:第 3 步的无上限退避本身是 #594 的正确修复(消灭预算悬崖),
问题在于它与「有限 cooldown 作为终局」组合出了自激。不要回退 #594。
修法要点
续期后的第二个 401 应把该 purpose 的「account 驱动刷新」锁住,
直到该 endpoint 出现非 401 成功或外部 auth 状态明确变化。
不得用有限 cooldown 作为终局。
本票边界
main/alpha-account-request.ts、main/alpha-auth.ts的 account 驱动刷新入口。refresh CAS(另票)。不得回退 [REQ-161][CODE] renderer 侧三个闩死点改为不依赖事件必达——client 有界自探 / 取消重试悬崖 / 立即重试覆盖 client 层 #594 的无上限退避。
bin/check绿。回归测试(退出条件;审计确认当前缺失)
禁止过度工程:最简实现为准,不引入新抽象或状态机。