huskies: merge 1009

This commit is contained in:
dave
2026-05-13 22:50:13 +00:00
parent a5cd3a2152
commit 4e007bb770
56 changed files with 453 additions and 384 deletions
+8 -8
View File
@@ -122,7 +122,7 @@ pub fn move_story_to_done(story_id: &str) -> Result<(), String> {
merge_commit: GitSha("accepted".to_string()),
},
Stage::MergeFailure { .. } => PipelineEvent::Accepted,
Stage::Coding | Stage::Qa | Stage::Backlog => PipelineEvent::Close,
Stage::Coding { .. } | Stage::Qa | Stage::Backlog => PipelineEvent::Close,
_ => {
return Err(format!(
"Work item '{story_id}' is in {} — cannot move to done.",
@@ -160,7 +160,7 @@ pub fn move_story_to_merge(story_id: &str) -> Result<(), String> {
let commits = NonZeroU32::new(1).expect("1 is non-zero");
let event = match &item.stage {
Stage::Coding => PipelineEvent::QaSkipped {
Stage::Coding { .. } => PipelineEvent::QaSkipped {
feature_branch: branch,
commits_ahead: commits,
},
@@ -383,8 +383,8 @@ fn map_stage_move_to_event(
match (from, target) {
(Stage::Upcoming, "backlog") => Ok(PipelineEvent::Triage),
(Stage::Backlog, "current") => Ok(PipelineEvent::DepsMet),
(Stage::Coding, "qa") => Ok(PipelineEvent::GatesStarted),
(Stage::Coding, "merge") => Ok(PipelineEvent::QaSkipped {
(Stage::Coding { .. }, "qa") => Ok(PipelineEvent::GatesStarted),
(Stage::Coding { .. }, "merge") => Ok(PipelineEvent::QaSkipped {
feature_branch: branch(),
commits_ahead: nz1(),
}),
@@ -392,7 +392,7 @@ fn map_stage_move_to_event(
feature_branch: branch(),
commits_ahead: nz1(),
}),
(Stage::Coding, "backlog")
(Stage::Coding { .. }, "backlog")
| (Stage::Qa, "backlog")
| (Stage::Merge { .. }, "backlog")
| (Stage::Blocked { .. }, "backlog") => Ok(PipelineEvent::Demote),
@@ -402,7 +402,7 @@ fn map_stage_move_to_event(
(Stage::Merge { .. }, "done") => Ok(PipelineEvent::MergeSucceeded {
merge_commit: GitSha("manual".to_string()),
}),
(Stage::Coding | Stage::Qa | Stage::Backlog, "done") => Ok(PipelineEvent::Close),
(Stage::Coding { .. } | Stage::Qa | Stage::Backlog, "done") => Ok(PipelineEvent::Close),
(Stage::Blocked { .. }, "current") => Ok(PipelineEvent::Unblock),
// Story 919: MergeFailure + Unblock goes to Merge (re-attempt); manual
// demotion to backlog uses Demote to park it without a retry.
@@ -530,7 +530,7 @@ fn stage_to_name(s: &Stage) -> &'static str {
match s {
Stage::Upcoming => "upcoming",
Stage::Backlog => "backlog",
Stage::Coding => "current",
Stage::Coding { .. } => "current",
Stage::Blocked { .. } => "blocked",
Stage::Qa => "qa",
Stage::Merge { .. } => "merge",
@@ -714,7 +714,7 @@ mod tests {
"should return to coding after unblock"
);
assert!(
matches!(item.stage, Stage::Coding),
matches!(item.stage, Stage::Coding { .. }),
"stage should be Stage::Coding after unblock"
);
}