huskies: merge 1008

This commit is contained in:
dave
2026-05-14 08:41:49 +00:00
parent 761b6934f1
commit ebf58ef224
9 changed files with 170 additions and 2 deletions
@@ -268,6 +268,20 @@ impl AgentPool {
}
}
// AC1 (bug 1008): Before writing "completed" to the CRDT (which
// unblocks the mergemaster agent's get_merge_status poll), record
// that the merge succeeded. The exit handler in spawn.rs reads
// this flag/key to skip the transient-respawn logic for a clean
// successful exit. Must happen BEFORE the CRDT write below so the
// flag is always present when the agent sees "completed" and exits.
if success
&& let Ok(ref r) = report
&& r.story_archived
{
pool.set_merge_success_reported(&sid);
crate::db::write_content(crate::db::ContentKey::MergeSuccess(&sid), "1");
}
// Update CRDT with terminal status.
match &report {
Ok(r) => {