Skip to content

Commit a98ab08

Browse files
committed
fix(test): skip MutationCollector real watcher suite on Windows
Windows + Node 24.x currently triggers an upstream libuv/fs.watch assertion: Assertion failed: !_wcsnicmp(filename, dir, dirlen), src\win\fs-event.c:72 Root cause is libuv 1.52.1 (bundled in Node 24.16.0) regressing short path name handling for recursive fs.watch on Windows. Tracked in: - nodejs/node#63638 (regression from libuv 1.52.1) - libuv/libuv#5010 (short path handling) Node 24.15.0 is the last known-good version. MutationCollector business logic (addCandidate, collect merging, Git status path, workspace boundary check, releaseWatchers concept) is covered by MutationCollector > 17/18/19/20 in code-commit3-acceptance. This describe only exercises real fs.watch event capture, which is cross-platform infrastructure behavior tightly coupled to the upstream bug. Skip the entire describe block on Windows via describe.skipIf so: - CI stops flaking on a Node/libuv issue we can't fix from JS. - Linux/macOS keep running the integration test. - All MutationCollector business coverage is preserved. Re-enable when libuv PR #5152 is cherry-picked into a Node 24.x LTS release.
1 parent 6f00b25 commit a98ab08

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

‎src/main/orchestrator/code/code-audit-fixes.test.ts‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,23 @@ describe("CodeRunWorker Ask cancel/shutdown 状态", () => {
332332
});
333333

334334
// ── Audit 5: MutationCollector 真实 watcher ──────────────────────────
335-
336-
describe("MutationCollector real watcher", () => {
335+
//
336+
// NOTE:
337+
// Windows + Node 24.x currently has an upstream fs.watch/libuv instability
338+
// affecting this integration test:
339+
// Assertion failed: !_wcsnicmp(filename, dir, dirlen), src\win\fs-event.c:72
340+
// Tracked in nodejs/node#63638 (regression from libuv 1.52.1 bundled in
341+
// Node 24.16.0) and libuv/libuv#5010.
342+
//
343+
// MutationCollector 业务逻辑(addCandidate / collect 合并 / Git status /
344+
// Workspace 边界检查 / releaseWatchers 概念)由 code-commit3-acceptance
345+
// 中的 MutationCollector > 17/18/19/20 测试覆盖。本 describe 块只覆盖
346+
// 真实 fs.watch 的事件捕获,跨平台的非业务行为,与上游 bug 强耦合。
347+
//
348+
// 在上游修复 cherry-pick 到 Node 24.x LTS 之前,整个 suite 在 Windows 上
349+
// 跳过。Linux/macOS 继续跑,验证 fs.watch 集成。
350+
351+
describe.skipIf(process.platform === "win32")("MutationCollector real watcher", () => {
337352
let tmpDir: string;
338353
let collector: { closeWatcher(): void } | null = null;
339354

0 commit comments

Comments
 (0)