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
+16 -21
View File
@@ -61,9 +61,10 @@ pub async fn agent_stream(
.header("Content-Type", "text/event-stream")
.header("Cache-Control", "no-cache")
.header("Connection", "keep-alive")
.body(Body::from_bytes_stream(
futures::StreamExt::map(stream, |r| r.map(bytes::Bytes::from)),
))
.body(Body::from_bytes_stream(futures::StreamExt::map(
stream,
|r| r.map(bytes::Bytes::from),
)))
}
#[cfg(test)]
@@ -77,10 +78,7 @@ mod tests {
fn test_app(ctx: Arc<AppContext>) -> impl poem::Endpoint {
Route::new()
.at(
"/agents/:story_id/:agent_name/stream",
get(agent_stream),
)
.at("/agents/:story_id/:agent_name/stream", get(agent_stream))
.data(ctx)
}
@@ -123,10 +121,7 @@ mod tests {
});
let cli = poem::test::TestClient::new(test_app(ctx));
let resp = cli
.get("/agents/1_story/coder-1/stream")
.send()
.await;
let resp = cli.get("/agents/1_story/coder-1/stream").send().await;
let body = resp.0.into_body().into_string().await.unwrap();
@@ -178,15 +173,18 @@ mod tests {
});
let cli = poem::test::TestClient::new(test_app(ctx));
let resp = cli
.get("/agents/2_story/coder-1/stream")
.send()
.await;
let resp = cli.get("/agents/2_story/coder-1/stream").send().await;
let body = resp.0.into_body().into_string().await.unwrap();
assert!(body.contains("step 1 output"), "Output must be forwarded: {body}");
assert!(body.contains("\"type\":\"done\""), "Done event must be forwarded: {body}");
assert!(
body.contains("step 1 output"),
"Output must be forwarded: {body}"
);
assert!(
body.contains("\"type\":\"done\""),
"Done event must be forwarded: {body}"
);
}
#[tokio::test]
@@ -195,10 +193,7 @@ mod tests {
let ctx = Arc::new(AppContext::new_test(tmp.path().to_path_buf()));
let cli = poem::test::TestClient::new(test_app(ctx));
let resp = cli
.get("/agents/nonexistent/coder-1/stream")
.send()
.await;
let resp = cli.get("/agents/nonexistent/coder-1/stream").send().await;
assert_eq!(
resp.0.status(),