Skip to content

Commit 720fecb

Browse files
committed
yarn-classic: run 50 (#2511 filed)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeSdqGnhxC8pLG11xY9
1 parent 4b50f98 commit 720fecb

3 files changed

Lines changed: 36 additions & 14 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[agent] 2026-12-04: Yarn classic (1.x) bug-hunt run
2+
3+
Run 50. Tested main `d987721`, which is the v5.2.0 release tag (5 commits since run 49, none touching yarn classic), on Linux with Node 22.23.5 and yarn 1.0.2, 1.6.0, 1.7.0, 1.9.4, 1.10.1 and 1.22.22. Yarn 1.22.22 is still the newest 1.x. I rebuilt the local mock patch API (see the known-non-bugs note "Run-50 harness"). Because main is the release, no separate regression comparison was needed.
4+
5+
**Filed:** #2511 (https://github.com/SocketDev/socket-patch/issues/2511). On yarn 1.0.2 and 1.6.0, after `scan --mode vendored`, the frozen install exits 0 and installs nothing. `left-pad` then fails with "Cannot find module", where it loaded before the scan. The scan reports `success` with no warning, even when `packageManager: yarn@1.6.0` is set. `vex` still says "Patched via … (vendored)". This was backlog item 2, now settled as a do-no-harm bug. The yarn behaviour itself was already a known non-bug; what was missing is any user-facing warning or doc. 1.7.0 passes.
6+
7+
**Re-triage:** #2341 still reproduces on `d987721`: standalone `vex` gives `manifest_not_found` ("Run `socket-patch scan` first") after a hosted scan of a workspace that has a member `file:` copy, and following the advice loops. No new information, so I didn't comment. #691 is `agent:needs-human`, so I skipped it.
8+
9+
**Cells:** every cell is a fresh clone, a cold-cache `--frozen-lockfile` install, a check that the patched bytes load, vex, rollback, then a second frozen install that comes out unpatched.
10+
- Common path H/A on 1.0.2, 1.10.1 and 1.22.22, and V on 1.10.1 and 1.22.22: pass. V on 1.0.2 and 1.6.0: #2511.
11+
- Workspaces and workspaces + CRLF, H/V/A, on 1.7.0, 1.9.4 and 1.10.1: pass. Vendored rollback restores the CRLF lock byte for byte. Hosted rollback on 1.9.4 adds the `integrity` line (known class).
12+
- BOM and CRLF locks, H/V/A, on 1.22.22: pass.
13+
- `npm:` alias with CRLF, and an alias in a workspace member, on 1.22.22: V/A patch both copies. H skips the alias (documented) and vex withholds with `patched_ref_unattributable`.
14+
- Offline mirror (`.yarnrc` + pruning), vendored on 1.7.0, including `--offline`: pass. The mirror tarball is untouched.
15+
- Hosted re-run: `applied` with `details.pinChanged: false` and `yarn.lock` byte-identical. Pass (backlog 5 closed).
16+
17+
**Ruled out:** the mock's query-string 404 and missing blob route (harness bugs, noted). The VEX product `@id` naming the clone's origin is by design.
18+
19+
**Next:** a #2511 fix check, `yarn-path` to an old 1.x, `resolutions` with workspaces on 1.7 / 1.9, a mode switch on a lock without `integrity`.

‎known-non-bugs/yarn-classic.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,6 @@ entries/yarn-classic/20261017T080000Z.md
150150
- Run-49 harness (2026-12-02): `scratchpad/bin/mkfx.py <fx>` + `mock.py <fx> 18080` (same routes as run 48; **batch must answer only for the purls in the request body**, or `scan --prune` after `yarn remove` reports a false `vendor_lock_entry_not_found` / `package_not_installed` partialFailure). `cp.sh` must `.gitignore` node_modules, or the "fresh checkout" carries the old install. Published release binaries from npm can't be downloaded here (blocked); build an older tag from source for a regression check.
151151
- Hosted rollback of a `resolved` URL with credentials in userinfo (`https://u:pw@registry…`) writes back the canonical `https://registry.yarnpkg.com/…` without the credentials; the frozen install still passes. Same class as the `.yarnrc` registry note (`SOCKET_NPM_REGISTRY`).
152152
- Rollback removes the patch from `.socket/manifest.json`; a following `apply` says "No patches to apply." (by design).
153+
- Run-50 harness (2026-12-04): `scratchpad/bin/mkfx.py <fx>` + `mock.py <fx> 18080`. **Strip the query string**: scan posts `patches/batch?capabilities=file-modes`, so an exact path match 404s (`api_batch_failed`). It also needs a `patches/blob/<hash>` route serving the original file, or agent rollback fails `missing_blob`, and a 200 for `telemetry`. `cp.sh` (shapes single / ws / wscrlf / crlf / bom / alias / aliasboth / aliascrlf / aliasws) passes `--patch-server-url` to vex and rollback too. `old.sh` is the #2511 repro.
154+
- Vendored VEX product `@id` in a `git clone` names the clone's `origin` (the source path), not the clone dir: by design, the git remote origin is the highest-priority product id (`vex/product.rs:67`).
155+
- Hosted `vex` with an `npm:` alias copy beside the pin exits 2 with `patched_ref_unattributable` and attests nothing: that's the documented alias skip, not a new bug.

‎state/yarn-classic.md‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
[agent] Progress ledger for the scheduled Yarn classic (1.x) bug-hunt routine (label pm:yarn-classic).
22

3-
Last run: 2026-12-02 (run 49), main `2440352`, release v5.1.0, newest yarn classic 1.22.22 (no 1.x release since). Open `pm:yarn-classic` issues: #691 (`agent:needs-human`), #2341 (still reproduces on `2440352`; npm sibling confirmed it on npm 12).
3+
Last run: 2026-12-04 (run 50), main `d987721` (= tag v5.2.0), release v5.2.0, newest yarn classic 1.22.22 (no 1.x release since). Open `pm:yarn-classic` issues: #2511 (new: vendored on yarn ≤ 1.6), #2341 (still reproduces on `d987721`), #691 (`agent:needs-human`).
44

55
## Coverage matrix
66

7-
H = hosted (`scan --mode hosted`), V = vendored (`scan --mode vendored`), A = agent (`scan --mode agent`, then `apply` after each fresh install; `setup` was removed in v5). Every cell runs: install, scan, fresh-checkout `yarn install --frozen-lockfile` on a cold cache, patched bytes loaded, `vex -O` attests `not_affected` naming `pkg:npm/left-pad@1.3.0`, `rollback`, then another fresh frozen install (unpatched). Local mock patch API (see known-non-bugs "Run-49 harness"). Linux only (probe workflows are switched off). CI's `yarn-classic-matrix` (1.0.2, 1.6.0, 1.7.0, 1.9.4, 1.10.1, 1.22.22) is green on the 2026-11-25 and 11-26 nightlies.
7+
H = hosted (`scan --mode hosted`), V = vendored (`scan --mode vendored`), A = agent (`scan --mode agent`, then `apply` after each fresh install; `setup` was removed in v5). Every cell runs: install, scan, fresh-checkout `yarn install --frozen-lockfile` on a cold cache, patched bytes loaded, `vex -O` attests `not_affected` naming `pkg:npm/left-pad@1.3.0`, `rollback`, then another fresh frozen install (unpatched). Local mock patch API (see known-non-bugs "Run-50 harness"). Linux only (probe workflows are switched off). CI's `yarn-classic-matrix` (1.0.2, 1.6.0, 1.7.0, 1.9.4, 1.10.1, 1.22.22) is green on the 2026-11-25 and 11-26 nightlies.
88

99
| workflow | H | V | A |
1010
| --- | --- | --- | --- |
11-
| Single dep, common path | pass 1.0.2 / 1.7.0 / 1.10.1 / 1.22.22 (2026-12-02), 1.9.4 (2026-11-28) | pass 1.7.0 / 1.10.1 / 1.22.22 (2026-12-02), 1.9.4 (2026-11-28); 1.0.2: yarn ≤ 1.6 installs nothing (known limitation) | pass 1.0.2 / 1.7.0 / 1.10.1 / 1.22.22 (2026-12-02) |
12-
| Workspaces (`^1.3.0` + `1.3.0` merged block; member on another version `~1.1.0` left alone) | pass 1.10.1 / 1.22.22 (2026-12-02) | pass 1.10.1 / 1.22.22 (2026-12-02); member-dir install: #691 | pass 1.10.1 / 1.22.22 (2026-12-02) |
13-
| CRLF / BOM / CRLF+BOM yarn.lock (incl. workspace + member `file:` copy) | pass 1.22.22 (2026-12-02; `file:` shape vex = #2341) | pass 1.22.22 (2026-12-02) | pass 1.22.22 (2026-11-26) |
11+
| Single dep, common path | pass 1.0.2 / 1.10.1 / 1.22.22 (2026-12-04, v5.2.0), 1.7.0 (2026-12-02), 1.9.4 (2026-11-28) | pass 1.7.0 / 1.10.1 / 1.22.22 (2026-12-04); 1.0.2 / 1.6.0 install nothing, no warning: #2511 | pass 1.0.2 / 1.10.1 / 1.22.22 (2026-12-04) |
12+
| Workspaces (`^1.3.0` + `1.3.0` merged block; member on another version `~1.1.0` left alone) | pass 1.7.0 / 1.9.4 / 1.10.1 (2026-12-04), 1.22.22 (2026-12-02) | pass 1.7.0 / 1.9.4 / 1.10.1 (2026-12-04), 1.22.22 (2026-12-02); member-dir install: #691 | pass 1.7.0 / 1.9.4 / 1.10.1 (2026-12-04), 1.22.22 (2026-12-02) |
13+
| CRLF / BOM / CRLF+BOM yarn.lock (incl. workspace + member `file:` copy) | pass 1.22.22 (2026-12-04), ws+CRLF 1.7.0 / 1.9.4 (2026-12-04); `file:` shape vex = #2341 | pass 1.22.22, ws+CRLF 1.7.0 / 1.9.4 (2026-12-04; rollback byte-for-byte) | pass 1.22.22, ws+CRLF 1.7.0 / 1.9.4 (2026-12-04) |
1414
| `resolutions` forcing the patched version | pass 1.7.0 / 1.10.1 / 1.22.22 (2026-11-26) | pass 1.7.0 / 1.10.1 / 1.22.22 (2026-11-26) | pass 1.22.22 (2026-11-26) |
15-
| `npm:` alias (alias only / alias + direct) | refused `redirect_yarn_classic_alias_skipped`, vex omits (documented) 1.22.22 (2026-11-26) | pass 1.22.22 (2026-11-26) | pass 1.22.22 (2026-11-26) |
16-
| Offline mirror (`.yarnrc`, user `~/.yarnrc`, `.npmrc`, env; pruning) + `yarn add` + rollback | refused `redirect_yarn_classic_offline_mirror` in all four 1.22.22 (2026-11-28) | pass 1.10.1 / 1.22.22 (2026-11-26) | pass 1.22.22 (2026-11-28) |
17-
| Re-run idempotency + mode switch H→V→A→H→rollback | pass 1.22.22 (2026-11-26; re-run reports `applied`, family-wide, PR #2307) | pass 1.22.22 (2026-11-26) | pass (keeps vendored ownership) 1.22.22 (2026-11-26) |
15+
| `npm:` alias (alias only / alias + direct / + CRLF / in a workspace member) | refused `redirect_yarn_classic_alias_skipped`, vex omits (`patched_ref_unattributable`, documented) 1.22.22 (2026-12-04) | pass 1.22.22 incl. CRLF + member (2026-12-04) | pass 1.22.22 incl. CRLF + member (2026-12-04) |
16+
| Offline mirror (`.yarnrc`, user `~/.yarnrc`, `.npmrc`, env; pruning) + `yarn add` + rollback | refused `redirect_yarn_classic_offline_mirror` in all four 1.22.22 (2026-11-28) | pass 1.7.0 incl. `--offline` (2026-12-04), 1.10.1 / 1.22.22 (2026-11-26) | pass 1.22.22 (2026-11-28) |
17+
| Re-run idempotency + mode switch H→V→A→H→rollback | pass 1.22.22 (2026-12-04: re-run `applied` with `details.pinChanged: false`, lock unchanged) | pass 1.22.22 (2026-11-26) | pass (keeps vendored ownership) 1.22.22 (2026-11-26) |
1818
| `get <name>` / `list` / `remove <name>` | pass 1.22.22 (2026-11-26) | pass 1.22.22 (2026-11-26) | pass 1.22.22 (2026-11-26) |
1919
| git dep (alone / member git copy beside registry) | pass, skips `redirect_yarn_classic_git_skipped` 1.22.22 (2026-11-28); standalone vex remedy: #2341 | pass (git-only refuses `vendor_lock_entry_not_rewritable`) 1.22.22 (2026-11-28) | pass 1.22.22 (2026-11-28) |
2020
| Merge flows (patch branch × `yarn add` branch, both orders; range-change conflict resolved by yarn's lock auto-merge) | pass 1.22.22 (2026-12-02) | pass 1.22.22 (2026-12-02) | n/a |
@@ -28,18 +28,18 @@ H = hosted (`scan --mode hosted`), V = vendored (`scan --mode vendored`), A = ag
2828

2929
## Backlog
3030

31-
1. Re-run H/V/A common path on 1.7.0 / 1.9.4 with workspaces and CRLF (1.10.1 / 1.22.22 done 2026-12-02).
32-
2. Yarn ≤ 1.6 vendored installs nothing (exit 0) while `vex` still attests from the lock (seen again 2026-12-02 on 1.0.2: `node_modules` has no left-pad, vex says `not_affected`). Known yarn limitation, but not in the user docs. Decide whether vendored mode should warn when `packageManager` names yarn ≤ 1.6.
33-
3. `npm:` alias combined with CRLF / workspace member, V/A.
34-
4. Offline mirror + vendored on 1.7.0 (only 1.10.1 / 1.22.22 so far).
35-
5. Hosted re-run `details.pinChanged` (#2307) shape on a yarn lock: a re-run should report no pin change.
31+
1. #2511 follow-up: if fixed, check the warning/refusal fires for `packageManager: yarn@1.0`–`1.6.x` and stays silent on 1.7.0+, and that hosted mode is still offered.
32+
2. `.yarnrc` `yarn-path` pointing at an old yarn 1.x with vendored wiring (another way the yarn version is knowable; #2511 context).
33+
3. `resolutions` + workspaces on 1.7.0 / 1.9.4 (resolutions only covered single-project so far).
34+
4. Mode switch H→V→A on 1.7.0 / 1.9.4 (a lock without `integrity`).
35+
5. `get <uuid> --mode hosted` / `--mode vendored` on a workspace with CRLF.
3636
6. `vex --grype-config` with a yarn project (needs grype; generic, low priority).
3737
7. #691 (`agent:needs-human`): leave it alone unless a maintainer comments.
3838

3939
## Known non-bugs
4040

4141
Full list: `known-non-bugs/yarn-classic.md` (search it with `git grep`). The ones most likely to be re-filed:
42-
- yarn 1.0.2–1.6.x install nothing (exit 0) for `file:` tarball lock entries, with or without socket-patch; CI reports vendored ≤ 1.6 as KNOWN LIMITATION.
42+
- yarn 1.0.2–1.6.x install nothing (exit 0) for `file:` tarball lock entries (a yarn bug). The missing warning / docs for vendored mode is #2511, so don't re-file.
4343
- Hosted rollback of a lock without `integrity` lines (yarn < 1.10) adds `integrity` lines; yarn 1.7 still installs it frozen.
4444
- With a mock patch host, hosted pins count as hosted wiring only when `--patch-server-url` names it; rollback otherwise says "Manifest not found".
4545
- Hosted mode refuses a yarn offline mirror (`redirect_yarn_classic_offline_mirror`) and skips `npm:` alias entries (`redirect_yarn_classic_alias_skipped`); both documented.

0 commit comments

Comments
 (0)