huskies: merge 773

This commit is contained in:
dave
2026-04-28 10:19:43 +00:00
parent 83f7e41932
commit 7faacb6664
9 changed files with 167 additions and 133 deletions
+4 -4
View File
@@ -35,11 +35,11 @@ impl AgentPool {
/// 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())?;
let jobs = crate::crdt_state::read_all_merge_jobs().unwrap_or_default();
Ok(jobs
.values()
.filter(|job| matches!(job.status, crate::agents::merge::MergeJobStatus::Running))
.map(|job| job.story_id.clone())
.into_iter()
.filter(|job| job.status == "running")
.map(|job| job.story_id)
.collect())
}