Skip to content

refactor(cli): one todo registration for every face (#420, 3/3) - #427

Merged
ajianaz merged 1 commit into
developfrom
refactor/roster-todo
Oct 26, 2026
Merged

ajianaz merged 1 commit into
developfrom
refactor/roster-todo

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

What

One tool_roster::register_todo replaces the five copies of the task-list tool registration. Part 3 of 3; closes #420.

Why

todo_read / todo_write were registered in run, resume, chat, mission and the session host, each slightly differently (hydrated or not, plan-mode skip vs a later retain_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_write absent in plan mode.
  • main.rs: run, resume and chat call it; register_todo_tools (chat only) is gone. resume used to register todo_write and drop it with the later retain_read_only in plan mode; it is now not registered at all, with the same result.
  • mission.rs: calls it with plan_mode = false (missions refuse --plan-mode).
  • session_host.rs: calls it after the storage open, as before.
  • CHANGELOG.

Testing

  • The existing todo tests in main.rs now go through the shared helper (plan mode omits todo_write); session_host::roster_tests covers the server path.
  • cargo fmt, cargo clippy --workspace --all-targets -- -D warnings, bare-profile clippy (none / shell-tools), cargo test --workspace: all green.
  • Cora agent-as-reviewer on the exact staged diff: should_block: false; remaining hits are unwrap() in two unit tests and bug-todo false positives on the todo module name (already ignored in .cora.yaml).

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).
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 15f64af into develop Oct 26, 2026
16 checks passed
@ajianaz
ajianaz deleted the refactor/roster-todo branch October 26, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(cli): one tool roster for every face

1 participant