fix(context): 显式标记空 Todo 状态#691
Merged
phantom5099 merged 5 commits intoMay 22, 2026
Merged
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
背景
关联 RFC issue:Closes #690
继续对话时,如果上一轮已经清空或完成 todo,context builder 之前会直接省略 Todo State 区块。模型在后续推理中无法明确区分“当前没有待办”和“旧待办仍可沿用”,容易继续写入已清空的 todo,形成 todo conflict。
当前修改
internal/context中,当 todo 列表为空或全部处于终态时,显式输出Todo State: None。Todo State或Todo State为None时,都要求先创建当前 run 的 required todos。verify回到execute,覆盖验证阶段发现仍需执行动作的状态转换。todoConflict,普通 conflict snapshot 仍保留冲突提示。验证
go test ./internal/context ./internal/runtime/controlplane ./internal/promptassetnpm --prefix web test -- useRuntimeInsightStore eventBridge风险与回滚
Todo State: None,会带来极少量 token 增量。verify -> execute状态转换。