From a666109389cd8e019b7332cd3ddd0f127ee914aa Mon Sep 17 00:00:00 2001 From: starr-openai Date: Wed, 6 May 2026 23:16:48 -0700 Subject: [PATCH] Make rollout cwd fixtures drive-stable on Windows Dev Drive setup can put temporary Codex homes on D:, which exposed test fixtures that wrote root-relative '/' rollout cwd values while assertions expected the Windows-aware C:\ root helper. Use the same test_path_buf helper when creating and expecting fake rollout cwd values so the tests remain independent of the process temp drive. Co-authored-by: Codex --- codex-rs/app-server/tests/common/rollout.rs | 5 +++-- codex-rs/app-server/tests/suite/conversation_summary.rs | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/codex-rs/app-server/tests/common/rollout.rs b/codex-rs/app-server/tests/common/rollout.rs index 6b2a9a0abe..6d65bab04f 100644 --- a/codex-rs/app-server/tests/common/rollout.rs +++ b/codex-rs/app-server/tests/common/rollout.rs @@ -8,6 +8,7 @@ use codex_protocol::protocol::SessionSource; use codex_protocol::protocol::TokenCountEvent; use codex_protocol::protocol::TokenUsage; use codex_protocol::protocol::TokenUsageInfo; +use core_test_support::test_path_buf; use serde_json::json; use std::fs; use std::fs::FileTimes; @@ -134,7 +135,7 @@ pub fn create_fake_rollout_with_source( id: conversation_id, forked_from_id: None, timestamp: meta_rfc3339.to_string(), - cwd: PathBuf::from("/"), + cwd: test_path_buf("/"), originator: "codex".to_string(), cli_version: "0.0.0".to_string(), source, @@ -218,7 +219,7 @@ pub fn create_fake_rollout_with_text_elements( id: conversation_id, forked_from_id: None, timestamp: meta_rfc3339.to_string(), - cwd: PathBuf::from("/"), + cwd: test_path_buf("/"), originator: "codex".to_string(), cli_version: "0.0.0".to_string(), source: SessionSource::Cli, diff --git a/codex-rs/app-server/tests/suite/conversation_summary.rs b/codex-rs/app-server/tests/suite/conversation_summary.rs index c06ff8599a..f8acc46bc5 100644 --- a/codex-rs/app-server/tests/suite/conversation_summary.rs +++ b/codex-rs/app-server/tests/suite/conversation_summary.rs @@ -2,6 +2,7 @@ use anyhow::Result; use app_test_support::McpProcess; use app_test_support::create_fake_rollout; use app_test_support::rollout_path; +use app_test_support::test_path_buf; use app_test_support::to_response; use codex_app_server::in_process; use codex_app_server::in_process::InProcessStartArgs; @@ -56,7 +57,7 @@ fn expected_summary(conversation_id: ThreadId, path: PathBuf) -> ConversationSum timestamp: Some(CREATED_AT_RFC3339.to_string()), updated_at: Some(UPDATED_AT_RFC3339.to_string()), model_provider: MODEL_PROVIDER.to_string(), - cwd: PathBuf::from("/"), + cwd: test_path_buf("/"), cli_version: "0.0.0".to_string(), source: SessionSource::Cli, git_info: None,