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
+25 -37
View File
@@ -167,10 +167,9 @@ impl PipelineMachine {
// transitions forward and doesn't read them — but they're available
// to inspect via the State::Merge variant generated by the macro.
match event {
PipelineEvent::MergeSucceeded { merge_commit } => Transition(State::done(
Utc::now(),
merge_commit.clone(),
)),
PipelineEvent::MergeSucceeded { merge_commit } => {
Transition(State::done(Utc::now(), merge_commit.clone()))
}
PipelineEvent::MergeFailedFinal { reason } => Transition(State::archived(
Utc::now(),
ArchiveReason::MergeFailed {
@@ -205,9 +204,7 @@ impl PipelineMachine {
reason: reason.clone(),
},
)),
PipelineEvent::Abandon => {
Transition(State::archived(now, ArchiveReason::Abandoned))
}
PipelineEvent::Abandon => Transition(State::archived(now, ArchiveReason::Abandoned)),
PipelineEvent::Supersede { by } => Transition(State::archived(
now,
ArchiveReason::Superseded { by: by.clone() },
@@ -230,12 +227,8 @@ impl PipelineMachine {
let _ = merged_at; // currently unused; available for queries
let _ = merge_commit;
match event {
PipelineEvent::Accepted => {
Transition(State::archived(now, ArchiveReason::Completed))
}
PipelineEvent::Abandon => {
Transition(State::archived(now, ArchiveReason::Abandoned))
}
PipelineEvent::Accepted => Transition(State::archived(now, ArchiveReason::Completed)),
PipelineEvent::Abandon => Transition(State::archived(now, ArchiveReason::Abandoned)),
PipelineEvent::Supersede { by } => Transition(State::archived(
now,
ArchiveReason::Superseded { by: by.clone() },
@@ -294,10 +287,7 @@ pub mod execution {
#[derive(Default)]
pub struct ExecutionMachine;
#[state_machine(
initial = "State::idle()",
state(derive(Debug, Clone, PartialEq, Eq))
)]
#[state_machine(initial = "State::idle()", state(derive(Debug, Clone, PartialEq, Eq)))]
impl ExecutionMachine {
// ── Idle: no agent on this node is working on this story ──────────
@@ -327,11 +317,9 @@ pub mod execution {
ExecutionEvent::HitRateLimit { resume_at } => {
Transition(State::rate_limited(agent.clone(), *resume_at))
}
ExecutionEvent::Exited { exit_code } => Transition(State::completed(
agent.clone(),
*exit_code,
Utc::now(),
)),
ExecutionEvent::Exited { exit_code } => {
Transition(State::completed(agent.clone(), *exit_code, Utc::now()))
}
_ => Super,
}
}
@@ -358,11 +346,9 @@ pub mod execution {
ExecutionEvent::HitRateLimit { resume_at } => {
Transition(State::rate_limited(agent.clone(), *resume_at))
}
ExecutionEvent::Exited { exit_code } => Transition(State::completed(
agent.clone(),
*exit_code,
Utc::now(),
)),
ExecutionEvent::Exited { exit_code } => {
Transition(State::completed(agent.clone(), *exit_code, Utc::now()))
}
_ => Super,
}
}
@@ -380,11 +366,9 @@ pub mod execution {
let now = Utc::now();
Transition(State::running(agent.clone(), now, now))
}
ExecutionEvent::Exited { exit_code } => Transition(State::completed(
agent.clone(),
*exit_code,
Utc::now(),
)),
ExecutionEvent::Exited { exit_code } => {
Transition(State::completed(agent.clone(), *exit_code, Utc::now()))
}
_ => Super,
}
}
@@ -411,9 +395,7 @@ pub mod execution {
#[superstate]
fn any(event: &ExecutionEvent) -> Response<State> {
match event {
ExecutionEvent::Stopped | ExecutionEvent::Reset => {
Transition(State::idle())
}
ExecutionEvent::Stopped | ExecutionEvent::Reset => Transition(State::idle()),
_ => Handled,
}
}
@@ -677,7 +659,10 @@ mod tests {
assert!(matches!(em.state(), ExecState::Running { .. }));
em.handle(&ExecutionEvent::Exited { exit_code: 0 });
assert!(matches!(em.state(), ExecState::Completed { exit_code: 0, .. }));
assert!(matches!(
em.state(),
ExecState::Completed { exit_code: 0, .. }
));
}
#[test]
@@ -781,5 +766,8 @@ fn main() {
});
println!(" before Unblock: {:?}", sm2.state());
sm2.handle(&PipelineEvent::Unblock); // silently ignored — no transition
println!(" after Unblock: {:?} (no change — Unblock is a no-op from Done)", sm2.state());
println!(
" after Unblock: {:?} (no change — Unblock is a no-op from Done)",
sm2.state()
);
}