fix: add --all to cargo fmt in script/test and autoformat codebase

cargo fmt without --all fails with "Failed to find targets" in
workspace repos. This was blocking every story's gates. Also ran
cargo fmt --all to fix all existing formatting issues.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
dave
2026-04-13 14:07:08 +00:00
parent ed2526ce41
commit 845b85e7a7
128 changed files with 3566 additions and 2395 deletions
+27 -16
View File
@@ -65,7 +65,6 @@ impl WorkflowState {
Ok(())
}
}
fn summarize_results(results: &StoryTestResults) -> TestRunSummary {
@@ -144,13 +143,14 @@ pub fn evaluate_acceptance_with_coverage(
));
}
if let Some(baseline) = report.baseline_percent
&& report.current_percent < baseline {
decision.can_accept = false;
decision.reasons.push(format!(
"Coverage regression: {:.1}% → {:.1}% (threshold: {:.1}%).",
baseline, report.current_percent, report.threshold_percent
));
}
&& report.current_percent < baseline
{
decision.can_accept = false;
decision.reasons.push(format!(
"Coverage regression: {:.1}% → {:.1}% (threshold: {:.1}%).",
baseline, report.current_percent, report.threshold_percent
));
}
}
decision
@@ -185,7 +185,12 @@ mod tests {
let decision = evaluate_acceptance_with_coverage(&results, Some(&coverage));
assert!(!decision.can_accept);
assert!(decision.reasons.iter().any(|r| r.contains("Coverage below threshold")));
assert!(
decision
.reasons
.iter()
.any(|r| r.contains("Coverage below threshold"))
);
}
#[test]
@@ -211,7 +216,12 @@ mod tests {
let decision = evaluate_acceptance_with_coverage(&results, Some(&coverage));
assert!(!decision.can_accept);
assert!(decision.reasons.iter().any(|r| r.contains("Coverage regression")));
assert!(
decision
.reasons
.iter()
.any(|r| r.contains("Coverage regression"))
);
}
#[test]
@@ -317,7 +327,12 @@ mod tests {
let results = StoryTestResults::default();
let decision = evaluate_acceptance(&results);
assert!(!decision.can_accept);
assert!(decision.reasons.iter().any(|r| r.contains("No test results")));
assert!(
decision
.reasons
.iter()
.any(|r| r.contains("No test results"))
);
}
#[test]
@@ -386,11 +401,7 @@ mod tests {
details: None,
}];
let result = state.record_test_results_validated(
"story-29".to_string(),
unit,
integration,
);
let result = state.record_test_results_validated("story-29".to_string(), unit, integration);
assert!(result.is_ok());
assert!(state.results.contains_key("story-29"));
assert_eq!(state.results["story-29"].unit.len(), 1);