Fix restored todo state across plan seeds / 修复计划待办恢复状态#4313
Conversation
Co-authored-by: JesonChou <51042251+JesonChou@users.noreply.github.com> Co-authored-by: ashishexee <144021866+ashishexee@users.noreply.github.com> Co-authored-by: GTC2080 <140309575+GTC2080@users.noreply.github.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb1891b230
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb1891b230
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
approve |
|
Thanks for pulling these four PRs together — the integration reads well, and the success/error invariants you added on top (requiring an explicit successful tool result before replaying One mechanical thing before this can land: #4312 just merged and touches the same files, so
Everything else (the Go and TS sources) auto-merges cleanly. Once |
|
|
|
Merged the latest main-v2 into this branch and resolved the package.json script conflict by keeping the union of both test chains: the todo visibility precheck, history-tool-status after send-failed, and the newer main-v2 frontend tests. Pushed fix commit dc4f86c. Local verification passed:
GitHub checks are green again. |
Fixes #4259.
Also closes #4105, #4170, and #4241; addresses #4169.
Supersedes #4159, #4230, #4271, and #4309 with one integrated implementation.
Summary
complete_stepcalls can advance the visible todo after approval.todo_writeandcomplete_steponly when their matching tool result is explicitly successful.error:,blocked:,Error:, or[erroras failures, and treat missing tool results as non-successful instead of silently completed.Prior PR Contributions
Thank you to the authors of the related PRs. This integration PR keeps the useful pieces from each one and adds the missing success/error invariants found during review.
todoState, which prevented latercomplete_stepcalls from advancing the todo panel.complete_step, a stable todo dismissal key, and restored-history regression coverage.The commit includes co-author trailers for @JesonChou, @ashishexee, and @GTC2080.
Review Fixes Added Here
error:orblocked:tool results as successfultodo_write/complete_stepcalls.complete_stepcall with no corresponding tool result as success; replay now requires an explicit successfulRoleToolresult.Verification
go test ./...(cd desktop && go test ./...)(cd desktop/frontend && npm run test:typecheck)(cd desktop/frontend && npm run test)(cd desktop/frontend && npm run build)git diff --check