You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(vendor): warn when a wired classic yarn.lock is one berry install from silent de-patching (#133)
Proven end-to-end on a real monorepo (2026-07): yarn 2+ (berry)
migrates a classic (v1) yarn.lock to its own format on install and
re-resolves every entry from the registry — the vendored
`file:./.socket/vendor/…` resolutions are dropped with NO warning and
every package installs unpatched.
New state-based core probe `yarn_classic_berry_migration_risk`
(vendor/mod.rs): fires when yarn.lock is classic AND carries vendored
wiring AND package.json does not pin yarn classic via
`packageManager: yarn@1…` (a corepack pin makes stray berry installs
refuse instead of migrate; major is parsed, so yarn@10 does not
string-match yarn@1). Reads on-disk state, not run events, so callers
invoke it unconditionally at envelope-finalize: unwired projects,
yarn@1-pinned projects, and fully-reverted runs stay silent.
Surfaced as a new run-level `warnings` array on the JSON envelope
(`{code, detail}`, omitted when empty so existing consumers see
byte-identical output) plus a stderr line in human mode — wired into
the `vendor` command and both scan vendor flows (shared
run_scan_vendor_step).
Tests: 5 probe unit tests (pin suppression, yarn@4/yarn@10/pnpm pins
still warn, unwired/berry/missing locks silent, malformed package.json
fails toward warning); the yarn-classic capstone e2e now asserts the
advisory appears on first vendor AND on in-sync re-runs, disappears
under a yarn@1.22.22 packageManager pin (and the empty array is omitted
from JSON), and falls silent after --revert.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments