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(vendor): yarn 1 dev-flow e2e — lockfile re-save survival + strapi-incident guards by mikolalysenko · Pull Request #129 · SocketDev/socket-patch

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Why

Debugging a vendored-mode install of an old strapi monorepo (yarn v1 lockfile) surfaced a class of yarn-1 flows our existing capstone doesn't cover. The install failures themselves turned out to be a yarn 2.4.3 bug on Node ≥23 (util.isDate removed; berry's builtin patch: compat fetcher for fsevents/resolve crashes — unrelated to our wiring), but the incident showed yarn 1 is the right installer for classic-lockfile projects — and we only e2e-proved the --frozen-lockfile --offline fresh-checkout path (e2e_vendor_yarn_classic_build.rs).

Manually verified during the incident, now pinned as e2e: yarn 1.22.22 consumes vendored file: wiring correctly in the everyday developer flows, where a regression would silently drop patches.

What the new capstone proves (e2e_vendor_yarn_classic_dev_flow.rs)

  1. Plain yarn install (no --frozen-lockfile, no --offline) on a fresh checkout delivers the patched bytes and keeps the vendored block intact.
  2. yarn add re-serialization round-trip: yarn add rewrites the entire lockfile from yarn's in-memory model (asserted via Saved lockfile. so the check can't go vacuous). The vendored resolved "file:./.socket/vendor/…#sha1" + recomputed integrity block must survive byte-intact.
  3. Unpatched-neighbor coexistence: [email protected] (the package at the center of the strapi incident — berry builtin-patches it) rides along unvendored; its lock block stays byte-identical through vendor + installs and it installs pristine registry bytes.
  4. No patch: protocol leakage: the wired/re-saved lockfile never contains a patch: resolution, so a berry migration of a classic lockfile can never inherit one from us.
  5. Frozen re-entry: --frozen-lockfile passes on the re-saved lockfile — dev installs don't wedge CI installs downstream.
  6. Lockfile fixpoint: repeated plain installs leave yarn.lock byte-identical.

Conventions

Same harness shape as the existing capstone: self-contained helpers, corepack [email protected] pinned, SOCKET_* env scrubbed, private YARN_CACHE_FOLDER per phase, local-only skip gates (corepack/registry unavailable → println + return), hard assertions after the gate.

Test run

VENDOR OK
DEV INSTALL OK
YARN ADD RE-SERIALIZATION OK
FIXPOINT OK
FROZEN RE-ENTRY OK
test yarn_classic_vendored_lock_survives_dev_install_resave ... ok

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

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

All reactions
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Jul 23, 2026
fix(redirect): fail closed on non-npm: berry descriptors + yarn layering regression suite #131
Merged
@mikolalysenko @claude
test(vendor): yarn classic dev-flow e2e — re-save survival, neighbor …
72589dc
…coexistence, no patch: leakage

Companion to the fresh-checkout capstone (e2e_vendor_yarn_classic_build):
proves yarn 1.22.22 stays a first-class installer for vendored wiring
across the everyday flows that capstone does not exercise:

- plain `yarn install` (no --frozen-lockfile/--offline) delivers patched
  bytes and keeps the vendored file: block intact
- `yarn add` re-serializes the ENTIRE lockfile from yarn's in-memory
  model (asserted via `Saved lockfile.`) and must round-trip the
  vendored block byte-intact — the flow that would silently drop
  patches if yarn normalized our entry away
- an unvendored neighbor (`resolve` — the package at the center of the
  strapi/yarn2 incident) keeps a byte-identical lock block and installs
  pristine
- the wired lockfile never contains a `patch:` resolution (guards berry
  migrations of classic lockfiles)
- `--frozen-lockfile` passes on the re-saved lockfile (CI re-entry)

Local capstone: skips when corepack/registry are unavailable; all
assertions after the gate are hard.

Co-Authored-By: Claude Fable 5 <[email protected]>
@mikolalysenko
Mikola Lysenko (mikolalysenko) force-pushed the test/vendor-yarn1-dev-flow-e2e branch from 38dfc45 to 72589dc Compare July 24, 2026 15:46
@mikolalysenko Mikola Lysenko (mikolalysenko) mentioned this pull request Jul 24, 2026
test(redirect): yarn classic hosted-mode capstone e2e #132
Merged
Wenxin-Jiang
Wenxin Jiang (Wenxin-Jiang) approved these changes Jul 24, 2026
View reviewed changes
@mikolalysenko
Mikola Lysenko (mikolalysenko) merged commit 383f114 into main Jul 24, 2026
54 checks passed

Uh oh!

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

@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the test/vendor-yarn1-dev-flow-e2e branch July 24, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

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