Skip to content

feat(turns): add loop exit handshake contract#3295

Merged
serrrfirat merged 3 commits into
reborn-integrationfrom
reborn-loop-exit-handshake
May 6, 2026
Merged

feat(turns): add loop exit handshake contract#3295
serrrfirat merged 3 commits into
reborn-integrationfrom
reborn-loop-exit-handshake

Conversation

@serrrfirat
Copy link
Copy Markdown
Collaborator

Summary

  • Add distinct driver-facing LoopExit contract types and bounded refs in ironclaw_turns.
  • Add pure validation/mapping from LoopExit to trusted TurnRunnerOutcome or RecoveryRequired.
  • Document the LoopExit handshake and link it from Reborn turn runner/agent-loop contracts.

Test Plan

  • CARGO_TARGET_DIR=/tmp/ironclaw-cargo-target cargo test -p ironclaw_turns --test loop_exit_contract
  • CARGO_TARGET_DIR=/tmp/ironclaw-cargo-target cargo test -p ironclaw_turns --all-features --test loop_exit_contract
  • CARGO_TARGET_DIR=/tmp/ironclaw-cargo-target cargo test -p ironclaw_turns --test turn_coordinator_contract
  • CARGO_TARGET_DIR=/tmp/ironclaw-cargo-target cargo test -p ironclaw_turns --lib
  • CARGO_TARGET_DIR=/tmp/ironclaw-cargo-target cargo test -p ironclaw_turns --all-features --test db_turn_state_store_contract
  • CARGO_TARGET_DIR=/tmp/ironclaw-cargo-target cargo clippy -p ironclaw_turns --all-targets --all-features
  • bash scripts/pre-commit-safety.sh
  • cargo fmt --check --package ironclaw_turns
  • git diff --check

Closes #3232

@github-actions github-actions Bot added scope: docs Documentation size: L 200-499 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: core 20+ merged PRs labels May 6, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements the LoopExit handshake contract in the ironclaw_turns crate, introducing a structured way for agent-loop drivers to report attempt outcomes. It adds new ID types, the LoopExit enum, and validation logic that translates driver claims into trusted runner outcomes or recovery states based on safety policies. The PR also includes extensive tests for the validation logic and new documentation detailing the contract's purpose and requirements. I have no feedback to provide.

@serrrfirat serrrfirat merged commit 0208893 into reborn-integration May 6, 2026
14 checks passed
@serrrfirat serrrfirat deleted the reborn-loop-exit-handshake branch May 6, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: core 20+ merged PRs risk: low Changes to docs, tests, or low-risk modules scope: docs Documentation size: L 200-499 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant