Skip to content

Commit 42843ef

Browse files
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-5
1 parent e9d8e31 commit 42843ef

13 files changed

Lines changed: 1311 additions & 1188 deletions

File tree

‎.github/workflows/vlt-compatibility.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ on:
7070
- 'crates/socket-patch-cli/src/commands/vendor.rs'
7171
- 'crates/socket-patch-cli/src/commands/vendored_backend/**'
7272
- 'crates/socket-patch-cli/src/commands/get.rs'
73-
- 'crates/socket-patch-cli/src/commands/vlt_preflight.rs'
7473
- 'crates/socket-patch-cli/src/commands/scan/**'
7574
- 'crates/socket-patch-cli/src/commands/vex*'
7675
- 'crates/socket-patch-cli/tests/common/**'

‎crates/socket-patch-cli/CLI_CONTRACT.md‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎crates/socket-patch-cli/src/commands/agent_download.rs‎

Lines changed: 84 additions & 192 deletions
Large diffs are not rendered by default.

‎crates/socket-patch-cli/src/commands/bun_preflight.rs‎

Lines changed: 0 additions & 384 deletions
This file was deleted.

0 commit comments

Comments
 (0)