feat(interaction): real mid-turn steering with applied reporting - #497
feat(interaction): real mid-turn steering with applied reporting#497renanalmd wants to merge 1 commit into
Conversation
|
head_sha: 变更摘要此 PR 为核心交互层引入了真实的**中途转向(mid-turn steering)**机制,并附加了完整的应用报告。核心变更在于: 主要改动
|
|
head_sha: 🤖 AI Code Review
|
b52d8f0 to
4795ece
Compare
Wire send_input so hosts can steer an active round without stealing the output lease, refuse steers after the round ends, and report what reached model context. - SendInputResult / InputDisposition on every send_input path - STEER with no active round rejects (no_active_round); expected_round_id rejects round_mismatch when the client races past turn end - Drop undrained steers at round teardown so they cannot bleed into the next turn; emit steer.applied with dropped ids - Steering envelopes carry optional request ids; rails can bound a drain - Team leader and member steers reach the live runtime; applied/dropped surfaces for hosts - Public ReActAgent.set_steering_applied_sink for host bridges; DeepAgent binds via duck-typing so harness test doubles keep working - Unit coverage for interaction, team harness, and applied reporting
4795ece to
3ca8ed0
Compare
Paired: GitHub #497 ↔ GitCode !2305
What type of PR is this?
/kind feature
What does this PR do / why do we need it:
Wire
send_inputso hosts can steer an active round without stealing the output lease, refuse steers after the round ends, and report what reached model context.SendInputResult/InputDispositionon everysend_inputpathSTEERwith no active round rejects (no_active_round);expected_round_idrejectsround_mismatchwhen the client races past turn endsteer.appliedwith dropped idsHosts need a truthful mid-turn path. A bare success flag hid follow-up downgrades and end-of-turn races. This contract is the dependency for the JiuwenSwarm
chat.steerPR.Which issue(s) this PR fixes:
Fixes #2748
What scenarios were tested, and what were the verification results(Function, performance, reliability, etc.):
Function
pytest tests/unit_tests/harness/test_deep_agent_interaction.py— steer queue,expected_round_id,no_active_round, undrained drop at round end (steer-related cases passed)pytest tests/unit_tests/harness/test_steering_applied.py— applied/dropped reportingtest_steer.py,test_team_harness_steer.py,test_steer_leader.pyReliability
expected_round_id→steer_queuedexpected_round_id→round_mismatch(does not fall through to follow-up)no_active_roundsteer.appliedwith emptyappliedand dropped idsContract smoke (publish install)
Performance: not a target of this change.
Security: steer does not take or replace the output lease.
Self-checklist:(Please check carefully,and mark an x in the [] brackets. We will review your completion status.)
Special notes for reviewers
SendInputResultreplaces aNonereturn fromsend_input. Hosts must readaccepted/disposition/reason.