Skip to content

Commit 661cf9d

Browse files
committed
pnpm: run 54 (vendored CRLF bins, injected deps)
1 parent 8ca02cf commit 661cf9d

3 files changed

Lines changed: 42 additions & 11 deletions

File tree

‎entries/pnpm/20261130T010805Z.md‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
[agent] 2026-11-30: pnpm bug-hunt run
2+
3+
**Tested:** main `cfc870f` (unchanged), release v5.1.0, Linux, Node 22.23.5. pnpm 10.34.9, 11.29.0 and 12.23.0. Latest pnpm is still 12.23.0 (`next-12` is now 12.25.1).
4+
5+
### Re-triage
6+
- #2263, #2264, #2298 and #2352 are still open on an unchanged main with no fix merged, so I didn't re-check them.
7+
8+
### Issues
9+
- None filed, none closed.
10+
11+
### Cells (Linux)
12+
Method: local uncommitted tests in `e2e_vendor_pnpm_build.rs` using a wiremock npm registry (the build-approval template) and the `prebuilt_common` fixture, with `SOCKET_PATCH_PNPM_E2E_BIN` pointed at npm-installed pnpm binaries.
13+
- **Vendored CRLF-shebang bin** (registry package, `bin` file `#!/usr/bin/env node\r\n…`) on 10.34.9, 11.29.0 and 12.23.0: **pass** on all three.
14+
- `vendor` applies; a re-run gives `already_vendored`; `vendor --check` gives `vendor_check_ok`.
15+
- `vex` attests in the source tree and in a fresh frozen offline checkout. On 10 / 11 the installed copy is the LF-rewritten form; on 12 it keeps CRLF. Neither gives a spurious warning.
16+
- The bin runs the patched code. Revert restores the lock byte-exact.
17+
- The #2352 agent bug doesn't carry over to vendored mode.
18+
- **`injected` workspace dep** (`app` → `lib: workspace:*` with `dependenciesMeta.injected`, and `lib` → patched registry pkg):
19+
- Vendored, 11.29.0 / 12.23.0: **pass**. The fresh frozen offline install puts the patched bytes in the `file:` instance, and revert is byte-exact.
20+
- Vendored, 10.34.9: the fresh frozen install fails `ERR_PNPM_OUTDATED_LOCKFILE` ("importer dependencies meta (undefined) doesn't match"). A control without socket-patch fails the same way (pnpm 10.34.9 doesn't write `dependenciesMeta` to the lock), so this is upstream and not a bug.
21+
- Agent, 12.23.0: apply, idempotent re-apply, `apply --check` and vex all **pass**. Rollback hit `missing_blob`, which is the known hand-staged method gap.
22+
23+
### False positives ruled out
24+
- Vendored `vex` attests with the "installed tree does not match its vendored artifact" warning while `node_modules` is stale. That's documented (CLI_CONTRACT: the committed artifact is hashed).
25+
- The pnpm 12 "`pnpm.overrides` in package.json is no longer read" warning on vendored projects is already in known-non-bugs.
26+
- The pnpm 10.34.9 injected-dep frozen install failure is upstream (see above).
27+
28+
### Next
29+
1. A local hosted mock for the route edge shapes and hosted build approvals.
30+
2. pnpm 1–6 pinned matrix; Rush / subspace locks.

‎known-non-bugs/pnpm.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,4 @@ One line per ruled-out finding. Moved here from state/pnpm.md when it was compac
118118
- Vendored flow-style `onlyBuiltDependencies: [x]` / `allowBuilds: {x: true}` gets the documented `vendor_pnpm_build_approval_lost` warning, and adding the named key by hand works on 10.34.9 / 12.23.0 (run 52).
119119
- Agent `scan --offline` exits with status `error` and zero counts: offline scan has no API to consult; use `apply --offline` with a staged manifest (run 53).
120120
- A test patch that prepends a marker above a bin's `#!` line breaks the bin (`SyntaxError`): a test-fixture artifact; stage markers after the shebang (run 53).
121+
- pnpm 10.34.9 doesn't write `dependenciesMeta` (injected) to pnpm-lock.yaml, so any fresh `--frozen-lockfile` install of an injected workspace dep fails `ERR_PNPM_OUTDATED_LOCKFILE`, with or without socket-patch (control 2026-11-30); 11.29 / 12.23 are fine.

‎state/pnpm.md‎

Lines changed: 11 additions & 11 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 run: 2026-11-29 (run 53), main `cfc870f`, release v5.1.0, newest pnpm 12.23.0 (11.29.0, 10.34.9, 9.15.9, 8.15.9, 7.33.7 latest per major).
3+
Last run: 2026-11-30 (run 54), main `cfc870f`, release v5.1.0, newest pnpm 12.23.0 (11.29.0, 10.34.9, 9.15.9, 8.15.9, 7.33.7 latest per major; `next-12` 12.25.1).
44

55
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`. 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

@@ -21,23 +21,22 @@ One row per workflow; "≤10-18" = last passed by 2026-10-18 on 5.0.x/main of th
2121
| 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 | 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 |
2323
| Rush / subspaces | untested (≤10-18) | n/a | untested (≤10-18) |
24-
| `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 untested | untested (≤10-18) | untested (≤10-18) |
24+
| `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) | injected pass 11.29.0 / 12.23.0, 10.34.9 upstream lock bug (11-30); rest untested (≤10-18) | untested (≤10-18) |
2525
| 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) | untested (≤10-18) |
26-
| 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) | untested | untested |
26+
| 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 |
2727
| `-g` global install | untested (≤10-18, Linux only) | n/a | n/a |
2828
| macOS / Windows | probes switched off (INSTRUCTIONS.md) | — | — |
2929

3030
## Backlog
3131

32-
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; the `run_build_approval_capstone` mock registry in `e2e_vendor_pnpm_build.rs` is a good template), 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.
33-
2. CRLF-shebang bins on pnpm 12 in vendored / hosted mode (vex, `vendor --check`, `vendored_tree_out_of_sync`), and a registry (not `file:`) package; #2352 covers agent.
32+
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; the `run_build_approval_capstone` mock registry in `e2e_vendor_pnpm_build.rs` is a good template; run pnpm via `SOCKET_PATCH_PNPM_E2E_BIN` = npm-installed binary, corepack can't download behind the mock registry), 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.
33+
2. Hosted build approvals (`allowBuilds` vs the routed `socket-<id>` name) and hosted CRLF-shebang bin on 11.29.0 / 12.23.0 (same mock).
3434
3. Re-verify #2263 (incl. the git-parent shape), #2264, #2298, #2352 once a fix lands (main unchanged since `cfc870f`).
35-
4. Hosted build approvals (`allowBuilds` vs the routed `socket-<id>` name) on 11.29.0 / 12.23.0.
36-
5. Re-verify closed #1619 (hosted scoped `tarball:` rollback on 12.0–12.12) on main with real pnpm (#1638 in-process tests pass 11-29; #935 vendored half open).
37-
6. Pinned matrix for pnpm 1–6 (refusal / shrinkwrap.yaml / 5.0–5.3) on main; pnpm 7/8 vendored moved checkout (`vendor_pnpm_legacy_absolute_specifier`).
38-
7. Run reporting (#2178): `--json` counts for hosted pnpm runs, `scan --prune` vendored revert reporting (#2246).
39-
8. Rush / subspace locks on 12.23, `--frozen-lockfile` / `--offline`.
40-
9. `injected` workspace deps, agent / vendored.
35+
4. Re-verify closed #1619 (hosted scoped `tarball:` rollback on 12.0–12.12) on main with real pnpm (#1638 in-process tests pass 11-29; #935 vendored half open).
36+
5. Pinned matrix for pnpm 1–6 (refusal / shrinkwrap.yaml / 5.0–5.3) on main; pnpm 7/8 vendored moved checkout (`vendor_pnpm_legacy_absolute_specifier`).
37+
6. Run reporting (#2178): `--json` counts for hosted pnpm runs, `scan --prune` vendored revert reporting (#2246).
38+
7. Rush / subspace locks on 12.23, `--frozen-lockfile` / `--offline`.
39+
8. pnpm 12.25.x once it is `latest`: re-run the common path and #2352.
4140

4241
## Known non-bugs
4342

@@ -52,3 +51,4 @@ Full list: `known-non-bugs/pnpm.md` (search it with `git grep`). Most likely to
5251
- Peer-suffixed hosted snapshot refused by the hosted → vendored takeover ("not supported yet").
5352
- Agent `apply` skips a package pnpm `patchedDependencies` already patches (`user_patch_conflict`, remedy `--allow-patch-conflicts`).
5453
- Vendored refuses `npm:` aliases, scoped and unscoped (#957, covered by `e2e_vendor_pnpm_build`).
54+
- pnpm 10.34.9 omits `dependenciesMeta` from the lock, so injected-dep frozen installs fail with or without socket-patch (upstream).

0 commit comments

Comments
 (0)