Skip to content

Commit fd52ab3

Browse files
committed
yarn-classic: run 51
1 parent 8882afd commit fd52ab3

3 files changed

Lines changed: 35 additions & 10 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[agent] 2026-12-06: Yarn classic (1.x) bug-hunt run
2+
3+
Run 51. Tested main `cd7c5c5` (v5.2.0 plus 2 commits, both for RubyGems platform gems; the `vex.rs` change only touches gem copies) on Linux with Node 22.23.5 and yarn 1.6.0 (via `yarn-path`), 1.7.0, 1.9.4 and 1.22.22. Yarn 1.22.22 is still the newest 1.x. I rebuilt the local mock patch API (known-non-bugs "Run-51 harness"). No new issues filed.
4+
5+
**Commented:** #2511 (https://github.com/SocketDev/socket-patch/issues/2511#issuecomment-7460171232). It still reproduces on `cd7c5c5`, and it also reproduces when the old yarn comes from `.yarnrc` `yarn-path ".yarn/releases/yarn-1.6.0.js"` under a global 1.22.22: the vendored scan says `success` with no old-yarn warning, the fresh frozen install exits 0 with no `node_modules/left-pad`, and `vex` attests `not_affected`. Hosted and agent pass on the same project. The issue had listed `yarn-path` only as "possibly" a usable signal.
6+
7+
**Re-triage:** #2341 still reproduces on `cd7c5c5` (standalone `vex` exits 2 with "No patches in this project … Run `socket-patch scan` first" after a hosted scan of a workspace with a member `file:` copy). No new information, so no comment. #691 is `agent:needs-human`, skipped.
8+
9+
**Cells** (each: fresh clone, cold-cache `--frozen-lockfile`, patched bytes checked, `vex`, rollback, second fresh frozen install unpatched):
10+
- Common path H/V/A on 1.22.22: pass.
11+
- `resolutions` + workspaces (members on `~1.1.0` and `^1.2.0` forced to 1.3.0), H/V/A on 1.7.0, 1.9.4 and 1.22.22: pass. Hosted rollback on 1.7 / 1.9 adds an `integrity` line (known class).
12+
- Mode switch H→V→A→H→rollback on 1.7.0 and 1.9.4 (lock without `integrity`): pass; agent after vendored keeps vendored ownership.
13+
- `get <uuid> --mode hosted|vendored|agent` on a CRLF workspace lock (sibling on `~1.1.0`), 1.22.22, plus vendored on 1.7.0: pass, CRLF kept, sibling untouched, rollback byte-for-byte.
14+
- `yarn-path` → 1.6.0: H/A pass, V = #2511.
15+
- devDependency + `--frozen-lockfile --production` after a scan, H/V/A: pass (exit 0, left-pad skipped).
16+
- `yarn check`, `--integrity`, `--verify-tree` after a scan, H/V/A on 1.22.22 and ws 1.9.4: pass.
17+
18+
**Ruled out:** a harness artifact. Without a `.gitignore`, the fresh clones carried the committed `node_modules`, so yarn 1.6 (which installs nothing) looked like it installed an unpatched copy. Re-run with `node_modules/` ignored, it matches #2511 exactly.
19+
20+
**Next:** a #2511 fix check (incl. `yarn-path`), member-level rc / `engines.yarn`, nested `resolutions` paths, `--check-files` / `--force` after an agent apply.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,4 @@ entries/yarn-classic/20261017T080000Z.md
153153
- 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.
154154
- 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`).
155155
- 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.
156+
- Run-51 harness (2026-12-06): `scratchpad/bin/mock.py <left-pad tgz> 18080` (one self-contained file: batch / by-package / view with `blobContent` / `patches/package` grant with sha512+sha1 / hosted tgz / `blob/<hash>` / telemetry; query strings stripped), `cp.sh <mode> <yarnver> <shape>` (shapes: single / wsres / ypath / dev), `ms.sh` (mode switch), `get.sh` (get uuid on CRLF ws). **Write `.gitignore` with `node_modules/` before the first commit**, or the fresh clones carry the committed install and old yarns (which install nothing) look like "unpatched copy installed".

‎state/yarn-classic.md‎

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

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`).
3+
Last run: 2026-12-06 (run 51), main `cd7c5c5` (v5.2.0 + 2 gem-only commits), release v5.2.0, newest yarn classic 1.22.22 (no 1.x release since). Open `pm:yarn-classic` issues: #2511 (also via `.yarnrc yarn-path`, commented 2026-12-06), #2341 (still reproduces on `cd7c5c5`), #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-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.
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-51 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.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) |
11+
| Single dep, common path | pass 1.22.22 (2026-12-06), 1.0.2 / 1.10.1 (2026-12-04), 1.7.0 (2026-12-02) | pass 1.22.22 (2026-12-06), 1.7.0 / 1.10.1 (2026-12-04); 1.0.2 / 1.6.0 (and `yarn-path` → 1.6.0) install nothing, no warning: #2511 | pass 1.22.22 (2026-12-06), 1.0.2 / 1.10.1 (2026-12-04) |
12+
| `.yarnrc yarn-path` → yarn 1.6.0 release file (global 1.22.22) | pass 1.22.22 (2026-12-06) | fail #2511 (2026-12-06) | pass 1.22.22 (2026-12-06) |
13+
| devDependency + `--frozen-lockfile --production` | pass 1.22.22 (2026-12-06) | pass 1.22.22 (2026-12-06) | pass 1.22.22 (2026-12-06) |
14+
| `yarn check` / `--integrity` / `--verify-tree` after scan | pass 1.22.22, ws 1.9.4 (2026-12-06) | pass 1.22.22, ws 1.9.4 (2026-12-06) | pass 1.22.22 (2026-12-06) |
1215
| 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) |
1316
| 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) |
14-
| `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) |
17+
| `resolutions` forcing the patched version (single; + workspaces with members on `~1.1.0` / `^1.2.0`) | pass ws 1.7.0 / 1.9.4 / 1.22.22 (2026-12-06), single 1.7.0 / 1.10.1 / 1.22.22 (2026-11-26) | pass ws 1.7.0 / 1.9.4 / 1.22.22 (2026-12-06), single 1.7.0 / 1.10.1 / 1.22.22 (2026-11-26) | pass ws 1.7.0 / 1.9.4 / 1.22.22 (2026-12-06) |
1518
| `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) |
1619
| 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) |
20+
| Re-run idempotency + mode switch H→V→A→H→rollback | pass 1.7.0 / 1.9.4 (2026-12-06, lock without `integrity`), 1.22.22 (2026-12-04: re-run `applied`, `pinChanged: false`) | pass 1.7.0 / 1.9.4 (2026-12-06), 1.22.22 (2026-11-26) | pass (keeps vendored ownership) 1.7.0 / 1.9.4 (2026-12-06) |
21+
| `get <uuid> --mode X` on a CRLF workspace lock (sibling member on `~1.1.0`) | pass 1.22.22 (2026-12-06; CRLF kept, rollback byte-for-byte) | pass 1.7.0 / 1.22.22 (2026-12-06) | pass 1.22.22 (2026-12-06) |
1822
| `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) |
1923
| 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) |
2024
| 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,11 +32,11 @@ H = hosted (`scan --mode hosted`), V = vendored (`scan --mode vendored`), A = ag
2832

2933
## Backlog
3034

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.
35+
1. #2511 follow-up: if fixed, check the warning/refusal fires for `packageManager: yarn@1.0`–`1.6.x` and for `.yarnrc yarn-path` → a 1.0–1.6 release file, stays silent on 1.7.0+, and that hosted mode is still offered.
36+
2. `engines.yarn` / `.yarnrc yarn-path` in a workspace member (does the vendored wiring respect a member-level rc?).
37+
3. Re-run the CRLF / BOM, `npm:` alias and offline-mirror cells on main once a yarn-touching commit lands (all last passed 2026-12-04 on v5.2.0).
38+
4. `resolutions` with a nested path (`"**/left-pad"`, `"a/left-pad"`) on 1.7.0 / 1.22.22.
39+
5. `yarn install --check-files` and `--force` after an agent `apply` (does yarn restore unpatched bytes; does `apply` re-patch).
3640
6. `vex --grype-config` with a yarn project (needs grype; generic, low priority).
3741
7. #691 (`agent:needs-human`): leave it alone unless a maintainer comments.
3842

0 commit comments

Comments
 (0)