From dcc764a2a410a711ce7acf294bf01d5ed6cadb80 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 11 May 2026 06:26:14 +0000 Subject: [PATCH] fix: normalize header-scan paths to forward slashes for Windows compatibility On Windows, path.relative() produces backslash-separated paths (e.g. src\foo.h) which caused test failures when comparing against forward-slash expectations. Normalize output with .replace(/\\/g, '/') matching the convention used throughout the scope-resolution pipeline. Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/88420759-8a8c-4e6d-affa-ecb5458a235a Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com> --- gitnexus/src/core/ingestion/languages/c/header-scan.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gitnexus/src/core/ingestion/languages/c/header-scan.ts b/gitnexus/src/core/ingestion/languages/c/header-scan.ts index 033bfd9eb..034e27f4d 100644 --- a/gitnexus/src/core/ingestion/languages/c/header-scan.ts +++ b/gitnexus/src/core/ingestion/languages/c/header-scan.ts @@ -48,7 +48,10 @@ function walk(dir: string, root: string, out: Set): void { } else if (entry.isFile()) { const ext = name.slice(name.lastIndexOf('.')); if (HEADER_EXTENSIONS.has(ext)) { - out.add(relative(root, full)); + // Normalize to forward slashes for cross-platform consistency. + // path.relative() returns backslash-separated paths on Windows, + // but the scope-resolution pipeline uses forward slashes uniformly. + out.add(relative(root, full).replace(/\\/g, '/')); } } }