From 4473690d54e57159a1e99c8d3d9b5ece63efbf28 Mon Sep 17 00:00:00 2001 From: starr-openai Date: Tue, 12 May 2026 17:39:45 -0700 Subject: [PATCH] codex: fix CI failure on PR #22199 Co-authored-by: Codex --- codex-rs/tui/src/chatwidget/tests/helpers.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/codex-rs/tui/src/chatwidget/tests/helpers.rs b/codex-rs/tui/src/chatwidget/tests/helpers.rs index 855334156c..a1c41a8ebf 100644 --- a/codex-rs/tui/src/chatwidget/tests/helpers.rs +++ b/codex-rs/tui/src/chatwidget/tests/helpers.rs @@ -60,7 +60,18 @@ pub(super) fn normalize_snapshot_paths(text: impl Into) -> String { .expect("test project path registry") .iter() { - text = text.replace(isolated_project.to_string_lossy().as_ref(), "/tmp/project"); + let isolated_project = isolated_project.to_string_lossy(); + text = text.replace(isolated_project.as_ref(), "/tmp/project"); + for isolated_prefix in truncated_path_variants(isolated_project.as_ref()) + .into_iter() + .rev() + { + let unix_prefix: String = "/tmp/project" + .chars() + .take(isolated_prefix.chars().count()) + .collect(); + text = text.replace(&format!("{isolated_prefix}…"), &format!("{unix_prefix}…")); + } } for unix_path in ["/tmp/project", "/tmp/hooks.json"] {