diff --git a/codex-rs/analytics/src/analytics_client_tests.rs b/codex-rs/analytics/src/analytics_client_tests.rs index 5b456414aa..710b4962a8 100644 --- a/codex-rs/analytics/src/analytics_client_tests.rs +++ b/codex-rs/analytics/src/analytics_client_tests.rs @@ -256,7 +256,7 @@ async fn ingest_turn_prerequisites( AnalyticsFact::Request { connection_id: 7, request_id: RequestId::Integer(3), - request: Box::new(sample_turn_start_request("thread-2", 3)), + request: Box::new(sample_turn_start_request("thread-2", /*request_id*/ 3)), }, out, ) @@ -265,7 +265,7 @@ async fn ingest_turn_prerequisites( .ingest( AnalyticsFact::Response { connection_id: 7, - response: Box::new(sample_turn_start_response("turn-2", 3)), + response: Box::new(sample_turn_start_response("turn-2", /*request_id*/ 3)), }, out, ) @@ -965,7 +965,7 @@ async fn turn_lifecycle_emits_turn_event() { "thread-2", "turn-2", AppServerTurnStatus::Completed, - None, + /*codex_error_info*/ None, ))), &mut out, ) @@ -992,14 +992,21 @@ async fn turn_does_not_emit_without_required_prerequisites() { let mut reducer = AnalyticsReducer::default(); let mut out = Vec::new(); - ingest_turn_prerequisites(&mut reducer, &mut out, false, true, false).await; + ingest_turn_prerequisites( + &mut reducer, + &mut out, + /*include_initialize*/ false, + /*include_resolved_config*/ true, + /*include_started*/ false, + ) + .await; reducer .ingest( AnalyticsFact::Notification(Box::new(sample_turn_completed_notification( "thread-2", "turn-2", AppServerTurnStatus::Completed, - None, + /*codex_error_info*/ None, ))), &mut out, ) @@ -1014,14 +1021,21 @@ async fn turn_does_not_emit_without_required_prerequisites() { let mut reducer = AnalyticsReducer::default(); let mut out = Vec::new(); - ingest_turn_prerequisites(&mut reducer, &mut out, true, false, false).await; + ingest_turn_prerequisites( + &mut reducer, + &mut out, + /*include_initialize*/ true, + /*include_resolved_config*/ false, + /*include_started*/ false, + ) + .await; reducer .ingest( AnalyticsFact::Notification(Box::new(sample_turn_completed_notification( "thread-2", "turn-2", AppServerTurnStatus::Completed, - None, + /*codex_error_info*/ None, ))), &mut out, ) @@ -1034,14 +1048,21 @@ async fn turn_completed_without_started_notification_emits_null_created_at() { let mut reducer = AnalyticsReducer::default(); let mut out = Vec::new(); - ingest_turn_prerequisites(&mut reducer, &mut out, true, true, false).await; + ingest_turn_prerequisites( + &mut reducer, + &mut out, + /*include_initialize*/ true, + /*include_resolved_config*/ true, + /*include_started*/ false, + ) + .await; reducer .ingest( AnalyticsFact::Notification(Box::new(sample_turn_completed_notification( "thread-2", "turn-2", AppServerTurnStatus::Completed, - None, + /*codex_error_info*/ None, ))), &mut out, ) diff --git a/codex-rs/app-server/src/bespoke_event_handling.rs b/codex-rs/app-server/src/bespoke_event_handling.rs index 165de4730e..c9a02ac2f0 100644 --- a/codex-rs/app-server/src/bespoke_event_handling.rs +++ b/codex-rs/app-server/src/bespoke_event_handling.rs @@ -3331,7 +3331,7 @@ mod tests { handle_turn_complete( conversation_id, event_turn_id.clone(), - None, + /*analytics_events_client*/ None, &outgoing, &thread_state, ) @@ -3420,7 +3420,7 @@ mod tests { handle_turn_complete( conversation_id, event_turn_id.clone(), - None, + /*analytics_events_client*/ None, &outgoing, &thread_state, ) @@ -3684,7 +3684,7 @@ mod tests { handle_turn_complete( conversation_a, a_turn1.clone(), - None, + /*analytics_events_client*/ None, &outgoing, &thread_state, ) @@ -3705,7 +3705,7 @@ mod tests { handle_turn_complete( conversation_b, b_turn1.clone(), - None, + /*analytics_events_client*/ None, &outgoing, &thread_state, ) @@ -3716,7 +3716,7 @@ mod tests { handle_turn_complete( conversation_a, a_turn2.clone(), - None, + /*analytics_events_client*/ None, &outgoing, &thread_state, ) diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index 66381f0eaa..29a214eb36 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -9080,6 +9080,7 @@ guardian_approval = true ServerNotification::TurnStarted(TurnStartedNotification { thread_id: thread_id.to_string(), turn: test_turn(turn_id, TurnStatus::InProgress, Vec::new()), + created_at: 0, }) } diff --git a/codex-rs/tui/src/app/pending_interactive_replay.rs b/codex-rs/tui/src/app/pending_interactive_replay.rs index 63c8fe1249..408e4d0521 100644 --- a/codex-rs/tui/src/app/pending_interactive_replay.rs +++ b/codex-rs/tui/src/app/pending_interactive_replay.rs @@ -677,6 +677,8 @@ mod tests { status: TurnStatus::Completed, error: None, }, + completed_at: 0, + duration_ms: None, }) } diff --git a/codex-rs/tui/src/chatwidget/tests/app_server.rs b/codex-rs/tui/src/chatwidget/tests/app_server.rs index a9bdf90d8e..a5d1a706fd 100644 --- a/codex-rs/tui/src/chatwidget/tests/app_server.rs +++ b/codex-rs/tui/src/chatwidget/tests/app_server.rs @@ -94,6 +94,7 @@ async fn live_app_server_turn_completed_clears_working_status_after_answer_item( status: AppServerTurnStatus::InProgress, error: None, }, + created_at: 0, }), /*replay_kind*/ None, ); @@ -418,6 +419,7 @@ async fn live_app_server_failed_turn_does_not_duplicate_error_history() { status: AppServerTurnStatus::InProgress, error: None, }, + created_at: 0, }), /*replay_kind*/ None, ); @@ -476,6 +478,7 @@ async fn live_app_server_stream_recovery_restores_previous_status_header() { status: AppServerTurnStatus::InProgress, error: None, }, + created_at: 0, }), /*replay_kind*/ None, ); @@ -530,6 +533,7 @@ async fn live_app_server_server_overloaded_error_renders_warning() { status: AppServerTurnStatus::InProgress, error: None, }, + created_at: 0, }), /*replay_kind*/ None, ); diff --git a/codex-rs/tui/src/chatwidget/tests/history_replay.rs b/codex-rs/tui/src/chatwidget/tests/history_replay.rs index 58993d67e8..5fc1471f5d 100644 --- a/codex-rs/tui/src/chatwidget/tests/history_replay.rs +++ b/codex-rs/tui/src/chatwidget/tests/history_replay.rs @@ -537,6 +537,7 @@ async fn replayed_retryable_app_server_error_keeps_turn_running() { status: AppServerTurnStatus::InProgress, error: None, }, + created_at: 0, }), Some(ReplayKind::ThreadSnapshot), ); @@ -687,6 +688,7 @@ async fn live_reasoning_summary_is_not_rendered_twice_when_item_completes() { status: AppServerTurnStatus::InProgress, error: None, }, + created_at: 0, }), /*replay_kind*/ None, ); diff --git a/codex-rs/tui/src/chatwidget/tests/plan_mode.rs b/codex-rs/tui/src/chatwidget/tests/plan_mode.rs index 7540a581a1..7b2c5d8eb6 100644 --- a/codex-rs/tui/src/chatwidget/tests/plan_mode.rs +++ b/codex-rs/tui/src/chatwidget/tests/plan_mode.rs @@ -851,6 +851,7 @@ async fn submit_user_message_queues_while_compaction_turn_is_running() { status: AppServerTurnStatus::InProgress, error: None, }, + created_at: 0, }), /*replay_kind*/ None, );