调整 Plan/Build Todo 语义#667
Merged
phantom5099 merged 2 commits intoMay 20, 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.
背景
Plan 模式当前会维护执行态 todo,导致从 plan 切到 build 时用户对 todo 的职责感知不清晰。按 #659 的目标,本 PR 将计划上下文和执行进度状态拆开:plan 只负责产出计划,build 才创建和推进当前 run 的 todo。
Closes #659
当前修改
todo_write,保留只读工具与ask_user。plan_spec.todos非空,也不再要求summary_candidate.active_todo_ids。CurrentPlan时不再把PlanSpec.Todos自动灌入Session.Todos,旧 plan revision 替换也不再取消/继承 plan-owned todo。CurrentPlan也不默认继承为 todo。CurrentPlan和Session.Todos的职责边界。验证
go test -count=1 ./internal/promptasset ./internal/runtime ./internal/session ./internal/tools通过。go test ./...已运行,但当前环境存在与本次改动无关的既有失败:internal/cli的 Windows symlink/npm/open-browser 相关测试,以及internal/memo的日期断言。