You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4ce496e
Browse filesBrowse the repository at this point in the historyBrowse files
[agent] 2026-11-28: Yarn classic (1.x) bug-hunt run
2
+
3
+
Run 48. Tested main `cfc870f` (the same SHA as run 47) against release v5.1.0, on Linux with Node 22 and yarn 1.7.0, 1.9.4, 1.10.1 and 1.22.22. The local mock patch API was rebuilt (see known-non-bugs "Run-48 harness"). Every result below is the same on v5.1.0, so there are no regressions.
4
+
5
+
**Re-triage:** the only open `pm:yarn-classic` issue was #691, which is `agent:needs-human`, so it was skipped.
6
+
7
+
**Filed:**#2341 (https://github.com/SocketDev/socket-patch/issues/2341). Standalone `vex` in a hosted project whose only pin is withheld (a git or `file:` copy installs beside it) says "no hosted or vendored patch references were found … Run `socket-patch scan` first" (`manifest_not_found`, exit 2). Re-running scan loops. `scan --vex` and the vendored version of the same shape correctly say `no_applicable_patches` / "No applied patches …" (exit 1). It's friction, not a wrong attestation, and it's the same on v5.1.0.
8
+
9
+
**Cells:** each one is a fresh-checkout frozen install on a cold cache, a check that the patched bytes load, `vex`, rollback and a second frozen install.
10
+
- Common path H/V/A on 1.7.0, 1.10.1 and 1.22.22: pass. H/V on 1.9.4 (a lock without `integrity`): pass.
11
+
- Git dep (alone, and as a member git copy beside a registry block) in H/V/A: pass. H skips with `redirect_yarn_classic_git_skipped`, and V refuses `vendor_lock_entry_not_rewritable` (exit 1) when git is the only copy. VEX withholds as the contract says.
12
+
-`file:` dir and `file:` tarball member copies beside a registry block, H/V: pass (`redirect_yarn_classic_directory_skipped` / `_non_registry_entry_skipped`, `vendor_link_entry_skipped`).
13
+
- An `integrity sha1-…` lock, and a `resolved` without a `#sha1` fragment, H/V: pass. Hosted rollback writes the registry's canonical `sha512` and `#sha1` back, and the frozen install still passes (known class).
14
+
-`yarn upgrade left-pad` / `yarn add left-pad@1.3.0` after H/V drop the pin, and socket-patch fails closed: `vendor --check` exits 1 with a working remedy, and `vex` omits the package. `yarn add left-pad@^1.3.0` keeps the pin.
15
+
- Offline mirror in user `~/.yarnrc`, project `.npmrc` and `YARN_YARN_OFFLINE_MIRROR`: hosted refuses `redirect_yarn_classic_offline_mirror` in all three. Agent mode with a project mirror plus pruning: pass, and the mirror tarball isn't touched.
16
+
- Global `-g`: hosted refuses `global_scope_unsupported` (exit 2). Agent applies and rolls back: pass.
17
+
- SIGKILL sweep of vendored and hosted `scan` (kills at 20–500 ms): the project is either untouched or fully wired. No dangling vendor paths, and the frozen install and re-scan recover every time.
18
+
19
+
**Backlog 1 resolved:** a hosted re-run reporting `applied` is family-wide (npm and pnpm do it too) and is handled by open PR #2307 (`details.pinChanged`). Nothing was filed or handed over.
20
+
21
+
**Ruled out:** hosted rollback on a `.yarnrc``registry` restores registry.yarnpkg.com (already a known non-bug, documented: `SOCKET_NPM_REGISTRY`).
22
+
23
+
**Next:** merge flows (two branches), BOM/CRLF with a git copy, and `vex --grype-config`.
- Run-47 harness (2026-11-26): `scratchpad/bin/mock.py <fx> 18080` (python stdlib mock of batch / by-package / view / blob / patches/package / hosted tarball for left-pad@1.3.0, patched tarball built from the registry tgz), `cp.sh <bin> <yarn> <mode> <dir> <shape>` (shapes single / ws / crlf / bom / alias / aliasboth / res), `batch.sh`, `switch.sh` (re-runs + mode switches), `mirror.sh`. Pass `--patch-server-url` = the mock so hosted pins are recognised; vendored mode uses the same `patches/package` grant. Yarn releases from `registry.yarnpkg.com/yarn/-/yarn-<v>.tgz`, run with `node <dir>/bin/yarn.js`.
144
144
- Hosted `scan` with an offline mirror refuses (`redirect_unconfirmed` + `redirect_yarn_classic_offline_mirror`); a following `rollback` exits 1 "Manifest not found" because there is nothing to roll back. Expected (run 47).
145
+
- Run-48 harness (2026-11-28): `scratchpad/bin/mock.py <fx> 18080` (org routes batch / by-package / view with blobContent / blob / patches/package grant with sha1 + sha512 / hosted tgz, the same shape as `e2e_redirect_yarn_classic_build.rs`), `mkfx.py` (builds the patched tgz from the registry left-pad 1.3.0), `cp.sh`, `git.sh`, `file.sh`, `sha1lock.sh`, `nofrag.sh`, `upg.sh`, `kill.sh`, `batch.sh <bin> <tag>`. Git over https to github.com works in the sandbox; codeload.github.com is 403.
146
+
- A hosted re-run that changes nothing reports `applied` in npm, pnpm and yarn alike. It's a family-wide design, handled by PR #2307 (`details.pinChanged`), so don't file it (run 48).
147
+
- Hosted rollback of a lock with `integrity sha1-…`, or a `resolved` without a `#sha1` fragment, writes the registry's canonical `sha512` / `#sha1` back. The frozen install passes; it's the same class as the < 1.10 `integrity` note (run 48).
148
+
-`yarn upgrade <pkg>` and an exact-version `yarn add` re-resolve a pinned or vendored block from the registry. That's yarn's own behavior, and socket-patch fails closed: `vendor --check` exits 1 "wiring missing … re-run `socket-patch vendor`", and vex omits the package (`vendor_unwired`) or exits 2 for hosted (run 48).
149
+
- Vendored `scan` exits 1 with `vendor_lock_entry_not_rewritable` when the only yarn.lock copy is a git dep. Hosted exits 0 with `redirect_yarn_classic_git_skipped`. Both are documented (run 48).
[agent] Progress ledger for the scheduled Yarn classic (1.x) bug-hunt routine (label pm:yarn-classic).
2
2
3
-
Last run: 2026-11-26 (run 47), main `cfc870f`, release v5.1.0, newest yarn classic 1.22.22 (no 1.x release since). Open `pm:yarn-classic` issues: #691only (`agent:needs-human`). Compacted this run: the old 82 KB state (per-run cells, harness notes, non-bugs) is in branch history before this commit; non-bugs and harness notes moved to `known-non-bugs/yarn-classic.md`.
3
+
Last run: 2026-11-28 (run 48), main `cfc870f`, 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 (filed run 48).
4
4
5
5
## Coverage matrix
6
6
7
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-47 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.
|`sha1-` integrity / `resolved` without `#sha1` / `yarn upgrade` after pin | pass 1.22.22 (2026-11-28; rollback writes canonical sha512 / #sha1) | pass 1.22.22 (2026-11-28; upgrade drop caught by `vendor --check`) | n/a |
25
26
| macOS / Windows | probes off; last results in history (run 31 / 18) | same | same |
26
27
27
28
## Backlog
28
29
29
-
1. Hosted re-run that changes nothing reports `applied: 1` (event `applied`, mode hosted, lock byte-identical), while vendored says `skipped already_vendored`. Same on v5.1.0. Since #2178 telemetry is derived from these events, so hosted pin counts may inflate. Check npm / pnpm hosted re-runs; if it's family-wide, hand it over to npm (not yarn-specific), else file.
30
-
2. Re-run the untested-since-11-11 rows above: git dep (H/V), merge flows, global `-g`, `file:` copies, SIGKILL.
31
-
3. Offline mirror in agent mode; user-level / env mirror refusal on main (#1013 / #1078 shapes); workspace member `.yarnrc` mirror (#1115 fixed).
32
-
4.`yarn upgrade left-pad` / `yarn add left-pad@^1.3.0` after vendored and hosted (does the pin or the vendored block survive, and does `vendor --check` notice?).
33
-
5.`integrity sha1-` locks and 1.9.4 (no `integrity` line) on main, H/V.
34
-
6. Friction: `vex` in a project whose only pin is skipped (alias + direct) says "No patches in this project … Run `socket-patch scan` first" (exit 2) right after a scan that pinned one copy. Decide whether that remedy misleads enough to file.
35
-
7. Yarn ≤ 1.6 vendored installs nothing (exit 0) and `vex` still attests from the lock. Known yarn limitation, not in user docs. Ask whether vendored mode should warn when `packageManager` names yarn ≤ 1.6.
36
-
8.#691 (`agent:needs-human`): leave alone unless a maintainer comments.
37
-
9. New on main: `vex --grype-config` with a yarn project (needs grype; generic, low priority).
30
+
1. Merge flows (two branches each vendoring or pinning), untested since 11-11 (runs 44–45 pass).
31
+
2. CRLF / BOM lock combined with a git or `file:` copy and a workspace, H/V.
32
+
3.#2341 follow-up: check whether npm or pnpm hosted shapes that withhold every reference give the same `manifest_not_found` vex remedy. If they do, comment on #2341 instead of filing.
33
+
4. Agent-mode SIGKILL during `apply`, and `repair` after it.
34
+
5. Yarn ≤ 1.6 vendored installs nothing (exit 0) while `vex` still attests from the lock. This is a known yarn limitation but not in the user docs. Decide whether vendored mode should warn when `packageManager` names yarn ≤ 1.6.
35
+
6.`vex --grype-config` with a yarn project (needs grype; generic, low priority).
36
+
7.#691 (`agent:needs-human`): leave it alone unless a maintainer comments.
38
37
39
38
## Known non-bugs
40
39
@@ -47,4 +46,5 @@ Full list: `known-non-bugs/yarn-classic.md` (search it with `git grep`). The one
47
46
- npm 7+ `npm install` in a yarn 1 project rewrites yarn.lock, so the frozen install still passes (#1629 context).
48
47
- yarn 1 `workspaces` ignore `!` patterns.
49
48
- Lock / ledger mixed merges fail closed (`vendor --check` / `rollback` exit 1); the remedy loop is the #1072 / #991 class.
49
+
-`yarn upgrade <pkg>` / an exact `yarn add <pkg>@<ver>` re-resolve and drop a hosted or vendored pin. socket-patch fails closed (`vendor --check` exit 1, vex omits).
50
50
-`vex --json` needs `--output`; `setup` and `scan --apply` were removed in v5 (use `--mode agent` + `apply`).
0 commit comments