Description
bun test in packages/nikcli reports 7 failures on a normal Windows dev machine, none of which are real defects in the code under test:
(fail) Filesystem.realpathInside > rejects a symlink that points outside the root
(fail) Filesystem.realpathInside > rejects a symlink whose leaf points outside the root
(fail) Filesystem.realpathInside > allows a symlink that points inside the root
(fail) Filesystem.realpathInside > rejects a broken symlink that points outside the root
(fail) Filesystem Benchmark > contains performance > path containment check
(fail) Filesystem Benchmark > contains performance > non-contained paths
(fail) Filesystem > resolve > handles absolute paths
Plus, outside the CI-covered subsets:
(fail) cross-platform file:// URL handling > pathToFileURL roundtrips POSIX paths on POSIX (sanity)
(fail) cross-platform file:// URL handling > pathToFileURL handles spaces and unicode
(fail) GlobTool > finds nested matches with ** patterns
Causes:
- The symlink cases call
fs.symlink, which needs Developer Mode or an elevated shell on Windows and otherwise fails EPERM. GitHub's windows-latest runner is elevated, so CI never sees this.
Filesystem.resolve("/absolute/path") correctly answers C:\absolute\path on Windows; the test compares against a POSIX literal.
fileURLToPath only accepts paths its own platform considers absolute, so /home/user/foo.txt throws on Windows.
GlobTool reports native paths, so the nested match reads nested\d.ts.
path.win32.relative resolves both operands against the current drive, so 100k containment checks take ~1.7s against a 1000ms budget calibrated on POSIX.
Net effect: a Windows contributor cannot tell a real regression from platform noise.
Fix in #171.
Nikcli version
live-main @ 2c59e93
Steps to reproduce
- On Windows without Developer Mode, clean clone of
live-main, bun install.
cd packages/nikcli
bun test test/util test/config test/worktree test/tui/util/double-esc.test.ts — 7 failures.
bun test test/cross-platform.test.ts test/tool/glob.test.ts — 3 more.
Operating System
Windows 11 x64
Terminal
Windows Terminal
Description
bun testinpackages/nikclireports 7 failures on a normal Windows dev machine, none of which are real defects in the code under test:Plus, outside the CI-covered subsets:
Causes:
fs.symlink, which needs Developer Mode or an elevated shell on Windows and otherwise failsEPERM. GitHub's windows-latest runner is elevated, so CI never sees this.Filesystem.resolve("/absolute/path")correctly answersC:\absolute\pathon Windows; the test compares against a POSIX literal.fileURLToPathonly accepts paths its own platform considers absolute, so/home/user/foo.txtthrows on Windows.GlobToolreports native paths, so the nested match readsnested\d.ts.path.win32.relativeresolves both operands against the current drive, so 100k containment checks take ~1.7s against a 1000ms budget calibrated on POSIX.Net effect: a Windows contributor cannot tell a real regression from platform noise.
Fix in #171.
Nikcli version
live-main @ 2c59e93
Steps to reproduce
live-main,bun install.cd packages/nikclibun test test/util test/config test/worktree test/tui/util/double-esc.test.ts— 7 failures.bun test test/cross-platform.test.ts test/tool/glob.test.ts— 3 more.Operating System
Windows 11 x64
Terminal
Windows Terminal