Repository navigation
fix(cli): resume and chat run their turns on a session token with the sibling watcher (#428, 3/3) - #432
Merged
Conversation
… sibling watcher (#428, 3/3) turn_runner::cli_turn_token returns the CLI session's cancel token and, in a child agent, the sibling watcher that queues change notices on it (#380). run, resume and chat all use it; resume and chat now call run_turn_with_cancel / resume_turn_with_cancel, so a child running tole chat or tole resume receives sibling notices like tole run. The sibling e2e covers all three faces and runs serially (timing-based scenario).
🔍 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
tole resumeandtole chatnow run their turns on a session cancel token with the child-agent sibling watcher attached, liketole run. Part 3 of 3; closes #428.Why
Only
tole runcreated a cancel token and started the sibling watcher (#380);resumeandchatcalledrun_turn/resume_turnwithout a token. A child agent driven throughtole chatortole resumetherefore never received sibling change notices.Changes
turn_runner::cli_turn_token(): the session'sCancelTokenplus, in a child agent, the watcher that queues sibling notices on it (a no-op outside a child).main.rs: run uses it (replacing its inline copy); resume and chat create it once per session and callrun_turn_with_cancel/resume_turn_with_cancel.sibling_notice_e2e.rs: the two-child scenario now also runs with child A ontole chatand ontole resume. The tests in this file are serialized because the scenario is timing-based (B's edit must land inside A's slow step).Testing
a_sibling_edit_reaches_a_child_running_tole_chat/..._tole_resume: both fail on the previousmain.rsand pass with this change; the originalrunscenario still passes.cargo fmt,cargo clippy --workspace --all-targets -- -D warnings, bare-profile clippy (none / shell-tools),cargo test --workspace: all green; rebased onto refactor(cli): one memory loop for every face (#428, 2/3) #431, rebuilt, lib and sibling tests re-run.review_finalize:should_block: false, 0 issues. (review_preparelists acrypto/hardcoded-secrethit onCancelToken::default(); it is a false positive and.cora.yamlalready ignores it, whichfinalizeapplies.)