Break dependency cycles canonically during peer resolution: each strongly connected component's members sort by package id and every intra-SCC edge whose target is not canonically later is cut, the same cut at every occurrence. The SCC becomes a DAG: no walk path revisits a package, every peer verdict is a plain (package, context) function, and the lockfile is identical however the walk is ordered (Closes pnpm/pnpm#13846, Closes pnpm/pnpm#13865). A cut back-edge is still a real dependency edge: it is realized against a shared record-only occurrence of its target, walked once at importer context by the drivers, with peer-issue emission suppressed (every real position reports its own state). Back-edge targets nothing reaches forward are queued from the realized-children skip so they stay in the graph. The shared occurrences persist across peer-hoist discovery rounds. The pnpm/pnpm#13859 cycle-truncation verdict keys had nothing left to scope and are deleted, as is the interim hoisted-region rule this branch previously carried. Single-importer bit fixture: 0.66 s / 0.60 GB / 9.6k walks vs main's 1.61 s / 0.82 GB / ~27k; 5-importer: 0.73 s / 0.61 GB vs 2.57 s / 0.92 GB; lockfiles 23-37% smaller and byte-identical across runs and orderings.
316 B
316 B