From b476213ffbcc2f37fb0f9d8f354cafe496b26f04 Mon Sep 17 00:00:00 2001 From: Jonathan Haas Date: Sun, 15 Mar 2026 10:05:59 -0700 Subject: [PATCH 1/2] fix(ci): normalize path separators in blast radius summaries path.display() uses native separators, producing backslashes on Windows. Since these paths appear in review comments (web UI), normalize to forward slashes so the output is consistent across platforms. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/review/pipeline/postprocess/blast_radius.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/review/pipeline/postprocess/blast_radius.rs b/src/review/pipeline/postprocess/blast_radius.rs index 43bb076..9ec40f8 100644 --- a/src/review/pipeline/postprocess/blast_radius.rs +++ b/src/review/pipeline/postprocess/blast_radius.rs @@ -45,7 +45,7 @@ fn format_blast_radius_summary(dependents: &[PathBuf]) -> String { let listed = dependents .iter() .take(MAX_LISTED_DEPENDENTS) - .map(|path| path.display().to_string()) + .map(|path| path.display().to_string().replace('\\', "/")) .collect::>(); let remaining = dependents.len().saturating_sub(listed.len()); From 8912a907eee64e167561b9db6269c044c6134703 Mon Sep 17 00:00:00 2001 From: Jonathan Haas Date: Sun, 15 Mar 2026 10:06:48 -0700 Subject: [PATCH 2/2] test: add unit test for backslash path normalization in blast radius Directly tests format_blast_radius_summary with Windows-style backslash paths to verify they are normalized to forward slashes. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../pipeline/postprocess/blast_radius.rs | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/review/pipeline/postprocess/blast_radius.rs b/src/review/pipeline/postprocess/blast_radius.rs index 9ec40f8..c6e2bb4 100644 --- a/src/review/pipeline/postprocess/blast_radius.rs +++ b/src/review/pipeline/postprocess/blast_radius.rs @@ -140,6 +140,35 @@ mod tests { assert!(comments[0].tags.iter().any(|tag| tag == "blast-radius:3")); } + #[test] + fn format_blast_radius_summary_normalizes_backslash_paths() { + use super::format_blast_radius_summary; + + let dependents = vec![ + PathBuf::from("src\\a.rs"), + PathBuf::from("src\\b.rs"), + PathBuf::from("src\\c.rs"), + ]; + + let summary = format_blast_radius_summary(&dependents); + assert!( + summary.contains("src/a.rs"), + "expected forward slashes in summary, got: {summary}" + ); + assert!( + summary.contains("src/b.rs"), + "expected forward slashes in summary, got: {summary}" + ); + assert!( + summary.contains("src/c.rs"), + "expected forward slashes in summary, got: {summary}" + ); + assert!( + !summary.contains('\\'), + "summary should not contain backslashes: {summary}" + ); + } + #[test] fn skips_blast_radius_summary_below_threshold() { let dir = tempfile::tempdir().unwrap();