From ce9347388a0d417ef86ab00a5111f9221abed990 Mon Sep 17 00:00:00 2001 From: jif-oai Date: Fri, 17 Oct 2025 17:58:37 +0200 Subject: [PATCH] Fix tests --- codex-rs/codex-infty/src/roles/solver.rs | 10 +++------- codex-rs/codex-infty/tests/orchestrator.rs | 13 +++++++------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/codex-rs/codex-infty/src/roles/solver.rs b/codex-rs/codex-infty/src/roles/solver.rs index bfd3079315..0864a2fdf6 100644 --- a/codex-rs/codex-infty/src/roles/solver.rs +++ b/codex-rs/codex-infty/src/roles/solver.rs @@ -101,13 +101,9 @@ impl SolverRole { .await?; // Allow more time for the solver to start emitting the // finalization signal before timing out as "idle". - let _ = session::await_first_idle( - self.hub.as_ref(), - &handle, - Duration::from_secs(120), - None, - ) - .await?; + let _ = + session::await_first_idle(self.hub.as_ref(), &handle, Duration::from_secs(120), None) + .await?; Ok(()) } } diff --git a/codex-rs/codex-infty/tests/orchestrator.rs b/codex-rs/codex-infty/tests/orchestrator.rs index 539c173e62..06b925cef4 100644 --- a/codex-rs/codex-infty/tests/orchestrator.rs +++ b/codex-rs/codex-infty/tests/orchestrator.rs @@ -97,7 +97,7 @@ async fn orchestrator_routes_between_roles_and_records_store() -> anyhow::Result .as_str() .expect("request should set instructions"); assert!( - instructions.contains("Codex Infty Solver"), + instructions.contains("brilliant mathematician"), "missing solver prompt: {instructions}" ); assert!(sessions.store.path().is_dir()); @@ -134,15 +134,11 @@ async fn execute_new_run_drives_to_completion() -> anyhow::Result<()> { responses::sse(vec![ responses::ev_response_created("solver-resp-2"), responses::ev_assistant_message("solver-msg-2", "Acknowledged"), - responses::ev_completed("solver-resp-2"), - ]), - responses::sse(vec![ - responses::ev_response_created("solver-resp-4"), responses::ev_assistant_message( "solver-msg-4", r#"{"type":"final_delivery","prompt":null,"claim_path":null,"notes":null,"deliverable_path":"deliverable","summary":"done"}"#, ), - responses::ev_completed("solver-resp-4"), + responses::ev_completed("solver-resp-2"), ]), // Final verification of the deliverable responses::sse(vec![ @@ -153,6 +149,11 @@ async fn execute_new_run_drives_to_completion() -> anyhow::Result<()> { ), responses::ev_completed("verifier-resp-3"), ]), + // Feedback turn summarizing the verification outcome back to the solver + responses::sse(vec![ + responses::ev_response_created("solver-resp-5"), + responses::ev_completed("solver-resp-5"), + ]), ]; for body in bodies { responses::mount_sse_once(&server, body).await;