huskies: merge 974

This commit is contained in:
dave
2026-05-13 14:21:49 +00:00
parent 7854fbd78a
commit e5d2465f66
3 changed files with 102 additions and 0 deletions
+36
View File
@@ -993,4 +993,40 @@ fn move_story_merge_to_current_succeeds() {
);
}
// ── Story 974: Done → Coding (hotfix) ─────────────────────────────
#[test]
fn hotfix_requested_from_done_lands_in_coding() {
let done = Stage::Done {
merged_at: chrono::Utc::now(),
merge_commit: sha("abc123"),
};
let result = transition(done, PipelineEvent::HotfixRequested).unwrap();
assert!(
matches!(result, Stage::Coding),
"Done + HotfixRequested must land in Coding; got: {:?}",
result
);
}
#[test]
fn hotfix_requested_rejected_from_non_done_stages() {
for stage in [
Stage::Backlog,
Stage::Coding,
Stage::Qa,
Stage::Merge {
feature_branch: fb("feature/story-1"),
commits_ahead: nz(1),
},
] {
let result = transition(stage.clone(), PipelineEvent::HotfixRequested);
assert!(
result.is_err(),
"HotfixRequested must be rejected from {:?}",
stage
);
}
}
// ── ProjectionError Display ─────────────────────────────────────────