Repository navigation
Commit 42843ef
committed
Refuse vendored patches the same way everywhere
A vendored run decides before any download which patches the engine
would refuse, so it never fetches a view, asks for a grant or strips a
hosted pin for a package it cannot vendor. That decision was assembled
in the CLI from five sources (the Bun and vlt preflights, the
package-lock project refusal, the lock-text gates and the pnpm
takeover), and each entry point merged its own subset by hand. They
had drifted: the download phase never asked the package-lock project
refusal or the pnpm takeover gates, `get <uuid>` raised only the Bun
and vlt refusals before the engine, and the vendor loop judged only
Bun and vlt before its takeover.
All of it now lives in one core function,
`socket_patch_core::vendor::refusals::vendor_refusals`, which runs the
checks in the engine's order and scopes the lock-text gates (hosted
pins, the ledger's idempotency skip, packages that never reach their
backend). The scan preview and rollout plan, the download phase, both
`get` paths and the vendor loop call it. The CLI's bun_preflight.rs
and vlt_preflight.rs are gone, and their tests moved to core.
What users see: a v1 package-lock project, or a hosted pnpm pin whose
takeover the pnpm gates refuse, is now refused before its patch view
is fetched; `get <uuid> --mode vendored` raises every such refusal
with its pre-record error envelope and writes nothing; and `vendor`
refuses them before restoring a hosted pin instead of restoring and
rolling back. Codes and details are unchanged.
Assisted-by: Claude Code:claude-opus-5-51 parent e9d8e31 commit 42843ef
13 files changed
Lines changed: 1311 additions & 1188 deletions
File tree
- .github/workflows
- crates
- socket-patch-cli
- src/commands
- scan
- tests
- socket-patch-core/src/vendor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
This file was deleted.
0 commit comments