Global package cleanup previously interpreted a declared dependency manifest
that could not be read as a package with no commands. The resulting partial bin
set could orphan a replaced group's command or remove a command still owned by
a surviving group.
Make dependency-manifest ownership enumeration fallible in both the TypeScript
and Rust implementations. Snapshot target and survivor ownership before global
activation or deletion, make multi-target remove preflight the whole command,
and preserve both the ownership and fresh-install cleanup diagnostics when both
operations fail.
Add real-filesystem and CLI regressions for incomplete enumeration, repair and
retry, protected shared commands, and mutation-free failure paths.
Fixespnpm/pnpm#13796.
---------
Co-authored-by: Zoltan Kochan <z@kochan.io>