hive-subagent-mcp: cover the non-goal interrupted-turn case for #4337
This commit is contained in:
parent
04a8e2b328
commit
d071c8df00
1 changed files with 13 additions and 0 deletions
|
|
@ -3870,6 +3870,7 @@ mod tests {
|
|||
StopReason::GoalReached(None),
|
||||
StopReason::NeedHelp("blocked".to_owned()),
|
||||
StopReason::TurnCap { turns: 5 },
|
||||
StopReason::Cancelled,
|
||||
] {
|
||||
let extended = turn_end_summary("n", &TurnEnd::Complete, Some(&stop));
|
||||
assert!(
|
||||
|
|
@ -4295,6 +4296,18 @@ done
|
|||
// `finish_turn` has cleared its liveness clock too.
|
||||
until("the run ends", || state.last_event_age("n").is_none()).await;
|
||||
|
||||
// This `start` had no goal, so the fake claude's clean exit after
|
||||
// SIGINT (`TurnEnd::Complete`) is exactly the case that used to
|
||||
// report "finished: turn complete" with no sign it was interrupted.
|
||||
// `plan_after_turn` checks `stop_reason` before it checks `goals`, so
|
||||
// the recorded `Cancelled` survives even here — this is the
|
||||
// non-goal case the goal-run-cancel fix left unverified.
|
||||
assert_eq!(
|
||||
state.stop_reason("n"),
|
||||
Some(StopReason::Cancelled),
|
||||
"a plain (non-goal) interrupted turn must still record why it stopped"
|
||||
);
|
||||
|
||||
assert!(
|
||||
!acp_session_file(&dir, "n").exists() && !dir.join("prompts.methods").exists(),
|
||||
"a claude agent's subagent never touches an ACP agent"
|
||||
|
|
|
|||
Loading…
Reference in a new issue