Converted all external tool calling to async
This commit is contained in:
@@ -104,7 +104,7 @@ async fn mergemaster_blocks_and_sends_story_blocked_when_no_commits_ahead() {
|
||||
);
|
||||
|
||||
// No mergemaster agent should have been started.
|
||||
let agents = pool.agents.lock().unwrap();
|
||||
let agents = pool.agents.try_lock().unwrap();
|
||||
let mergemaster_started = agents
|
||||
.values()
|
||||
.any(|a| a.agent_name.contains("mergemaster"));
|
||||
@@ -162,7 +162,7 @@ stage = "qa"
|
||||
|
||||
// Verify that 293 cannot get a QA agent right now (QA is busy).
|
||||
{
|
||||
let agents = pool.agents.lock().unwrap();
|
||||
let agents = pool.agents.try_lock().unwrap();
|
||||
assert!(
|
||||
!is_agent_free(&agents, "qa"),
|
||||
"qa should be busy on story 292"
|
||||
@@ -172,7 +172,7 @@ stage = "qa"
|
||||
// Simulate QA completing on story 292: remove the agent from the pool
|
||||
// (as run_server_owned_completion does) then run pipeline advance.
|
||||
{
|
||||
let mut agents = pool.agents.lock().unwrap();
|
||||
let mut agents = pool.agents.try_lock().unwrap();
|
||||
agents.remove(&composite_key("292_story_first", "qa"));
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ stage = "qa"
|
||||
.await;
|
||||
|
||||
// After pipeline advance, auto_assign should have started QA on story 293.
|
||||
let agents = pool.agents.lock().unwrap();
|
||||
let agents = pool.agents.try_lock().unwrap();
|
||||
let qa_on_293 = agents.values().any(|a| {
|
||||
a.agent_name == "qa" && matches!(a.status, AgentStatus::Pending | AgentStatus::Running)
|
||||
});
|
||||
@@ -278,7 +278,7 @@ async fn stale_mergemaster_advance_for_done_story_is_noop() {
|
||||
.await;
|
||||
|
||||
// No agents should have been started.
|
||||
let agents = pool.agents.lock().unwrap();
|
||||
let agents = pool.agents.try_lock().unwrap();
|
||||
assert!(
|
||||
agents.is_empty(),
|
||||
"No agents should be started for a stale advance on a done story. \
|
||||
@@ -871,7 +871,7 @@ stage = "coder"
|
||||
.await;
|
||||
|
||||
// The coder must be re-spawned — Pending or Running.
|
||||
let agents = pool.agents.lock().unwrap();
|
||||
let agents = pool.agents.try_lock().unwrap();
|
||||
let coder_restarted = agents.values().any(|a| {
|
||||
a.agent_name == "coder-1" && matches!(a.status, AgentStatus::Pending | AgentStatus::Running)
|
||||
});
|
||||
@@ -957,7 +957,7 @@ stage = "coder"
|
||||
.await;
|
||||
|
||||
// The recovery respawn must have been issued — coder-1 should be Pending/Running.
|
||||
let agents = pool.agents.lock().unwrap();
|
||||
let agents = pool.agents.try_lock().unwrap();
|
||||
let coder_restarted = agents.values().any(|a| {
|
||||
a.agent_name == "coder-1" && matches!(a.status, AgentStatus::Pending | AgentStatus::Running)
|
||||
});
|
||||
@@ -1328,7 +1328,7 @@ async fn coder_completion_with_test_evidence_and_zero_commits_does_not_advance()
|
||||
);
|
||||
|
||||
// No QA or merge agent should have been started.
|
||||
let agents = pool.agents.lock().unwrap();
|
||||
let agents = pool.agents.try_lock().unwrap();
|
||||
let qa_or_merge_started = agents
|
||||
.values()
|
||||
.any(|a| a.agent_name.contains("qa") || a.agent_name.contains("merge"));
|
||||
|
||||
Reference in New Issue
Block a user