GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Aug 13, 2026 •
edited by cursor Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

What

Adds crates/socket-patch-cli/tests/e2e_vendored_production.rs — the vendored-mode
counterpart to e2e_hosted_production.rs. The synthetic e2e_vendor_*_build.rs
capstones prove the vendoring mechanism with a hand-staged blob and
vendor --offline; they never contact production. This suite drives
scan --mode vendored against the real Socket production service and real
upstream registries, with no mocking anywhere, on the anonymous free public
proxy
(no token; SOCKET_NO_CONFIG=true, every SOCKET_* scrubbed with hostile
seeds so a dropped scrub reddens the suite).

Per package manager it proves the full loop: install pristine (asserted pristine —
anti-vacuity) → scan --mode vendored materializes the real free-tier patch
into .socket/vendor/<eco>/<uuid>/ and rewires the lock/manifest → 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 (already_vendored, byte-stable lock) → vendor --revert byte-restores.
It proves byte delivery, not CVE efficacy — matching how the capstones assert.

#[ignore]-gated (stays out of the test/e2e jobs), soft-skips absent toolchains
unless SOCKET_PATCH_VENDORED_E2E_STRICT=1, cache-isolated via
common/cache_env.rs. Reuses the hosted suite's pinned patch catalog. Companion doc:
docs/testing/vendored-production-e2e.md.

Coverage

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.

How to run

# 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).

Notes

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):

  • Ran green — npm, pnpm, yarn classic, yarn berry, bun, pip, uv, cargo,
    preflight, golang (zero-patch), deno (unsupported), canary.
  • Soft-skip — none locally; legs soft-skip only when their toolchain is absent.
  • CLI bugs surfaced (marked xfail, not fixed — tests-only PR):
    • 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 tarball + lock are
      correct (the lockfile passes pnpm's supply-chain policy). The leg reproduces the
      documented workaround (mirror the override into pnpm-workspace.yaml) to prove
      the artifact IS installable, and fails loudly on any other error. Fix belongs in
      the CLI: emit pnpm-workspace.yaml overrides on pnpm ≥ 11.
    • gem vendoring refuses the platform-qualified purl
      (pkg:gem/[email protected]?platform=ruby) with platform_gem_unsupported
      (status: partial_failure); download succeeds. The leg asserts redirect+download
      and tolerates the vendor failure, failing loudly on any other error and
      auto-upgrading to a full bundle install delivery proof once the CLI vendors
      platform gems.

🤖 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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cursor[bot]
cursor Bot reviewed Aug 13, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for 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.

Fix All in Cursor

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.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread crates/socket-patch-cli/tests/e2e_vendored_production.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread crates/socket-patch-cli/tests/e2e_vendored_production.rs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko @claude
test(vendored): real-production e2e for scan --mode vendored across…
7c8a3f2
… 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]>
@mikolalysenko
Mikola Lysenko (mikolalysenko) force-pushed the test/e2e-vendored-production branch from 4a2f836 to 7c8a3f2 Compare August 13, 2026 18:44
Wenxin-Jiang
Wenxin Jiang (Wenxin-Jiang) approved these changes Aug 13, 2026
View reviewed changes
@mikolalysenko
Mikola Lysenko (mikolalysenko) enabled auto-merge (squash) August 13, 2026 21:39
@mikolalysenko
Mikola Lysenko (mikolalysenko) merged commit 0770374 into main Aug 13, 2026
62 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the test/e2e-vendored-production branch August 13, 2026 21:39
This was referenced Aug 13, 2026
fix(vendor): write pnpm overrides to pnpm-workspace.yaml for pnpm >= 11 #174
Merged
fix(gem): production-safe bundler plugin — tolerant bootstrap, honest digest, project-scoped stamp #178
Merged
test(gem): hermetic hosted capstone + CHECKSUMS/transitive/scan --vendor coverage; gems.rb + CRLF redirect fixes #177
Merged
fix(vendor): gem wiring reconstruction, dir-artifact file inventory, per-section lock remotes #179
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@Wenxin-Jiang Wenxin Jiang (Wenxin-Jiang) Wenxin-Jiang approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mikolalysenko @Wenxin-Jiang
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.