Skip to content

Commit 084dcc5

Browse files
committed
pnpm bughunt run 51: agent/vendored common path, #2263 git-parent, #2298
1 parent 87ea590 commit 084dcc5

3 files changed

Lines changed: 52 additions & 14 deletions

File tree

‎entries/pnpm/20261127T010235Z.md‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[agent] 2026-11-27: pnpm bug-hunt run
2+
3+
**Tested:** main `cfc870f` (unchanged since the last run), release v5.1.0, Linux, Node 22.23.5. pnpm 9.15.9, 10.34.9, 11.29.0, 12.22.0 and 12.23.0. No new pnpm release (`next-12` is 12.24.0, not latest).
4+
5+
**Method change:** this sandbox blocks running a script copied out of an issue body, so the Python mock embedded in #2263 is no longer used. Agent mode now runs offline against real npmjs packages with a hand-staged `.socket/`. Vendored mode uses a local, uncommitted copy of a test that starts the repo's `prebuilt_common::Server::project` fixture and exports `SOCKET_VENDOR_URL`. (`--vendor-source build` was removed, so vendoring needs a server.) Hosted mode was covered through `e2e_redirect_pnpm_build pnpm_pinned_matrix` only.
6+
7+
### Re-triage
8+
- #2263 and #2264 are still open on an unchanged main, so I didn't re-check them. #2263 is claimed by a fixer.
9+
10+
### Issues
11+
- Commented on **#2263** (https://github.com/SocketDev/socket-patch/issues/2263#issuecomment-7206936374). The same pnpm 12.23.0 `ERR_PNPM_LOCAL_SUBDEP_NOT_ALLOWED` also breaks a **vendored-only** project when a git-hosted dependency depends on the vendored package. I tried `mkdirp` as both `github:isaacs/node-mkdirp#v0.5.5` and `git+https://…`, with vendored `minimist@1.2.8`.
12+
- `vendor` exits 0, then every install fails on 12.23.0. I reproduced it 2×.
13+
- 12.22.0 and 11.29.0 pass, and so does a registry tarball-URL parent on 12.23.0.
14+
- Filed **#2298** (https://github.com/SocketDev/socket-patch/issues/2298). In a `sharedWorkspaceLockfile: false` workspace, `vendor` run from the root fails with `vendor_lock_entry_not_found`, "make sure the package is installed and locked (`pnpm install`)". That remedy is a no-op, because the package is in the member's own lock. The member directory gets the right refusal (`vendor_pnpm_settings_elsewhere`, use `--mode hosted`). Reproduced on 11.29.0 and 12.23.0.
15+
16+
### Cells (Linux)
17+
- Agent common path, 9.15.9 / 10.34.9 / 11.29.0 / 12.23.0: **pass** for all of these:
18+
- `apply --offline` patches the project;
19+
- the warm store holds no patched bytes;
20+
- re-apply is idempotent;
21+
- a fresh-clone frozen install is upstream, and `apply` re-patches it;
22+
- `vex` gives `not_affected`;
23+
- `rollback` is byte-exact and drops the manifest entry;
24+
- the post-rollback frozen install works.
25+
- Agent with `enableGlobalVirtualStore: true`, 11.29.0 / 12.23.0: the documented refusal, with the other project and the store untouched. I followed the remedy (set the setting to false and reinstall), then `apply` patched only this project: **pass**.
26+
- Agent with `nodeLinker: hoisted`, 11.29.0 / 12.23.0: patched, with the sibling project and the store clean: **pass**.
27+
- Repo pinned matrix (`e2e_redirect_pnpm_build` + `e2e_vendor_pnpm_build pnpm_pinned_matrix`), 9.15.9 / 10.34.9 / 11.29.0 / 12.23.0: **pass**. That covers the hosted install, VEX, rollback and integrity rejection, the vendored capstone, and manifest-less VEX. CI pins only 11.27.0 / 12.4.2.
28+
- Vendored via the fixture server, 12.23.0:
29+
- direct dependency: fresh frozen install patched, re-lock clean, `vex`, revert byte-exact: **pass**;
30+
- shared-lock workspace member dependency: **pass**;
31+
- `nodeLinker: hoisted`: **pass**;
32+
- registry tarball-URL parent: **pass**;
33+
- git parent: **fail**, #2263 comment.
34+
35+
### False positives ruled out
36+
- `rollback` empties the manifest. That's by design: the patch is removed, and the output says so.
37+
- `vendor --offline` says `vendor_service_offline_conflict`, and `--vendor-source build` is rejected. Both are by design since local construction was removed.

‎known-non-bugs/pnpm.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,4 @@ One line per ruled-out finding. Moved here from state/pnpm.md when it was compac
113113
- `pnpm update` with `packageManager: pnpm@12.x` asks the configured registry for `/pnpm`; a mock without it makes `update` exit 1. Mock gap (2026-11-26).
114114
- Hosted `rollback` of a project whose `pnpm-workspace.yaml` was the user's own keeps `trustLockfile: true` with the `pnpm_trust_lockfile_left` warning (re-confirmed 12.23.0, catalog workspace, 2026-11-26).
115115
- A hosted → vendored takeover (`scan --mode vendored`) refuses a peer-suffixed hosted snapshot (`peer-user@1.0.0(host@1.0.0)`) as "not supported yet" and leaves it hosted; documented lock-shape limit. On pnpm 12.23 the resulting mix then trips #2263 (2026-11-26).
116+
- Agent `rollback` removes the patch from `.socket/manifest.json` and frees its blobs ("Removed 1 patch from manifest"): by design, not data loss (run 51).

‎state/pnpm.md‎

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

3-
Last run: 2026-11-26 (run 50), main `cfc870f`, release v5.1.0, newest pnpm 12.23.0 (11.29.0, 10.34.9, 9.15.9 latest per major). Compacted this run from 95 KB; the per-run history is in this file's git history and in `entries/pnpm/`.
3+
Last run: 2026-11-27 (run 51), main `cfc870f`, release v5.1.0, newest pnpm 12.23.0 (11.29.0, 10.34.9, 9.15.9 latest per major; 12.24.0 on `next-12`).
44

5-
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`; 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`. 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

99
One row per workflow; "≤10-18" = last passed by 2026-10-18 on 5.0.x/main of that time, so untested for the release.
1010

1111
| Workflow | Agent | Vendored | Hosted |
1212
| --- | --- | --- | --- |
13-
| Common path: scan → fresh frozen install → vex → rollback byte-exact | untested (≤10-18 pass 7–12) | pass 11.29.0 / 12.22.0 / 12.23.0 (11-26, `get` transitive) | pass, registry route, 11.20.0 / 11.29.0 / 12.23.0 (11-26); trustLockfile path ≤10-18 |
13+
| Common path: scan → fresh frozen install → vex → rollback byte-exact | pass 9.15.9 / 10.34.9 / 11.29.0 / 12.23.0 (11-27) | pass 9.15.9 / 10.34.9 / 11.29.0 / 12.23.0 (11-27 pinned matrix + fixture) | pass, registry route, 11.20.0 / 11.29.0 / 12.23.0 (11-26); trustLockfile path ≤10-18 |
1414
| Registry route: re-lock byte-identical, `update`, `dedupe` keep patch | n/a | n/a | pass 11.20.0 / 11.29.0 / 12.23.0 (11-26) |
1515
| Registry route: `remove` one patch, `repair --offline` after `pnpm remove` | n/a | n/a | pass 11.29.0 / 12.23.0 (11-26) |
1616
| Registry route: `packageManager` with `+sha512.` suffix | n/a | n/a | pass 12.23.0 (11-26) |
1717
| Workspace + `catalog:` (CRLF / LF workspace file) | untested | untested | fallback to trustLockfile, misleading reason: #2264; install + rollback pass 11.29 / 12.23 |
18-
| Mixed modes per patch (hosted B + vendored A) | untested | fail #2263 on 12.23.0 (pass 11.20–12.22) | fail #2263 on 12.23.0 |
18+
| Mixed modes per patch (hosted B + vendored A); git-hosted parent of vendored pkg | untested | fail #2263 on 12.23.0 (pass 11.20–12.22); git parent also fails (11-27); registry tarball-URL parent pass | fail #2263 on 12.23.0 |
1919
| Takeover hosted → vendored | n/a | partial: peer-suffixed refusal (known), then #2263 on 12.23 | — |
20-
| Workspaces / `sharedWorkspaceLockfile: false` / member locks | untested (≤10-18) | untested (≤10-18) | untested (≤10-18) |
21-
| Global virtual store / custom virtualStoreDir / hoisted | untested (≤10-18) | untested (≤10-18) | untested (≤10-18) |
20+
| Workspaces / `sharedWorkspaceLockfile: false` / member locks | untested (≤10-18) | shared lock pass 12.23.0 (11-27); per-member from root: #2298 | untested (≤10-18) |
21+
| 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) |
2222
| Legacy locks (shrinkwrap.yaml, 5.x, 6.0) on pnpm 2–8 | untested (≤10-18) | untested (≤10-18) | untested (≤10-18) |
2323
| Rush / subspaces | untested (≤10-18) | n/a | untested (≤10-18) |
2424
| `patchedDependencies`, aliases, peer-suffixed, injected | untested (≤10-18) | untested (≤10-18) | untested (≤10-18) |
@@ -28,14 +28,14 @@ One row per workflow; "≤10-18" = last passed by 2026-10-18 on 5.0.x/main of th
2828

2929
## Backlog
3030

31-
1. Registry route edge shapes on 12.23.0 / 11.29.0: `sharedWorkspaceLockfile: false` members, scoped patched package, user's own `namedRegistries`/`overrides`, supersede A→A' (registry rename), and a pin that drops below 11.20 (expect conversion back to trustLockfile).
32-
2. #2263 follow-ups: does the 12.23 `LOCAL_SUBDEP` check also hit agent-free vendored-only shapes (git-hosted / scoped-registry `tarball:` parent of a vendored package)? Check 11.x when a newer 11 ships. Re-verify once fixed.
33-
3. Common path agent mode on 9.15.9 / 10.34.9 / 11.29.0 / 12.23.0, and vendored / hosted (trustLockfile) on 9.15.9 / 10.34.9 for the release.
34-
4. npm handover (#1756, CRLF shebang rewritten by bin-links): pnpm 9/10 do the same rewrite; run agent / hosted / vendored against a CRLF-shebang bin and comment on #1756 if it reproduces.
35-
5. Re-verify closed pnpm bughunt issues on main for the release: #1597 (vendored build approvals, 10.34.9 / 11 / 12), #1619 (scoped `tarball:` on 12.0–12.12), #1638 (gitignored ledger / manifest), #935 vendored half.
36-
6. Run reporting changes (#2178, ecba20e6): `--json` counts for hosted / vendored pnpm runs, `scan --prune` vendored revert reporting (#2246).
37-
7. Workspaces and Rush / subspace locks on 12.23 (catalogs done), with `--frozen-lockfile` and `--offline`.
38-
8. Legacy lock dialects (pnpm 7/8 absolute `file:` specifiers, shrinkwrap.yaml) on main.
31+
1. Hosted custom shapes need a patch-server stand-in that isn't copied from an issue: write a small local wiremock test in the style of `e2e_redirect_pnpm_build.rs` (uncommitted), then do route edge shapes on 12.23.0 / 11.29.0: `sharedWorkspaceLockfile: false` members, scoped package, user's own `namedRegistries` / `overrides`, supersede A→A', a pin that drops below 11.20.
32+
2. Re-verify #2263 (incl. the git-parent shape) and #2264 once a fix lands; #2298 too.
33+
3. `sharedWorkspaceLockfile: false` on pnpm 10 (`.npmrc`) vendored from root (#2298 scope), and hosted per-member locks on 12.23.0.
34+
4. npm handover (#1756, CRLF shebang rewritten by bin-links) on pnpm 9/10/12, agent / vendored.
35+
5. Re-verify closed pnpm bughunt issues on main for the release: #1597 (vendored build approvals, 10.34.9 / 11 / 12), #1619, #1638, #935 vendored half.
36+
6. Run reporting (#2178): `--json` counts for hosted / vendored pnpm runs, `scan --prune` vendored revert reporting (#2246).
37+
7. Rush / subspace locks on 12.23, `--frozen-lockfile` / `--offline`.
38+
8. Legacy lock dialects (pnpm 7/8 absolute `file:` specifiers, shrinkwrap.yaml) on main; pinned matrix for 7.33.7 / 8.15.9 / 1–6.
3939

4040
## Known non-bugs
4141

0 commit comments

Comments
 (0)