Repository navigation
refactor(cli): one todo registration for every face (#420, 3/3) - #427
Merged
Merged
Conversation
tool_roster::register_todo registers todo_read/todo_write with state hydrated from the transcript and todo_write absent in plan mode; run, resume, chat, mission and the session host call it instead of five copies (main's register_todo_tools moves into the roster).
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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.
What
One
tool_roster::register_todoreplaces the five copies of the task-list tool registration. Part 3 of 3; closes #420.Why
todo_read/todo_writewere registered in run, resume, chat, mission and the session host, each slightly differently (hydrated or not, plan-mode skip vs a laterretain_read_only). One helper makes the rule the same everywhere.Changes
tool_roster::register_todo(reg, entries, plan_mode): state hydrated from the transcript (a fresh session simply has no todo entries),todo_writeabsent in plan mode.main.rs: run, resume and chat call it;register_todo_tools(chat only) is gone. resume used to registertodo_writeand drop it with the laterretain_read_onlyin plan mode; it is now not registered at all, with the same result.mission.rs: calls it withplan_mode = false(missions refuse--plan-mode).session_host.rs: calls it after the storage open, as before.Testing
main.rsnow go through the shared helper (plan mode omitstodo_write);session_host::roster_testscovers the server path.cargo fmt,cargo clippy --workspace --all-targets -- -D warnings, bare-profile clippy (none / shell-tools),cargo test --workspace: all green.should_block: false; remaining hits areunwrap()in two unit tests andbug-todofalse positives on thetodomodule name (already ignored in.cora.yaml).