修复后端状态灯瞬时变黄和桥接重复重注入 - #2093
Merged
Merged
Conversation
BigPizzaV3
requested changes
Sep 4, 2026
BigPizzaV3
left a comment
Owner
There was a problem hiding this comment.
bridge_health_check_script() 现在只判断 __codexSessionDeleteBridge 是否为函数,不再确认桥接请求实际可用。旧桥接函数可能仍存在但已失效/stale,watchdog 会因此跳过重注入,导致后端状态长期不可用。\n\n请保留防止并发请求的机制,同时增加不产生重复重注入的真实可用性验证(例如复用已有状态结果/请求序列),并补充“函数存在但请求失败时最终会重注入”的测试。另外请确认超时后的底层请求会被取消或结果会被安全丢弃,避免超时后仍继续执行造成竞态。
问题现象:桥接健康检查与后端状态轮询并发请求,短暂失败会误报后端异常并触发重复注入,导致状态灯偶尔由绿色变黄色。 解决方案:健康检查仅确认桥接存在;前端增加请求防重入、超时和连续失败阈值;watchdog 连续失败后才重注入,并补充回归测试。
审查回应:健康检查改用渲染层真实后端请求结果,CDP 探测超时按不确定状态处理,不触发重复注入;超时 Promise 的迟到结果会被安全丢弃。补充函数存在但请求失败、连续失败阈值和超时保护测试。
130040167
force-pushed
the
codex/fix-backend-status
branch
from
September 4, 2026 15:49
56d65da to
2e5da00
Compare
Contributor
Author
|
审查意见已逐项修复,且本 PR 与 #2092 保持文件范围完全独立。
当前分支已 rebase 到上游最新 |
Merged
BigPizzaV3
approved these changes
Sep 9, 2026
BigPizzaV3
left a comment
Owner
There was a problem hiding this comment.
复审通过。已核验:cdp_bridge 155/155 通过(本机,与你声称一致);新增的健康探测改为读取真实 /backend/status 成功时间戳 + generation/心跳防重入 + AbortController 超时取消,确实解决了『桥接函数存在但请求失败仍误判健康』与『重复重注入』两点。launcher 的 a_busy_floating_helper_port 失败为既有基线问题(干净 main 同样失败 左31/右1),非本 PR 引入。三平台 CI 全绿。已基于最新 main,可合并。
This was referenced Sep 9, 2026
Closed
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
问题现象
桥接健康检查和后端状态轮询并发执行时,短暂请求失败会让状态灯瞬间变黄,并触发重复桥接注入。
原因
健康检查承担了超出必要范围的后端可用性判断,前端请求缺少防重入/超时保护,watchdog 对单次失败立即作出重注入决策。
解决方案