Native package command discovery silently skips executable programs under lib/node_modules/*/bin on the pinned Zig0.17 toolchain and leaks each skipped candidate path. This blocks the maintained public nested-program and relocation acceptance for #268.
Observed while running the public createPackageSymlinks filesystem regression with real executable wrapper/resource fixtures. Original retained /tmp/pantry-268-relocatable-green.log reports12pass/1fail, missing activation and two allocator leaks, before any discovery repair. It is an existing discovery defect separate from provider/version activation ownership.
Owning source: packages/zig/src/install/symlink.zig, discoverNpmBinaries. It allocates full_path, then checks io_helper.statFile(full_path).mode & 0o111. io_helper.statFile intentionally supplies mode=0 when the compiler's stat type has no mode field, as on qualified Zig0.17. The function does not release full_path on the non-executable branch. Existing io_helper.isExecutable owns executable detection across supported platforms.
Acceptance:
- Reproduce through public
discoverBinariesusing a real managed package directory with executable and non-executable files in a nested npm-style bin directory. Require exactly the executable command and allow the testing allocator to detect any skipped-path leaks. - Use the existing executable predicate and release each rejected candidate allocation. Preserve error ownership and returned BinaryInfo ownership; no fabricated mode values, scan bypass, alternate layout or package-specific override.
- Rerun public package activation across revisions, nested providers/programs, alternate routes, relocation and old-version removal. Keep the original failing nested acceptance rather than deleting or weakening it.
- Keep this source repair in a distinct commit from #268, complete owner checks and independent review, then publish and verify through the normal source/release flow before closing.
Native child of and blocker for #268. No released installer rerun, profile execution, manual shim rewrite or cache deletion was used to diagnose it.