From 6b8a93a9e96c939b41cc8f03c76ee5f50bca2ce4 Mon Sep 17 00:00:00 2001 From: Eric Moore Date: Fri, 4 Sep 2026 21:31:06 -0500 Subject: [PATCH] The node-alias scan compares forward-slash paths, so its own file is not "foreign" on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `the_node_alias_literal_exists_exactly_once_in_the_tree` exempts this file by `starts_with("src/key_convention.rs")`, and on Windows the scanned path renders as `src\key_convention.rs` — so the file's own two sites counted as foreign and the assertion fired. main's `clippy + test (windows-latest)` has been red on every run since the test landed in e46c45f (0.5.196), and the PR lane is ubuntu-only, so no PR ever saw it. The #517 class: a path bug in the gate itself. Paths are normalised to forward slashes before the exemption is applied. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01QVZ3v83uX8noLxXr7d7pu9 --- src/key_convention.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/key_convention.rs b/src/key_convention.rs index 004ddc90..4858751e 100644 --- a/src/key_convention.rs +++ b/src/key_convention.rs @@ -293,7 +293,14 @@ mod tests { if line.contains(&format!("\"{NODE_ALIAS}\"")) && !line.trim_start().starts_with("//") { - hits.push(format!("{}:{}", path.display(), n + 1)); + // Forward slashes on every OS: the exemption below is + // spelled `src/key_convention.rs`, and Windows renders + // this path as `src\key_convention.rs`, which made this + // file's OWN two sites read as foreign and main's + // Windows lane red on every run since the test landed + // (the #517 class — a path bug in the gate itself). + let shown = path.display().to_string().replace('\\', "/"); + hits.push(format!("{shown}:{}", n + 1)); } } }