Skip to content

Commit 74a9693

Browse files
committed
pnpm bug-hunt run 60
1 parent 3879ac1 commit 74a9693

2 files changed

Lines changed: 41 additions & 13 deletions

File tree

‎entries/pnpm/20261206T010752Z.md‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[agent] 2026-12-06: pnpm bug-hunt run
2+
3+
**Tested:** main `cd7c5c5` (unchanged since run 59), release v5.2.0, Linux, Node 22. pnpm 12.27.0 (`next-12`), 11.29.0, 10.34.9, 9.15.9. No new pnpm release since the last run.
4+
5+
### Re-triage
6+
- #2264, #2298: no commit or open PR touches them since `cd7c5c5`. Still open; not re-run.
7+
8+
### Cells (Linux)
9+
- **Agent, store-liveness walk (backlog 1): pass on 9.15.9 / 10.34.9 / 11.29.0 / 12.27.0.**
10+
- `pnpm install --frozen-lockfile --filter a` (partial install), then `apply --offline`: vex attests. `--filter b` afterwards links b to the patched virtual-store entry. `apply --check` is idle.
11+
- `pnpm add left-pad@1.2.0` in one member keeps vex attesting the other member's patched 1.3.0. With every 1.3.0 user removed, vex says `package_not_found`. After a re-add from the store, vex says `not_applied` with the right remedy (10/11/12; pnpm 9 keeps the patched `.pnpm` entry, and vex is correct on 9 too). The CAS store held no patched bytes in any version.
12+
- Member outside the root (`packages: ['../shared']`) on 12.27.0: apply / vex / byte-exact rollback pass.
13+
- **Hosted, `sharedWorkspaceLockfile: false` (backlog 2): pass on 12.27.0 / 11.29.0 / 10.34.9.** Root `host`, member `a` → `mid` → `leaf`, member `b` → `peer-user` (peer `host`).
14+
- 11/12: the registry route is written to the workspace file and to every member lock. `pnpm install --lockfile-only --offline` re-locks the root and both member locks byte-identically (12.27.0).
15+
- 10.34.9: takes the trustLockfile path.
16+
- On all three, a fresh frozen install from an empty store lands patched bytes in both members, and vex attests both advisories. Rollback leaves no `socket-` entry in any lock, and the next frozen install is upstream. On 10 rollback leaves `trustLockfile: true` (known, `pnpm_trust_lockfile_left`).
17+
- **Hosted CRLF-shebang bin (backlog 3): pass on 10.34.9 / 11.29.0 / 12.27.0.** `leaf` bin `#!/usr/bin/env node\r\n` as a transitive dependency and as a direct one. Frozen install keeps CRLF, the bin runs, vex attests, rollback is clean.
18+
- Method note: hosted cells ran a local, uncommitted probe test in `e2e_redirect_pnpm_build.rs` that reuses `mount_route_registry` / `mount_route_patch_server`, with `SOCKET_PATCH_PNPM_E2E_BIN` pointed at an npm-installed pnpm binary.
19+
20+
### Issues
21+
- None filed, none closed or commented.
22+
23+
### False positives ruled out
24+
- First hosted probe on pnpm 12 failed at the fixture install: corepack's pnpm 12 downloads `@pnpm/exe` from the project's `.npmrc` registry (the mock), which returns 404. Harness artifact; use `SOCKET_PATCH_PNPM_E2E_BIN`.
25+
- The in-place `vex` right after a hosted scan exits 1 with `not_applied` until the reinstall the scan asks for. This is documented.
26+
27+
### Next
28+
1. Hosted scoped package (`@scope/leaf`) through the registry route on 11.29 / 12.27.
29+
2. Vendored lock-off with a `packageManager` pin that differs from `.modules.yaml`.

‎state/pnpm.md‎

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[agent] Progress ledger for the scheduled pnpm bug-hunt routine (label pm:pnpm).
22

3-
Last run: 2026-12-05 (run 59), main `cd7c5c5` (v5.2.0 tagged at `d987721`; since then gem-only commits), release v5.2.0, newest pnpm 12.27.0 (`next-12`; `latest` 12.26.0; 11.29.0, 10.34.9, 9.15.9, 8.15.9, 7.33.7 latest per major).
3+
Last run: 2026-12-06 (run 60), main `cd7c5c5` (v5.2.0 tagged at `d987721`; since then gem-only commits), release v5.2.0, newest pnpm 12.27.0 (`next-12`; `latest` 12.26.0; 11.29.0, 10.34.9, 9.15.9, 8.15.9, 7.33.7 latest per major).
44

5-
Method (since run 51): agent = real npmjs packages + hand-staged `.socket/` + `apply --offline` (stage only the after blob, so offline rollback of an applied patch needs the before blob too); vendored = local uncommitted test that starts `prebuilt_common::Server::project` and exports `SOCKET_VENDOR_URL` (running the issue-embedded mock is blocked by the sandbox); hosted = `e2e_redirect_pnpm_build pnpm_pinned_matrix` with `SOCKET_PATCH_PNPM_E2E_BIN`. Vendored lock-off cells (run 58): vendor via the fixture server, copy the committable files, mutate the config, install from an empty store, then `vex --offline -O` (`-o` is `--org`). Earlier method: real pnpm installs on Linux against a local Python stand-in for the patch server and npm registry, modeled on the registry-route legs of `crates/socket-patch-cli/tests/e2e_redirect_pnpm_build.rs` (packages `leaf`, `mid`→`leaf`, `host`, `peer-user` (peer `host`, dep `leaf`); patches A=`leaf` uuid `aaaaaaaa-…`, B=`peer-user` uuid `bbbbbbbb-…`, grants with `npmRegistryUrl`). The script is embedded in #2263. Set `SOCKET_PATCH_SERVER_URL` and `SOCKET_NPM_REGISTRY` to the mock, strip proxy env for pnpm 12, use `--store-dir` per step. Oracle: marker at the top of `index.js` after a fresh-clone `--frozen-lockfile` install from an empty store. Release focus: cells last tested before 2026-11-11 count as untested.
5+
Method (since run 51): agent = real npmjs packages + hand-staged `.socket/` + `apply --offline` (stage only the after blob, so offline rollback of an applied patch needs the before blob too); vendored = local uncommitted test that starts `prebuilt_common::Server::project` and exports `SOCKET_VENDOR_URL` (running the issue-embedded mock is blocked by the sandbox); hosted = `e2e_redirect_pnpm_build pnpm_pinned_matrix` with `SOCKET_PATCH_PNPM_E2E_BIN` (an npm-installed pnpm binary; corepack's pnpm 12 fetches itself from the mock registry and fails), or a local probe test reusing `mount_route_registry` / `mount_route_patch_server`. Vendored lock-off cells (run 58): vendor via the fixture server, copy the committable files, mutate the config, install from an empty store, then `vex --offline -O` (`-o` is `--org`). Earlier method: real pnpm installs on Linux against a local Python stand-in for the patch server and npm registry, modeled on the registry-route legs of `crates/socket-patch-cli/tests/e2e_redirect_pnpm_build.rs` (packages `leaf`, `mid`→`leaf`, `host`, `peer-user` (peer `host`, dep `leaf`); patches A=`leaf` uuid `aaaaaaaa-…`, B=`peer-user` uuid `bbbbbbbb-…`, grants with `npmRegistryUrl`). The script is embedded in #2263. Set `SOCKET_PATCH_SERVER_URL` and `SOCKET_NPM_REGISTRY` to the mock, strip proxy env for pnpm 12, use `--store-dir` per step. Oracle: marker at the top of `index.js` after a fresh-clone `--frozen-lockfile` install from an empty store. Release focus: cells last tested before 2026-11-11 count as untested.
66

77
## Coverage matrix
88

@@ -18,27 +18,26 @@ One row per workflow; "≤10-18" = last passed by 2026-10-18 on 5.0.x/main of th
1818
| Vendored with lockfile off (#2441): `.npmrc` / `package-lock=false` / ws `lockfile: false`, override in pkg / ws / both, own `resolutions` / `pnpm.overrides`, `{}` / `null` | n/a | pass 9.15.9 / 10.4.1 / 10.5.0 / 10.5.1 / 10.34.9 / 11.29.0 / 12.26.0: vex attests exactly when pnpm installs the patched bytes (12-04) | n/a |
1919
| Mixed modes per patch (hosted B + vendored A); git-hosted parent of vendored pkg | untested | hosted/vendored pair refused, pass 12.23.0 (#2263 fixed, 12-01); git parent fail #2391 on 12.23.0 / 12.25.1 (pass 12.22.0); registry tarball-URL parent pass | refusal pass 12.23.0 (12-01) |
2020
| Takeover hosted → vendored | n/a | partial: peer-suffixed refusal (known), then #2263 on 12.23 | — |
21-
| Workspaces / `sharedWorkspaceLockfile: false` / member locks | shared lock, 2 members + transitive copy: apply / `--check` / vex / re-run idle / `remove` / byte-exact rollback pass 10.34.9 / 11.29.0 / 12.25.1 (12-03); per-member locks untested | shared lock pass 12.23.0 (11-27); per-member from root: #2298 (9.15.9 / 10.34.9 `.npmrc` + ws file / 12.23.0, 11-28); member dir refusal pass | untested (≤10-18) |
21+
| Workspaces / `sharedWorkspaceLockfile: false` / member locks | shared lock, 2 members + transitive copy pass 10.34.9 / 11.29.0 / 12.25.1 (12-03); `--filter` partial installs, re-add after removal, store clean pass 9.15.9 / 10.34.9 / 11.29.0 / 12.27.0 (12-06); member outside root (`../shared`) pass 12.27.0 (12-06) | shared lock pass 12.23.0 (11-27); per-member from root: #2298 (9.15.9 / 10.34.9 `.npmrc` + ws file / 12.23.0, 11-28); member dir refusal pass | unshared member locks pass 12.27.0 / 11.29.0 (route, re-lock identical) / 10.34.9 (trust) (12-06) |
2222
| Global virtual store / custom virtualStoreDir / hoisted | GVS refusal + remedy, hoisted pass 11.29.0 / 12.23.0 (11-27) | hoisted pass 12.23.0 (11-27) | untested (≤10-18) |
2323
| Legacy locks (shrinkwrap.yaml, 5.x, 6.0) on pnpm 2–8 | n/a (agent ignores the lock) | pass pinned matrix 7.33.7 / 8.15.9 (11-28); pnpm 1–6 untested | pass pinned matrix incl. workspace peer instances 7.33.7 / 8.15.9 (11-28); pnpm 1–6 untested |
2424
| Rush / subspaces | untested (≤10-18) | n/a | untested (≤10-18) |
2525
| `patchedDependencies`, aliases, peer-suffixed, injected | patchedDependencies: `user_patch_conflict` refusal, `--allow-patch-conflicts` apply + vex, store clean pass 10.34.9 / 12.23.0 (11-28); `npm:` aliases (alias + direct, alias-only) apply / vex / rollback pass 12.23.0 (11-29); injected (`dependenciesMeta`) apply / check / vex pass 12.23.0 (11-30); peer-suffixed instances (react 17 / 18), also with `virtualStoreDirMaxLength: 40` hashed entry names: both copies patched, store clean, vex, byte-exact rollback pass 10.34.9 / 12.25.1 (12-03); variants reached from different importers: phantom `already_patched` / `already_original` events #2495 (10.34.9 / 12.26.0, also on v5.1.0); `link:` dep with its own `node_modules` pass 12.26.0 (12-04) | injected pass 11.29.0 / 12.23.0, 10.34.9 upstream lock bug (11-30); rest untested (≤10-18) | untested (≤10-18) |
2626
| Build approvals (`allowBuilds`, `onlyBuiltDependencies`) | n/a | pass 10.30.0 / 10.34.9 / 11.5.2 / 11.5.3 / 11.29.0 / 12.23.0: block, quoted, `name@ver` keys, CRLF file, `package.json#pnpm`; flow style gives `vendor_pnpm_build_approval_lost` and its remedy works (11-28); `allowBuilds` 12.26.0 (12-02) | pass 12.27.0 / 11.29.0 (12-05): transitive, member, member-transitive built package; keys `name`, `name@ver`, `name@a || b`; denial; flow / own `overrides` of it / mixed true+false fall back to trust with a reason; BOM / CRLF workspace file. 12.25.1 (12-02, #2420): pins by `packageManager` / `devEngines` / `engines`, `name@ver` key, denial, CRLF + `packages:`, quoted key, comments, 4-space indent; 12.26.0 official legs |
27-
| CRLF-shebang bins (#1756 family) | fail #2352 on 12.x (pnpm 12 keeps CRLF; rollback rewrites / not byte-exact, `apply --check` false fail); pass 9.15.9 / 10.34.9 / 11.0.0 / 11.29.0 apply, vex, byte-exact rollback (11-29) | pass registry pkg 10.34.9 / 11.29.0 / 12.23.0: vendor, re-run, `--check`, vex (source + fresh frozen), bin runs, revert (11-30) | untested |
27+
| CRLF-shebang bins (#1756 family) | fail #2352 on 12.x (pnpm 12 keeps CRLF; rollback rewrites / not byte-exact, `apply --check` false fail); pass 9.15.9 / 10.34.9 / 11.0.0 / 11.29.0 apply, vex, byte-exact rollback (11-29) | pass registry pkg 10.34.9 / 11.29.0 / 12.23.0: vendor, re-run, `--check`, vex (source + fresh frozen), bin runs, revert (11-30) | pass transitive + direct bin 10.34.9 / 11.29.0 / 12.27.0: CRLF kept, bin runs, vex, clean rollback (12-06) |
2828
| `-g` global install | untested (≤10-18, Linux only) | n/a | n/a |
2929
| macOS / Windows | probes switched off (INSTRUCTIONS.md) | — | — |
3030

3131
## Backlog
3232

33-
1. #2353 store-liveness walk, rest: `pnpm install --filter` partial installs, a member outside the root (`../shared`), after `pnpm add` of another version (`link:` dep passed in run 58).
34-
2. Hosted route edge shapes on 12.27.0 / 11.29.0: `sharedWorkspaceLockfile: false` members, scoped package, a pin that drops below 11.20 (build approvals and user `overrides` passed run 59).
35-
3. Hosted CRLF-shebang bin on 11.29.0 / 12.27.0.
36-
4. Vendored lock-off with a `packageManager` pin that differs from `.modules.yaml` (10.4.1 pin, 10.34.9 installed, and a pnpm 11 pin), a contract case not run yet.
37-
5. Re-verify #2264, #2298, #2352, #2391, #2495 once a fix lands (none merged as of `cd7c5c5`).
38-
6. Re-verify closed #1619 (hosted scoped `tarball:` rollback on 12.0–12.12) on main with real pnpm.
39-
7. Pinned matrix for pnpm 1–6 (needs Node 10 / 16) on main; pnpm 7/8 vendored moved checkout.
40-
8. Rush / subspace locks on 12.27, `--frozen-lockfile` / `--offline`.
41-
33+
1. Hosted scoped package (`@scope/name`) through the registry route on 11.29 / 12.27 (check how the patch service spells a scoped registry path first).
34+
2. Vendored lock-off with a `packageManager` pin that differs from `.modules.yaml` (10.4.1 pin, 10.34.9 installed, and a pnpm 11 pin), a contract case not run yet.
35+
3. Hosted route with a pin that drops below 11.20 after the scan (`packageManager` downgrade), then `pnpm install`.
36+
4. Re-verify #2264, #2298, #2352, #2391, #2495 once a fix lands (none merged as of `cd7c5c5`).
37+
5. Re-verify closed #1619 (hosted scoped `tarball:` rollback on 12.0–12.12) on main with real pnpm.
38+
6. Pinned matrix for pnpm 1–6 (needs Node 10 / 16) on main; pnpm 7/8 vendored moved checkout.
39+
7. Rush / subspace locks on 12.27, `--frozen-lockfile` / `--offline`.
40+
8. Agent `-g` global install on 12.27.
4241

4342
## Known non-bugs
4443

0 commit comments

Comments
 (0)