DiscoverExecutablesWithPaths gates discovery on the Unix execute bit (internal/files/files.go:77):
if info.Mode().IsRegular() && info.Mode().Perm()&0o111 != 0 {
Windows has no execute bit. Go synthesizes permissions from the read-only attribute, so files report 0666 (or 0444), &0o111 is always 0, and no plugin is ever discovered on Windows. Executability on Windows is determined by extension via PATHEXT (.exe, .bat, .cmd, .com).
Confirmed on a Windows machine: five tests fail with "map[]" should have N item(s), but has 0 —
TestManager_discoverPlugins_{WithExecutableFiles, SkipsHiddenFiles, SkipsDirectories, MultipleExecutables, OnlyDiscoverAllowed}. They fail identically on main, so this is pre-existing and not caused by #299.
Fix: split the executability check per platform, following the existing precedent in this same package (internal/files/paths_windows_test.go, //go:build windows):
Found while reviewing #299 for cross-platform behavior.
DiscoverExecutablesWithPathsgates discovery on the Unix execute bit (internal/files/files.go:77):Windows has no execute bit. Go synthesizes permissions from the read-only attribute, so files report
0666(or0444),&0o111is always 0, and no plugin is ever discovered on Windows. Executability on Windows is determined by extension viaPATHEXT(.exe,.bat,.cmd,.com).Confirmed on a Windows machine: five tests fail with
"map[]" should have N item(s), but has 0—TestManager_discoverPlugins_{WithExecutableFiles, SkipsHiddenFiles, SkipsDirectories, MultipleExecutables, OnlyDiscoverAllowed}. They fail identically onmain, so this is pre-existing and not caused by #299.Fix: split the executability check per platform, following the existing precedent in this same package (
internal/files/paths_windows_test.go,//go:build windows):unix: keep the0o111permission checkwindows: match againstPATHEXTextensionsFound while reviewing #299 for cross-platform behavior.