huskies: merge 1178 bug MergeFailureFinal is a trap state: successful re-merge cannot mark the story done

This commit is contained in:
Huskies Agent
2026-07-16 14:19:55 +00:00
parent 61acf98909
commit e5df6232cf
6 changed files with 226 additions and 34 deletions
+11
View File
@@ -210,6 +210,17 @@ pub fn transition(state: Stage, event: PipelineEvent) -> Result<Stage, Transitio
merge_commit: GitSha("manual".to_string()),
}),
// ── MergeFailureFinal → Done (successful re-merge) ──────────────
// Story 1178: MergeFailureFinal was a trap state — even when a later
// re-merge attempt actually succeeded (squash commit landed, gates
// passed), there was no transition out of MergeFailureFinal into
// Done, so `move_story_to_done` always failed for these stories.
// Mirrors the `MergeFailure -> Done` arm above.
(MergeFailureFinal { .. }, Accepted) => Ok(Done {
merged_at: now,
merge_commit: GitSha("manual".to_string()),
}),
// ── Block: any active → Blocked ──────────────────────────────
(Backlog, Block { reason })
| (Coding { .. }, Block { reason })