Repository navigation
fix(minimax-bot): 重启后已完成的回复不再把请求判成待确认 - #190
Open
Apageoflove wants to merge 1 commit into
Open
Apageoflove wants to merge 1 commit into
Apageoflove wants to merge 1 commit into
Conversation
MyPrototypeWhat
requested changes
Dec 1, 2026
MyPrototypeWhat
left a comment
Collaborator
There was a problem hiding this comment.
谢谢这次 minimax-bot 的重启恢复修复。现头 a2fee217 还不能合。
作者要修的 processing + done 窗口是对的,但恢复规则过宽。loadMessages 现在把「有关联回复、且不是 interrupted / streaming / AGENT_OUTCOME_UNKNOWN」都标成 delivered,不限于 status 为 done 的回复。因此 processing 的用户请求配上 status 为 error、errorCode 为 ETIMEDOUT 的回复,也会走这条路径。
活路径里,回复会先由 updateMessage 落盘,inbox 随后才写投递终态。Host 已经接手后再抛错时 safeToContinue 是 false,ETIMEDOUT 也不在可继续的错误码里,所以 inbox 会把请求写成 uncertain。如果进程停在这两步之间,当前实现会在重启后把请求标成 delivered,并放行后面的消息;现有 main 会停在 uncertain。
新测试只覆盖了 processing + done。请把 delivered 收窄到真正完成的回复(例如只对 status 为 done 的回复),并补上 processing + error/ETIMEDOUT 仍为 uncertain、后续请求保持 held 的测试。
请更新这个分支,我们再看新头。
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.
请求在回合开始前被标成
processing。如果进程在回复已经落盘、但 inbox 还没写下投递结果时退出,重启恢复只看“有没有关联回复”,有就标成uncertain,不看回复到底是什么状态。于是一条已经正常完成的回复也会把请求标成待确认。后续消息被这个
uncertain闸门挡住,永远停在held。实测同一个崩溃窗口:
引擎的重试路径本来就有更窄的规则:只有
interrupted、streaming或AGENT_OUTCOME_UNKNOWN才算结果未知。重启恢复现在和它共用同一个判定函数,两处不会再各写一套。恢复规则变成:关联回复结果未知 →
uncertain;有回复且结果已知 →delivered;没有回复 →pending。adjusting仍按原规则变成held。测试加了一条:磁盘上留下
processing的用户消息和done的助手回复,重启后请求必须是delivered,并且下一条消息能真正跑到 Host。这条在未改的 main 上是红的。全量 441 条串行通过。版本号 0.7.46。当前 main 是 0.7.40;前面还有 #184(0.7.41)、#172(0.7.42)、#187(0.7.43)、#188(0.7.44)、deleteSchedule 修复(0.7.45),按这个顺序合。
验证范围:只有 Node 22 上的测试是实测的。真实 Host 和 Electron 我没跑过 —— 这一层是仅个人判断。
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.