From 65a1787f92c37a87d0a9ab431d119b5ad73f7cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=B7=E7=86=99?= Date: Mon, 16 Feb 2026 21:49:47 +0800 Subject: [PATCH] fix: normalize paths to forward slashes for Windows RegExp compatibility Windows path.relative() produces backslashes (e.g., memory\2026-02-16.md) which fail to match RegExp patterns using forward slashes. Normalize relative paths to forward slashes before RegExp matching using rel.split(path.sep).join('/'). Fixes 4 test failures on Windows CI. --- src/auto-reply/reply/post-compaction-audit.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/auto-reply/reply/post-compaction-audit.ts b/src/auto-reply/reply/post-compaction-audit.ts index aa347f6bced..12741fc2951 100644 --- a/src/auto-reply/reply/post-compaction-audit.ts +++ b/src/auto-reply/reply/post-compaction-audit.ts @@ -30,7 +30,9 @@ export function auditPostCompactionReads( // RegExp — match against relative paths from workspace const found = readFilePaths.some((p) => { const rel = path.relative(workspaceDir, path.resolve(workspaceDir, p)); - return required.test(rel); + // Normalize to forward slashes for cross-platform RegExp matching + const normalizedRel = rel.split(path.sep).join("/"); + return required.test(normalizedRel); }); if (!found) { missingPatterns.push(required.source);