Skip to content

Commit b7fce10

Browse files
committed
pnpm bug-hunt run 46
1 parent 44b6bb7 commit b7fce10

2 files changed

Lines changed: 51 additions & 4 deletions

File tree

‎entries/pnpm/20261016T133115Z.md‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[agent] 2026-10-16: pnpm bug-hunt run
2+
3+
**Tested:** main `657fce2` (unchanged since run 45; latest release still 5.0.1). Linux only, Node 22.22.0, pnpm 9.15.9, 10.34.7, 11.28.5 and 12.11.2. I rebuilt the local Python mock (registry plus org patch API) around a **scoped** patch target, `@sp/pad@1.0.0`, with alias wrappers: `wrap` (`pad-alias: npm:@sp/pad@1.0.0`), `swrap` (`@sp/padx: npm:@sp/pad@1.0.0`), `dep2` (`@sp/pad: 1.0.0`) and `dep0`. The oracle is the patched marker after a fresh `--frozen-lockfile` install.
4+
5+
### Re-triage
6+
- No pnpm-related commits landed since run 45, so I didn't re-run #1597, #935 or #1268.
7+
8+
### Issues
9+
- **Commented on #1597** (https://github.com/SocketDev/socket-patch/issues/1597#issuecomment-6216583063): on pnpm 12.11.2, an explicit **denial**, `allowBuilds: {"@sp/pad": false}`, also stops matching after a vendored scan, so every frozen install fails `ERR_PNPM_IGNORED_BUILDS` (2/2 runs).
10+
- The scan exits 0 with no warning.
11+
- 11.28.5 with the same denial passes. So do 10.34.7 (`neverBuiltDependencies`, `ignoredBuiltDependencies` + `strictDepBuilds`) and 9.15.9.
12+
- A full-spec `false` key recovers.
13+
- Hosted mode passes on 11 and 12.
14+
- Nothing filed, nothing closed.
15+
16+
### Cells
17+
- Hosted, scoped alias target (direct, transitive, and transitive under a scoped alias name): pin, fresh frozen install, `vex`, then rollback (byte-exact) on 9 and 12; pin and fresh frozen install on 10 and 11. **Pass.**
18+
- A root alias reusing the patched name (`"@sp/pad": "npm:dep0@1.0.0"` / `"npm:@sp/pad@1.0.1"`) beside a plain transitive `@sp/pad@1.0.0`, hosted and vendored, on 9 and 12: **pass**. The root alias keeps its own target, and only `dep2`'s copy is patched.
19+
- #1557 member path (`sharedWorkspaceLockfile: false`) with the env var set to `""` and to `undefined`, on 11 and 12: **pass**.
20+
- Docker `pnpm fetch` then `install --offline --frozen-lockfile`: hosted **pass** on 9, 10 and 12. On vendored, `fetch` fails loudly before the source is copied (a new known non-bug), and the offline install passes.
21+
- Build denials: see above.
22+
23+
### False positives ruled out
24+
- Vendored refusals over my first alias-reuse fixture came from `wrap`'s own transitive alias. That's the documented `vendor_lock_entry_unsupported` refusal, and a dep-free target (`dep0`) vendors fine.
25+
- `package.json` reformatted after vendor + rollback: the known cosmetic compact-JSON entry.
26+
- 9/10 base installs failed `ERR_PNPM_TARBALL_INTEGRITY` after I changed the mock's tarball: a stale `~/.cache/pnpm` metadata cache. Clearing it fixed them.
27+
- My first by-package mock route didn't match the double-encoded scoped purl (`%2540sp`).
28+
29+
### Blocked
30+
- No probe branches. The stale `bughunt/pnpm/20260930-virtual-store` branch still needs a maintainer.
31+
32+
### Next
33+
1. #1597 follow-ups: `dangerouslyAllowAllBuilds`, a transitive build package, and a supersede.
34+
2. Agent mode over the member alias fixture.
35+
3. A nested independent project inside a Rush repo, and on pnpm 10.
36+
4. Re-verify the #1007 fixes: #435 (`-g` on 11/12), #713 / #714 (Rush), #830, #853, #1006.
37+
5. `prefer-offline` with a warm store after a hosted pin.

‎state/pnpm.md‎

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

3-
Last updated: 2026-10-16 (run 45), main `657fce2`, latest release 5.0.1. (main was force-pushed before runs 39, 43, 44 and 45, so older SHAs in this ledger may not resolve any more.)
3+
Last updated: 2026-10-16 (run 46), main `657fce2`, latest release 5.0.1. (main was force-pushed before runs 39, 43, 44 and 45, so older SHAs in this ledger may not resolve any more.)
44

55
Method: real pnpm installs. Hosted, vendored and global agent mode run against a local Python mock of the patch API (the batch and by-package routes must answer only for the purls they actually serve, or an upgraded tree looks like a failure; batch, by-package, view with inline blobs, `patches/blob/<hash>`, package grant, hosted tarball, `/registry/<name>/<ver>` mirror; `ajv-keywords@3.5.2` serves as the peer-dependency package). On v5, set `SOCKET_PATCH_SERVER_URL=<mock>` and `SOCKET_NPM_REGISTRY=<mock>/registry` so that hosted pins are recognised and rollback can restore upstream. The oracle is a marker prepended to `index.js`, checked after a fresh `--frozen-lockfile` install against a dead registry, or by running the global tool. The repo's pinned matrix (`.github/workflows/pnpm-compatibility.yml`) already covers plain hosted and vendored installs on pnpm 1–12. This ledger tracks what it doesn't.
66

@@ -491,15 +491,24 @@ Run 45 additions (main `657fce2`, release 5.0.1, Linux, Node 22.22.0; mock regis
491491
| 11.28.5 | pass | fail #1597 (`ERR_PNPM_IGNORED_BUILDS`, exit 1) | pass (trust key written, dead-registry frozen install patched) |
492492
| 12.11.2 | pass | fail #1597 (`ERR_PNPM_IGNORED_BUILDS`, exit 1); `rollback` recovers | pass |
493493

494+
Run 46 additions (main `657fce2`, release 5.0.1, Linux, Node 22.22.0; mock registry with the scoped patch target `@sp/pad@1.0.0` (plus an unpatched `@sp/pad@1.0.1`), `wrap@1.0.0` → `"pad-alias": "npm:@sp/pad@1.0.0"`, `swrap@1.0.0` → `"@sp/padx": "npm:@sp/pad@1.0.0"`, `dep2@1.0.0` → `"@sp/pad": "1.0.0"`, and `dep0@1.0.0` with no dependencies; for the build cells `@sp/pad@1.0.0` has a `postinstall` writing `built.txt`):
495+
496+
| pnpm | Hosted: scoped alias *target*, transitive (`wrap`), transitive with a scoped alias name (`swrap`), direct (`my-pad: npm:@sp/pad@1.0.0`): pin → fresh frozen → vex → rollback | Root alias that reuses the patched name: `"@sp/pad": "npm:dep0@1.0.0"` / `"npm:@sp/pad@1.0.1"`, plus `dep2` → `@sp/pad@1.0.0`: hosted / vendored | #1557 member path (`sharedWorkspaceLockfile: false`), env `""` / `undefined` | Docker `pnpm fetch` (lock + workspace file only) → copy source → `install --offline --frozen-lockfile` | Explicit build denial, vendored → fresh frozen (#1597 follow-up) | Same, hosted |
497+
| --- | --- | --- | --- | --- | --- | --- |
498+
| 9.15.9 | pass ×3 (rollback byte-exact; vex attests) | pass / pass (root alias keeps its own target; `dep2` gets patched bytes) | n/a | hosted pass; vendored `fetch` fails loudly (ENOENT, tarball not copied yet), the offline install then passes | `neverBuiltDependencies`: pass | untested |
499+
| 10.34.7 | pass ×3 | untested | n/a | hosted pass; vendored as on 9 | `neverBuiltDependencies` (± `strictDepBuilds`) and `ignoredBuiltDependencies` + `strictDepBuilds`: pass | untested |
500+
| 11.28.5 | pass ×3 (fresh frozen only) | untested | pass (root `trustLockfile: true` written; member frozen install patched) | untested | `allowBuilds: {"@sp/pad": false}`: pass (2/2) | pass |
501+
| 12.11.2 | pass ×3 | pass / pass | pass | hosted pass; vendored `fetch` fails loudly (`ERR_PNPM_TARBALL_READ_LOCAL_TARBALL`), the offline install then passes | `allowBuilds: {"@sp/pad": false}`: **fail, #1597 comment** (`ERR_PNPM_IGNORED_BUILDS` naming the `file:` spec, 2/2) | pass |
502+
494503
## Backlog
495504

496-
0ab. **#1597** (vendored pnpm ≥ 10.34.2 breaks build approvals for the `file:` tarball): re-verify once fixed on 10.34.7 / 11 / 12. Follow-ups: `neverBuiltDependencies`, `dangerouslyAllowAllBuilds`, a transitive build package, a supersede (the uuid in an approval key changes), pnpm 11 `allowBuilds` set to `false` for a vendored package, and the pnpm 10.34.2 changelog to cite the upstream change. Also check whether `vex` should stay honest about an unbuilt native addon.
505+
0ab. **#1597** (vendored pnpm ≥ 10.34.2 breaks build approvals for the `file:` tarball): re-verify once fixed on 10.34.7 / 11 / 12. Denials done in run 46 (12 breaks with `allowBuilds: false`, commented; 9/10/11 pass). Still to do: `dangerouslyAllowAllBuilds`, a transitive build package, a supersede (the uuid in an approval key changes), and the pnpm 10.34.2 changelog to cite the upstream change. Also check whether `vex` should stay honest about an unbuilt native addon.
497506

498507
0w. #1460 is verified fixed (run 40, all 16 env × major cells). Still to do: the `gitBranchLockfile` env variant on 12 after the fix, and the #1437 refusal over a `configDependencies` two-document lock.
499508
0x. #935: hosted half fixed by #1469 (run 41, 8/9/10/12). Still open for the vendored scan warning; re-verify once fixed. Was: **#935 regression** (hosted silent pin over a `file:` copy, first bad f3c6313a): re-verify once fixed, also for `git+` copies. #1268 still reproduces on 12.11.2 (run 39).
500-
0y. #1266 / #1494: scoped alias, custom virtualStoreDir and member rollback done in run 41 (pass). Transitive alias done in run 42. A transitive alias in a workspace member, including a scoped alias name, was done in run 44 (hosted 9/10/11/12 pass). Still to do: a scoped alias *target* (`npm:@scope/x@…`, which needs a scoped patched package in the mock), and agent mode over the member fixture.
509+
0y. #1266 / #1494: scoped alias, custom virtualStoreDir and member rollback done in run 41 (pass). Transitive alias done in run 42. A transitive alias in a workspace member, including a scoped alias name, was done in run 44 (hosted 9/10/11/12 pass). A scoped alias *target* (direct, transitive, scoped alias name) and root aliases that reuse the patched name were done in run 46 (hosted 9/10/11/12 pass; vendored refuses transitive aliases as documented). Still to do: agent mode over the member fixture.
501510
0v. #1514 verified fixed on 11.28.3 (run 43). Still to do: the `--no-trust-lockfile-config` and Rush texts with the env set.
502-
0u. #1557 is verified fixed on `657fce2` (run 45): the root path on 11.28.5 / 12.11.2 with `""` and `undefined` writes the trust key, and the dead-registry frozen install lands the patch. Still to do: the member path (`sharedWorkspaceLockfile: false`) on 11/12 after the fix.
511+
0u. #1557 is verified fixed on `657fce2` (run 45): the root path on 11.28.5 / 12.11.2 with `""` and `undefined` writes the trust key, and the dead-registry frozen install lands the patch. The member path (`sharedWorkspaceLockfile: false`) on 11/12 also passes (run 46). Done.
503512
0t. #1534 follow-up (`nested_project_skipped`, fc1b4f9): a `sharedWorkspaceLockfile: false` member passes (run 43). An independent nested project under a pnpm root passed in run 44 (hosted 9/12, vendored 11/12). Still to do: a nested project inside a Rush repo, and on pnpm 10.
504513
0z. Post-#1007 follow-ups: #734's gate when `.modules.yaml` names pnpm 9 but a pnpm 11 CI installs (expect a loud `ERR_PNPM_TARBALL_URL_MISMATCH` plus the warning); #556 with `mergeGitBranchLockfilesBranchPattern` on main; and re-verifying #435, #713, #830, #853 and #1006 from the list in item 9.
505514
00a. #1050 GC follow-ups: `scan --prune` over a peer-suffixed vendored snapshot and over Rush / subspace locks. (`sharedWorkspaceLockfile: false` member: vendored now refuses `vendor_pnpm_settings_elsewhere` on 10.34.6 too, by design. #1029 `modulesDir` / `virtualStoreDir` and `unpinned` rows: done in run 34.)
@@ -591,6 +600,7 @@ Run 45 additions (main `657fce2`, release 5.0.1, Linux, Node 22.22.0; mock regis
591600
- `pnpm dedupe` re-resolves and drops hosted pins on every pnpm version (like `pnpm update`). pnpm 11.0.0 / 11.28.3 `pnpm add <other>` also drops them (9 / 10 / 12 keep them). That's upstream pnpm 11 re-resolution, tracked with #713.
592601
- `repair` in the default diff mode needs `/v0/orgs/<org>/patches/diff/<uuid>` archives. A mock without them gives `download_failed`; use `--download-mode file` with a blob route.
593602
- pnpm 11 / 12 `pnpm fetch` with only `pnpm-lock.yaml` copied (no `pnpm-workspace.yaml`) fails loudly with `ERR_PNPM_TARBALL_URL_MISMATCH`. Commit and copy the trust config, as documented.
603+
- Vendored: a Docker-style `pnpm fetch` from a layer that has only `pnpm-lock.yaml` (and the workspace file) fails loudly on 9 / 10 / 12 (ENOENT / `ERR_PNPM_TARBALL_READ_LOCAL_TARBALL`), because the `file:.socket/vendor/...tgz` tarball isn't in that layer yet. Any local `file:` tarball dependency does the same, and the `install --offline --frozen-lockfile` after copying the source passes with patched bytes. Copy `.socket/vendor` into the fetch layer (run 46).
594604
- Hosted standalone `vex` attests an optional dependency that isn't installed on this OS (for example `fsevents` on Linux) from its lock pin. That's the documented manifest-less attestation ("nothing installed → attests from the pin").
595605
- pnpm 11 / 12 fail `ERR_PNPM_IGNORED_BUILDS` for `esbuild` even on the first install, unless builds are allowed. That's upstream; the patched bytes still land.
596606
- `pnpm update <pkg>` drops the hosted pins of every package it re-resolves (pnpm 12 also re-resolves the package's dependents), like `pnpm update`.

0 commit comments

Comments
 (0)