huskies: merge 997

This commit is contained in:
dave
2026-05-14 11:01:06 +00:00
parent 0572af2193
commit c7a7cb4281
40 changed files with 256 additions and 253 deletions
+25
View File
@@ -55,6 +55,7 @@ fn happy_path_with_qa() {
let s = Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
};
let s = transition(s, PipelineEvent::GatesStarted).unwrap();
assert!(matches!(s, Stage::Qa));
@@ -75,6 +76,7 @@ fn qa_retry_loop() {
let s = Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
};
let s = transition(s, PipelineEvent::GatesStarted).unwrap();
assert!(matches!(s, Stage::Qa));
@@ -164,6 +166,7 @@ fn cannot_accept_from_coding() {
Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
PipelineEvent::Accepted,
);
@@ -182,6 +185,7 @@ fn block_from_any_active_stage() {
Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
Stage::Qa,
] {
@@ -198,6 +202,7 @@ fn block_from_any_active_stage() {
feature_branch: fb("f"),
commits_ahead: nz(1),
claim: None,
retries: 0,
};
let result = transition(
m,
@@ -274,6 +279,7 @@ fn abandon_from_any_active_or_done() {
Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
Stage::Qa,
Stage::Done {
@@ -293,6 +299,7 @@ fn supersede_from_any_active_or_done() {
Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
Stage::Qa,
Stage::Done {
@@ -322,6 +329,7 @@ fn review_hold_from_active_stages() {
Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
Stage::Qa,
] {
@@ -350,6 +358,7 @@ fn merge_failed_final() {
feature_branch: fb("f"),
commits_ahead: nz(1),
claim: None,
retries: 0,
};
let result = transition(
s,
@@ -373,6 +382,7 @@ fn merge_failed_only_from_merge() {
Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
PipelineEvent::MergeFailedFinal {
reason: "conflicts".into(),
@@ -451,6 +461,7 @@ fn bug_502_agent_not_in_stage() {
feature_branch: BranchName("feature/story-1".into()),
commits_ahead: NonZeroU32::new(3).unwrap(),
claim: None,
retries: 0,
};
// Stage::Merge has exactly two fields: feature_branch and commits_ahead.
// There is no way to attach an agent name to it. The type system
@@ -523,6 +534,7 @@ fn reject_from_active_stages() {
Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
Stage::Qa,
] {
@@ -539,6 +551,7 @@ fn reject_from_active_stages() {
feature_branch: fb("f"),
commits_ahead: nz(1),
claim: None,
retries: 0,
};
let result = transition(
m,
@@ -931,6 +944,7 @@ fn merge_aborted_returns_to_coding() {
feature_branch: fb("feature/story-73"),
commits_ahead: nz(2),
claim: None,
retries: 0,
};
let result = transition(s, PipelineEvent::MergeAborted).unwrap();
assert!(
@@ -1034,12 +1048,14 @@ fn hotfix_requested_rejected_from_non_done_stages() {
Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
Stage::Qa,
Stage::Merge {
feature_branch: fb("feature/story-1"),
commits_ahead: nz(1),
claim: None,
retries: 0,
},
] {
let result = transition(stage.clone(), PipelineEvent::HotfixRequested);
@@ -1064,6 +1080,7 @@ fn audit_entry_backlog_to_coding_exact_format() {
after: Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
event: PipelineEvent::DepsMet,
at,
@@ -1083,6 +1100,7 @@ fn audit_entry_is_single_line_with_all_fields() {
feature_branch: fb("feature/story-42"),
commits_ahead: nz(3),
claim: None,
retries: 0,
},
event: PipelineEvent::GatesPassed {
feature_branch: fb("feature/story-42"),
@@ -1120,6 +1138,7 @@ fn audit_entry_merge_to_done() {
feature_branch: fb("f"),
commits_ahead: nz(1),
claim: None,
retries: 0,
},
after: Stage::Done {
merged_at: chrono::Utc::now(),
@@ -1167,6 +1186,7 @@ fn audit_entry_coding_to_blocked() {
before: Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
after: Stage::Blocked {
reason: "waiting".into(),
@@ -1192,6 +1212,7 @@ fn audit_entry_blocked_to_coding() {
after: Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
event: PipelineEvent::Unblock,
at: chrono::Utc::now(),
@@ -1210,6 +1231,7 @@ fn audit_entry_merge_to_merge_failure() {
feature_branch: fb("f"),
commits_ahead: nz(1),
claim: None,
retries: 0,
},
after: Stage::MergeFailure {
kind: MergeFailureKind::Other("conflicts".into()),
@@ -1234,11 +1256,13 @@ fn audit_entry_coding_to_frozen() {
before: Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
after: Stage::Frozen {
resume_to: Box::new(Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
}),
},
event: PipelineEvent::Freeze,
@@ -1257,6 +1281,7 @@ fn audit_entry_coding_to_abandoned() {
before: Stage::Coding {
claim: None,
plan: PlanState::Missing,
retries: 0,
},
after: Stage::Abandoned {
ts: chrono::Utc::now(),