From 5d80031172f57453516d2ad492665abc7a03d919 Mon Sep 17 00:00:00 2001 From: Eddie Chen <173840017+eddie-openai@users.noreply.github.com> Date: Thu, 24 Sep 2026 21:39:50 +0000 Subject: [PATCH] Parameterize the thread initialization analytics test by originator (#47945) GitOrigin-RevId: 0e623bfd7bcfc52fdc13ddcd66a03de96cede445 --- codex-rs/app-server/tests/suite/v2/thread_start.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/codex-rs/app-server/tests/suite/v2/thread_start.rs b/codex-rs/app-server/tests/suite/v2/thread_start.rs index 405da40168..b905b3ee09 100644 --- a/codex-rs/app-server/tests/suite/v2/thread_start.rs +++ b/codex-rs/app-server/tests/suite/v2/thread_start.rs @@ -949,8 +949,9 @@ fn normalize_path_for_comparison(path: impl AsRef) -> PathBuf { path.as_ref().to_path_buf() } +#[test_case("codex_work_desktop")] #[tokio::test] -async fn thread_start_tracks_thread_initialized_analytics() -> Result<()> { +async fn thread_start_tracks_thread_initialized_analytics(originator: &str) -> Result<()> { let server = create_mock_responses_server_repeating_assistant("Done").await; let codex_home = TempDir::new()?; @@ -966,7 +967,7 @@ async fn thread_start_tracks_thread_initialized_analytics() -> Result<()> { let ThreadStartResponse { thread, .. } = mcp .start_thread(ThreadStartParams { thread_source: Some(ThreadSource::User), - service_name: Some("codex_work_desktop".to_string()), + service_name: Some(originator.to_string()), ..Default::default() }) .await?; @@ -978,7 +979,7 @@ async fn thread_start_tracks_thread_initialized_analytics() -> Result<()> { event, &thread.id, &thread.session_id, - "codex_work_desktop", + originator, "mock-model", "new", "user",