strix icon indicating copy to clipboard operation
strix copied to clipboard

fix(tests): skip symlink test when Windows lacks privilege

Open pranav-afk opened this issue 4 months ago • 3 comments

On Windows without Administrator or Developer Mode, Path.symlink_to raises WinError 1314 and crashes the suite. Skip with a clear remediation message instead. Fixes #650.

pranav-afk avatar Jul 11 '26 13:07 pranav-afk

Greptile Summary

This PR makes the symlink-size test handle Windows privilege limits.

  • Skips the symlink test when Windows reports privilege error 1314.
  • Re-raises other symlink creation errors so setup failures still fail the test.
  • Adds a remediation message for running as Administrator or enabling Developer Mode.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
tests/test_local_sources.py The symlink test now skips only the intended Windows privilege error and keeps other symlink failures visible.

Reviews (2): Last reviewed commit: "fix(tests): only skip symlink test on Wi..." | Re-trigger Greptile

greptile-apps avatar Jul 11 '26 13:07 greptile-apps

This fix looks correct and complete — catches the privilege error, shows a clear message, and re-raises other OSErrors. The production code (directory_size_bytes) already handles symlinks correctly via os.scandir() with follow_symlinks=False, so only the test needed changes. Ship it. 🚀

AnnasMazhar avatar Jul 14 '26 13:07 AnnasMazhar

@greptile

bearsyankees avatar Jul 14 '26 22:07 bearsyankees