huskies: merge 759
This commit is contained in:
@@ -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())?;
|
||||
|
||||
Reference in New Issue
Block a user