huskies: merge 891
This commit is contained in:
@@ -274,9 +274,10 @@ max_turns = 10
|
||||
let item = crate::crdt_state::read_item(story_id)
|
||||
.expect("story must be in CRDT after watchdog termination");
|
||||
assert_eq!(
|
||||
item.stage, "2_blocked",
|
||||
item.stage_str(),
|
||||
"2_blocked",
|
||||
"story stage must be 2_blocked after limit termination with max_retries=1 — got: {}",
|
||||
item.stage
|
||||
item.stage_str()
|
||||
);
|
||||
|
||||
// Sanity: the agent itself is also Failed with the right reason.
|
||||
@@ -415,7 +416,8 @@ max_turns = 10
|
||||
let item = crate::crdt_state::read_item(story_id)
|
||||
.expect("story must be in CRDT after per-session overrun");
|
||||
assert_eq!(
|
||||
item.stage, "2_blocked",
|
||||
item.stage_str(),
|
||||
"2_blocked",
|
||||
"story stage must be 2_blocked after per-session overrun with max_retries=1"
|
||||
);
|
||||
}
|
||||
@@ -471,12 +473,12 @@ max_turns = 10
|
||||
|
||||
let item = crate::crdt_state::read_item(story_id).expect("story must be in CRDT");
|
||||
assert_eq!(
|
||||
item.retry_count,
|
||||
Some(1),
|
||||
item.retry_count(),
|
||||
1,
|
||||
"after session 1, retry_count should be 1 in CRDT"
|
||||
);
|
||||
assert_ne!(
|
||||
item.stage.as_str(),
|
||||
item.stage_str(),
|
||||
"2_blocked",
|
||||
"story should NOT be blocked after session 1"
|
||||
);
|
||||
@@ -491,12 +493,12 @@ max_turns = 10
|
||||
|
||||
let item = crate::crdt_state::read_item(story_id).expect("story must be in CRDT");
|
||||
assert_eq!(
|
||||
item.retry_count,
|
||||
Some(2),
|
||||
item.retry_count(),
|
||||
2,
|
||||
"after session 2, retry_count should be 2 in CRDT"
|
||||
);
|
||||
assert_ne!(
|
||||
item.stage.as_str(),
|
||||
item.stage_str(),
|
||||
"2_blocked",
|
||||
"story should NOT be blocked after session 2"
|
||||
);
|
||||
@@ -511,15 +513,16 @@ max_turns = 10
|
||||
|
||||
let item = crate::crdt_state::read_item(story_id).expect("story must be in CRDT");
|
||||
assert_eq!(
|
||||
item.stage, "2_blocked",
|
||||
item.stage_str(),
|
||||
"2_blocked",
|
||||
"story must be blocked after session 3 (retry_count=3 >= max_retries=3) — got: {}",
|
||||
item.stage
|
||||
item.stage_str()
|
||||
);
|
||||
// retry_count resets to 0 on stage transition (Bug 780) — the fact
|
||||
// that the story reached 2_blocked proves the retry limit was hit.
|
||||
assert_eq!(
|
||||
item.retry_count,
|
||||
Some(0),
|
||||
item.retry_count(),
|
||||
0,
|
||||
"retry_count should reset to 0 after stage transition to blocked"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user