diff --git a/codex-rs/core/tests/responses_headers.rs b/codex-rs/core/tests/responses_headers.rs index 5b7c2c65b8..26b168820f 100644 --- a/codex-rs/core/tests/responses_headers.rs +++ b/codex-rs/core/tests/responses_headers.rs @@ -550,7 +550,10 @@ async fn responses_stream_includes_turn_metadata_header_for_git_workspace_e2e() let request_log = responses::mount_response_sequence( &server, vec![ - responses::sse_response(first_response), + // Git enrichment is intentionally asynchronous. Keep the first + // response open long enough for the follow-up request to observe + // the enriched metadata, even on slower CI hosts. + responses::sse_response(first_response).set_delay(std::time::Duration::from_secs(2)), responses::sse_response(follow_up_response), ], ) diff --git a/codex-rs/git-utils/src/safe_git_tests.rs b/codex-rs/git-utils/src/safe_git_tests.rs index a9dfe7cdb4..75dcd00d1f 100644 --- a/codex-rs/git-utils/src/safe_git_tests.rs +++ b/codex-rs/git-utils/src/safe_git_tests.rs @@ -193,9 +193,10 @@ async fn ordinary_apply_allows_an_unselected_executable_filter() { }) .expect("unused filter must not block apply"); assert_eq!(result.exit_code, 0); - assert_eq!( - std::fs::read_to_string(repo_path.join("test.txt")).expect("read result"), - "new\n" + let contents = std::fs::read_to_string(repo_path.join("test.txt")).expect("read result"); + assert!( + matches!(contents.as_str(), "new\n" | "new\r\n"), + "expected the patched contents with a platform line ending, got {contents:?}" ); }