huskies: merge 986

This commit is contained in:
dave
2026-05-13 15:57:24 +00:00
parent 91fbad568a
commit 430079ecbc
13 changed files with 377 additions and 81 deletions
+15 -11
View File
@@ -590,23 +590,27 @@ async fn merge_agent_work_zero_commits_ahead_stays_in_merge_stage() {
let pool = Arc::new(AgentPool::new_test(3001));
let job = run_merge_to_completion(&pool, repo, "675_zero_commits").await;
// The job must have failed with a "no commits to merge" error.
// The job must have completed with success=false and no_commits=true.
// Since story 986 the "no commits" path returns Ok(result) not Err, so the
// job status is Completed (not Failed).
match &job.status {
MergeJobStatus::Failed(e) => {
MergeJobStatus::Completed(report) => {
assert!(
e.contains("no commits to merge"),
"error must contain 'no commits to merge', got: {e}"
!report.success,
"merge must not have succeeded when feature branch is empty"
);
assert!(
e.contains("675_zero_commits"),
"error must name the story_id, got: {e}"
report.no_commits,
"report.no_commits must be true for a zero-ahead branch"
);
assert!(
report.gate_output.contains("no commits to merge"),
"gate_output must contain 'no commits to merge', got: {}",
report.gate_output
);
}
MergeJobStatus::Completed(report) => {
panic!(
"expected Failed status, got Completed with success={}: {}",
report.success, report.gate_output
);
MergeJobStatus::Failed(e) => {
panic!("expected Completed(success=false) status, got Failed: {e}");
}
MergeJobStatus::Running => panic!("should not still be running"),
}