Skip to content

refactor: turn cleanup API, TurnState, impl cascade, tools split#127

Merged
davidrhodus merged 1 commit into
mainfrom
refactor/turn-cleanup-state-impl-cascade-split
Jul 21, 2026
Merged

refactor: turn cleanup API, TurnState, impl cascade, tools split#127
davidrhodus merged 1 commit into
mainfrom
refactor/turn-cleanup-state-impl-cascade-split

Conversation

@davidrhodus

Copy link
Copy Markdown
Contributor

Summary

  • A: TurnCleanupKind / SessionRollback / cleanup_turn — single abnormal teardown path (CLI, TUI, REPL, sync, explore).
  • B: Owned TurnState bag; model/verify project from it instead of a giant local list.
  • C: IMPLEMENTATION_COMPLETENESS_CASCADE for no-change / scaffold / validation gates.
  • D: Domain setters (begin_turn, set_outcome, set_task*, try_begin_*).
  • E: protocol_import_lint tests for turn-loop hi_tools::protocol / infra imports.
  • F: tools/{mod,batch}.rs + model_request.rs helpers.

Test plan

  • cargo test --manifest-path crates/hi-agent/Cargo.toml --lib (635 passed)
  • cargo check --manifest-path crates/hi-cli/Cargo.toml
  • cargo check --manifest-path crates/hi-tui/Cargo.toml

Unify abnormal turn teardown via cleanup_turn (Cancel/Fail) across CLI,
TUI, REPL, sync, and explore children. Own per-turn loop state in
TurnState, table-drive implementation completeness gates, add domain
setter APIs, lint hi-tools protocol/infra imports in the turn loop, and
split tools into tools/batch plus model_request helpers.
@davidrhodus
davidrhodus merged commit 83a7362 into main Jul 21, 2026
1 check failed
@davidrhodus
davidrhodus deleted the refactor/turn-cleanup-state-impl-cascade-split branch July 21, 2026 00:47
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.

1 participant