huskies: merge 973

This commit is contained in:
dave
2026-05-13 14:02:16 +00:00
parent e9a7468d8a
commit 4b18c01835
4 changed files with 117 additions and 0 deletions
@@ -111,6 +111,18 @@ impl AgentPool {
tokio::spawn(async move {
let report = pool.run_merge_pipeline(&root, &sid).await;
// Story 973: if the story was aborted (Merge → Coding) while the git
// operation was running, skip state-machine transitions and watcher
// notifications — they would reference the wrong stage.
if let Some(job) = crate::crdt_state::read_merge_job(&sid)
&& job.status == "cancelled"
{
crate::crdt_state::delete_merge_job(&sid);
pool.auto_assign_available_work(&root).await;
return;
}
let success = matches!(&report, Ok(r) if r.success);
let finished_at = unix_now();