GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — test(vendored): real-production e2e for `scan --mode vendored` across every package manager by mikolalysenko · Pull Request #169 · SocketDev/socket-patch Conversation
|
| Package manager | Fixture | Cold offline delivery install | Proof |
|---|---|---|---|
| npm | [email protected] | npm ci |
full byte delivery |
| pnpm | [email protected] | pnpm install --frozen-lockfile --offline |
delivery via pnpm-11 workaround (gap below) |
| yarn classic | [email protected] | yarn install --frozen-lockfile --offline |
full byte delivery |
| yarn berry (node-modules) | [email protected] | yarn install --immutable --check-cache |
full byte delivery |
| bun (text lockfile) | [email protected] | bun install --frozen-lockfile |
full byte delivery |
| pip (requirements.txt) | [email protected] | pip install --no-index -r |
full byte delivery |
| uv (uv.lock) | [email protected] | uv sync --frozen --offline |
full byte delivery |
cargo ([patch.crates-io]) |
[email protected] | cargo fetch --offline --locked |
resolves from vendored path, zero downloads + byte check |
| bundler | [email protected] | — | ❌ CLI gap (below) |
| go | — | — | zero-patch assertion (no free golang patches) |
| deno | — | — | negative assertion (unsupported) |
| maven / nuget / composer | — | — | canary (no free production patches) |
Plus preflight_required_patches_are_published (catalog canary against
patches-api.socket.dev, mirrors the hosted preflight).
cargo uses cargo fetch --offline rather than cargo build: the production
traitobject patch injects a compile_error! unless the allow-unmaintained feature
is set (the patch's intent), so build fails by design — that's patch content, not a
vendoring defect. The leg proves the whole graph resolves from committable files with
zero registry downloads and byte-checks the vendored directory.
# everything, soft-skipping absent toolchains cargo test -p socket-patch-cli --test e2e_vendored_production -- --ignored --test-threads=1 # CI: every "toolchain missing" soft-skip becomes a hard failure SOCKET_PATCH_VENDORED_E2E_STRICT=1 \ cargo test -p socket-patch-cli --test e2e_vendored_production -- --ignored --test-threads=1
Knobs: SOCKET_PATCH_VENDORED_E2E_GEM_STRICT=1 (promote the gem gap to a hard
failure), SOCKET_PATCH_VENDORED_E2E_CANARY_STRICT=1 (fail when maven/nuget/composer
gain a free patch).
cargo test -p socket-patch-cli --test e2e_vendored_production --no-run compiles
cleanly (the primary gate — the suite is #[ignore]). Ran the full --ignored set
locally against production, all 13 tests green (npm 11.6.2, pnpm 11.18.0, yarn
4.6.0 / corepack [email protected], bun 1.3.14, uv, python3/pip, cargo, ruby+bundle all
present; composer + deno absent but their legs need no toolchain):
package.json pnpm.overrides (moved topnpm-workspace.yaml), so a frozen install refusesERR_PNPM_LOCKFILE_CONFIG_MISMATCH even though the vendored tarball + lock arepnpm-workspace.yaml) to provepnpm-workspace.yaml overrides on pnpm ≥ 11.pkg:gem/[email protected]?platform=ruby) with platform_gem_unsupportedstatus: partial_failure); download succeeds. The leg asserts redirect+downloadbundle install delivery proof once the CLI vendors🤖 Generated with Claude Code
Note
Low Risk
Tests-only change with no CLI or runtime behavior modifications; live production tests are ignored by default and isolated from normal CI.
Overview
Adds e2e_vendored_production.rs, a production counterpart to the hosted suite and the synthetic e2e_vendor_*_build capstones: scan --mode vendored against real patches-api.socket.dev and upstream registries on the free public proxy (scrubbed SOCKET_*, SOCKET_NO_CONFIG=true).
Each leg runs install → pristine-byte check → vendoring → cold offline reinstall from committable files only (patched bytes, not registry) → idempotent re-scan → vendor --revert. Coverage includes npm (npm/pnpm/yarn classic/berry/bun), PyPI (pip/uv), Cargo, plus preflight patch catalog checks, golang/deno guards, and a maven/nuget/composer canary.
docs/testing/vendored-production-e2e.md documents patches, PM matrix, known CLI gaps (pnpm ≥11 pnpm-workspace.yaml overrides, gem platform_gem_unsupported), and strict env knobs. Tests are #[ignore] with optional SOCKET_PATCH_VENDORED_E2E_STRICT hard-fail on soft-skips.
Reviewed by Cursor Bugbot for commit 4a2f836. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issues.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4a2f836. Configure here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
… every package manager Adds `crates/socket-patch-cli/tests/e2e_vendored_production.rs`, the vendored-mode counterpart to `e2e_hosted_production.rs`. It drives `scan --mode vendored` against the REAL Socket production service and REAL registries on the anonymous free public proxy (no token, `SOCKET_NO_CONFIG=true`), and proves the full vendored loop per package manager: install pristine -> vendor the real free-tier patch into `.socket/vendor/<eco>/<uuid>/` -> cold reinstall from ONLY the committable files (empty caches, offline) -> the installed bytes are the vendored (patched) bytes, not the pristine registry bytes -> idempotent re-run -> revert byte-restores. Byte delivery, not CVE efficacy (matches the capstones). `#[ignore]`-gated; soft-skips absent toolchains unless `SOCKET_PATCH_VENDORED_E2E_STRICT=1`. Companion doc in docs/testing/. Legs: npm, pnpm, yarn classic, yarn berry (node-modules), bun, pip (requirements.txt), uv (uv.lock), cargo; preflight patch canary; golang zero-patch, deno unsupported, and maven/nuget/composer canary negatives. Two real CLI gaps surfaced and marked xfail (tests-only PR, not fixed here): - pnpm >= 11 ignores package.json `pnpm.overrides` (moved to pnpm-workspace.yaml), so a frozen install refuses ERR_PNPM_LOCKFILE_CONFIG_MISMATCH even though the vendored artifact is correct; the leg proves delivery via the documented workaround and fails loudly on any other error. - gem vendoring refuses the platform-qualified purl (`?platform=ruby`) with `platform_gem_unsupported`; the leg asserts redirect+download and tolerates the vendor failure, auto-retiring once fixed. Co-Authored-By: Claude Opus 4.8 <[email protected]>
4a2f836 to
7c8a3f2
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.