huskies: merge 759

This commit is contained in:
dave
2026-04-28 00:02:33 +00:00
parent 9b24c2e281
commit 63ce7b9ec3
3 changed files with 42 additions and 14 deletions
+13
View File
@@ -30,6 +30,19 @@ impl AgentPool {
.collect())
}
/// Return story IDs of merge jobs currently in the `Running` state.
///
/// Used by `list_agents` and `get_pipeline_status` to surface in-flight
/// deterministic merges that hold the merge lock but have no agent entry.
pub fn list_running_merges(&self) -> Result<Vec<String>, String> {
let jobs = self.merge_jobs.lock().map_err(|e| e.to_string())?;
Ok(jobs
.values()
.filter(|job| matches!(job.status, crate::agents::merge::MergeJobStatus::Running))
.map(|job| job.story_id.clone())
.collect())
}
/// List all agents with their status.
pub fn list_agents(&self) -> Result<Vec<AgentInfo>, String> {
let agents = self.agents.lock().map_err(|e| e.to_string())?;