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 2601673
Browse filesBrowse the repository at this point in the historyBrowse files
Run 44. Main `657fce2` (v5.0.1 `latest`), Linux, Node 22.22.0, real npm 7.24.2 / 10.9.4 / 11.21.1 / 12.0.0 / 12.1.0 / 12.2.0. Local Python mock of the public proxy (batch / by-package / view / blob / package / tarball) with patched `esbuild@0.19.12` and `@esbuild/linux-x64@0.19.12` tarballs.
4
+
5
+
**Filed #1595:** hosted and vendored scans break npm 12 `allowScripts` version pins (`"esbuild@0.19.12": true`, the `npm approve-scripts` default). npm only trusts a registry-shaped `resolved` (`…/-/<leaf>-<ver>.tgz`), so after the rewrite the approved `postinstall` is silently blocked. Under `strict-allow-scripts=true`, every `npm ci` fails. Name-only keys still match. `npm approve-scripts` over a vendored pin writes an absolute, machine-specific `file:` key. Reproduced on npm 12.0.0 / 12.1.0 / 12.2.0, hosted and vendored. npm 11.21.1 / 10.9.4 / 7.24.2 aren't affected.
6
+
7
+
Re-triage: #1576 (`npm_lock.rs:451` text) and #1554 (`governing_root.rs:493`) are unchanged on `657fce2`. No npm code changed since run 43, so I left no comments.
8
+
9
+
Cells (all pass unless noted):
10
+
-`hasInstallScript` package (esbuild) under hosted and vendored: the postinstall runs on `npm ci` with npm 7.24.2 / 10.9.4 / 11.21.1, the lock keeps `os` / `cpu` / `optional` / `bin`, bin links work, and `vex` / `vendor --check` pass. On npm 12 it fails: #1595.
11
+
- A platform-optional dep (`@esbuild/linux-x64`) vendored on Linux, then `npm ci --os=darwin --cpu=arm64`: npm skips it, and `vex` still lists it as a not_affected subcomponent (lock-based, documented).
12
+
- A workspace member named `esbuild@0.19.12` (a local fork): hosted skips (`redirect_npm_entry_not_found`, exit 0); vendored refuses `vendor_workspace_member` (exit 1); agent refuses (#626); agent `vex` omits it. All documented in docs/ecosystems.md.
13
+
- Mixed state (vendored esbuild + hosted linux-x64): bare `scan` / `get` give `mode_ambiguous` (exit 2); `get --save-only` records vendored state per the contract; `apply` skips the vendored package; `scan --mode agent` warns that it left the hosted wiring live; bare `rollback` unwinds all three stores, and the lock comes back byte-exact.
14
+
15
+
False positives ruled out: the vendored workspace-member refusal (documented); `vex` attesting a vendored optional dep that this OS skips (lock-based attestation, documented).
16
+
17
+
Next:
18
+
1.#1595 follow-ups: a git / `file:` dep with `allowScripts`, an aliased package (`npm:` keys never match), `deny` (`false`) entries over a pin, and `npm install` (not `ci`).
19
+
2. Re-check #1576 / #1554 / #1072 on the next main.
20
+
3.#1534 sibling: `scan . tools/x` with a lockless `tools/x`.
21
+
4. The npm 12 `allow-git` / `allow-directory` gates against vendored / hosted takeovers.
Copy file name to clipboardExpand all lines: state/npm.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
[agent] Progress ledger for the scheduled npm bug-hunt routine (label pm:npm).
2
2
3
-
Last updated: 2026-10-15T12Z (run 43), main `e76cb9b` (v5.0.1 `latest`). Run 43 filed **#1576**: vendored npm's lockfileVersion 4 refusal says to remove `patchedDependencies` and re-run `npm install`, but npm 12.1 / 12.2 keep the lock at v4, so the advice loops (`npm install --lockfile-version 3` works). The #1541 LFS fix passes for npm. Open: #1576, #1554, #1072. **Every other issue number marked `fail` in the matrix below is closed** (#356, #403, #433, #434, #464, #554, #588, #659, #665, #687, #688, #711, #725, #732, #753, #798, #812, #828, #852, #879, #899, #1097, #1155, #1196, #1232, #1233, #1266, #1481, #1511, #1534); those marks are historical. Probe branches remain blocked (`git push --delete` refused).
3
+
Last updated: 2026-10-16T00Z (run 44), main `657fce2` (v5.0.1 `latest`). Run 44 filed **#1595**: npm 12 `allowScripts` version pins (`pkg@x.y.z`, the `npm approve-scripts` default) stop matching after a hosted or vendored rewrite, so approved install scripts are blocked (or every `npm ci` fails under `strict-allow-scripts`); 12.0.0 / 12.1.0 / 12.2.0. Open:#1595,#1576, #1554, #1072. **Every other issue number marked `fail` in the matrix below is closed** (#356, #403, #433, #434, #464, #554, #588, #659, #665, #687, #688, #711, #725, #732, #753, #798, #812, #828, #852, #879, #899, #1097, #1155, #1196, #1232, #1233, #1266, #1481, #1511, #1534); those marks are historical. Probe branches remain blocked (`git push --delete` refused).
4
4
## Coverage matrix
5
5
6
6
Cells are "pass", "fail #N" or "untested". Every cell uses a real npm install. Hosted cells use a local mock of the patch API with `--patch-server-url` pointed at it. Agent and vendored cells use the same mock or a hand-staged `.socket/`. "Cycle" means scan → fresh `npm ci` → `vex` → `rollback` byte-exact. "Suites" means `e2e_redirect_npm_build` + `e2e_vendor_npm_build` with `SOCKET_PATCH_NPM_E2E_REQUIRED=1`.
@@ -14,13 +14,20 @@ Cells are "pass", "fail #N" or "untested". Every cell uses a real npm install. H
14
14
| Linux | 10.9.9 | pass: plain cycle (alias still #356) | fail **#1554** (run 42: as #1534, but the nested project has no lockfile, via `package-lock=false` / `--no-package-lock`; 8.19.4 / 10.9.4 / 12.2.0). fixed #1534 (#1543, run 42: a nested project with a lock or a shrinkwrap gets `nested_project_skipped`, exit 0, and the VEX is written). fixed #1511 (run 41: member `file:` dir copy refuses; scoped and dual-lock variants refuse too). Historical: fail **#1511** (`scan --mode vendored --vex` / `vex` attest beside a member's `file:` directory copy, nested; 10.9.4 / 11.6.2 / 12.2.0). pass: member `file:` tarball / URL copy and `overrides`-forced `file:` tarball refuse (run 40), cycle, `overrides` + `file:` dependent. fail **#1155** (10.9.4 / 8.19.4 / 12.2.0: an npm upgrade or downgrade of a vendored package is drift-kept forever; also when the new version has its own patch) | fixed #1481 (run 40: `file:` tarball / directory / URL member copies refuse; `overrides`-forced `file:` tarball refuses). pass: cycle, `overrides`, shrinkwrapped `file:` tarball dep; `--max-new-patches 0` on fully pinned plain / v1 / alias / nested / dual lock (ALREADY). fixed #1195 (#1211; cap 0 and cap 1 with an unpinned twin pass on `9ab72d4`), pass: #1034 targets (`once` vs `@tootallnate/once`, versionless / encoded purls, alias-installed name), interrupted vendored → hosted takeover (converges; artifact dir orphaned = #1157 wontfix), global npmrc `replace-registry-host`, quoted / commented `.npmrc` values, **#1196** (CRLF `.npmrc` without a final newline) | pass (10.9.4, run 38): `--global-prefix` report-only scan, `scan --mode agent`, `rollback` |
15
15
| Linux | 10.8.2 (Node 18) / 10.9.x | fixed #1266 (run 40: linked member alias link patched by `scan --mode agent packages/a`, reverted by `rollback packages/a`). fail **#732** (human `scan --mode agent` / `--sync` after `npm ci`: exit 0, unpatched; `--json` re-applies). pass: Node 18 cycle. fail **#554** (re-checked on `203e092`), **#356** (re-checked on `203e092`; alias-only scan now exits 0). pass: agent vex refuses a reverted nested copy (#516 fixed), bundled copy (both copies patched + vex) | fail **#753** (`hasShrinkwrap` nested copy: `vex` exit 0 not_affected, `vendor --check` passes, npm installs unpatched; 8.19.4 too). pass: CRLF / BOM / tab layout cycle (#324 fixed), `--omit=dev`, agent↔vendored takeovers, rescan after a version bump (#541 fixed), hosted→vendored takeover over a dual lock and an alias. fail **#588** (same-lock unwired copy), **#665** (`npm uninstall` of a vendored dep: rollback exit 1 forever), **#688** (`file:` dir named like the package: refused; the takeover keeps the hosted pin since #963), **#687** (a failed eject rewrites every root file), #798 fixed by #799 (stale twin: `vex` now refuses, 18Z), #725 (`vendor --check` ignores wiring). pass: `peer: true` lock entry. fail **#828** (hosted→vendored takeover over a pin with a bundled copy alongside: restore skipped, ledger records the hosted URL, `.npmrc` kept, revert lands on hosted; 8.19.4 / 12.2.0 too) | fail **#828** (`rollback` / `remove` refuse a pin with a bundled copy alongside, and the remedy loops; 8.19.4 / 12.2.0 too). pass: `peer: true` and `devOptional` lock entries (`--omit=peer/dev/optional`), cycles (plain, alias, nested), `file:` dependency's own dependency (`install-links` true / false), self-referential `file:.` link, rollback → in-place `npm install` / `npm ci` restores upstream, `npm ci --omit=dev` + vex, shrinkwrapped `file:` dep, `JSONStream`, agent↔hosted takeovers, stale tree, lockfile-only, dry-run, rescan no-op, nested project (loud), `registry=` mirror, `.npmrc` variants, `overrides` (incl. `$ref`, nested object), policy (`--package`, `maxNewPatches`, `ignorePackages`, `minSeverity`), CRLF / BOM / tab / no-newline layout cycle. fixed #798 (stale twin), #325 (in-run `--vex` only, reopened), **#588** (`--no-verify` only; default `vex` refuses), **#753** (`hasShrinkwrap` nested copy: `npm ci` unpatched, lockfile-only `vex` attests) | pass: all four, `--global-prefix`, `SOCKET_GLOBAL`, `--mode hosted` refused. fail #464 (report-only hint has no `-g`) |
- Filed #1595. npm 12's `allowScripts` matcher trusts only a registry-shaped `resolved` (`…/-/<leaf>-<ver>.tgz`), so a hosted or vendored rewrite turns a pinned approval (`esbuild@0.19.12`) into "unreviewed". The postinstall is blocked, and `strict-allow-scripts=true` fails `npm ci`. Name-only keys still match. npm 12.0.0 / 12.1.0 / 12.2.0; npm 11.21.1 / 10.9.4 / 7.24.2 run the script.
28
+
- pass: `hasInstallScript` + `os` / `cpu` / `optional` / `bin` lock fields kept by hosted and vendored (npm 7 / 10 / 11), `npm ci --os=darwin --cpu=arm64` over a Linux-vendored optional dep, a workspace member named like a patched package (all three modes refuse or skip as documented), mixed vendored + hosted (+ agent) state across `scan` / `get` / `get --save-only` / `apply` / `vex` / `vendor --check` / `rollback` (byte-exact).
29
+
- Re-triage: #1576 / #1554 unchanged (no npm code changes since run 43).
30
+
24
31
## Run 43 (2026-10-15T12Z, main `e76cb9b`)
25
32
26
33
- Filed #1576. Vendored npm's lockfileVersion 4 refusal advises removing `patchedDependencies` and re-running `npm install`, but npm 12.1.0 / 12.2.0 keep the lock at v4 (after `npm patch rm`, after `npm install`, after a clean reinstall), so vendoring stays refused. `npm install --lockfile-version 3` is the working remedy.
@@ -201,6 +208,7 @@ The same `name@version` gets a new patch UUID with different bytes. Mock: left-p
201
208
202
209
## Backlog
203
210
211
+
-**New 2026-10-16T00Z:**#1595 follow-ups (git / `file:` / alias deps with `allowScripts`, `false` deny entries over a pin, `npm install` vs `ci`); re-check #1595 / #1576 / #1554 / #1072 on the next main; npm 12 `allow-git` / `allow-directory` vs takeovers; `scan . tools/x` with a lockless `tools/x`.
204
212
-**New 2026-10-15T12Z:** re-check #1576 / #1554 / #1072 on the next main; #1541 follow-ups (a `.gitattributes` inside a vendored dir payload, `.git/info/attributes`, a hosted → vendored takeover in an LFS repo); #1534 siblings (`scan . tools/x` with a lockless `tools/x`).
205
213
-**New 2026-10-15T00Z:** re-check #1554 / #1072 on the next main; #1534 siblings (a nested project inside an `ignorePaths`-excluded dir or under a workspace member, `scan . tools/x` with a lockless `tools/x`); hosted `nested_project_skipped` parity; npm 12 `npm patch rm` lock downgrade vs vendored refusal text; #1440 follow-ups.
206
214
-**New 2026-10-14T12Z:** re-check #1534 / #1072 on the next main; #1534 siblings (an `ignorePaths`-excluded nested project, a nested project with no lock, a workspace member with a stray own lock under vendored); #1440 follow-ups; npm 12 `npm patch rm` lock downgrade vs vendored refusal text.
@@ -253,6 +261,10 @@ The same `name@version` gets a new patch UUID with different bytes. Mock: left-p
253
261
254
262
## Known non-bugs
255
263
264
+
- Mock tip (2026-10-16): the Python mock lives in the run's scratchpad only. Compare purls URL-decoded (`%40` vs `@`), or scoped packages get no patch. The public proxy also POSTs `/patch/telemetry` (a 404 is fine).
265
+
- Vendored `scan` refuses (`vendor_workspace_member`, exit 1) a workspace member whose name@version matches a patched package, while hosted only warns (`redirect_npm_entry_not_found`, exit 0). Documented in docs/ecosystems.md (2026-10-16).
266
+
- A vendored optional platform dep (`@esbuild/linux-x64`) that `npm ci --os=darwin` skips is still listed as a not_affected subcomponent by `vex` (lock-based attestation, documented) (2026-10-16).
267
+
- npm 12 blocks dependency install scripts by default (`allowScripts`); a hosted or vendored package without an approval shows the same warning as the registry copy. Only the approval mismatch is #1595 (2026-10-16).
256
268
- Mock tip (2026-10-15): the `tests/prebuilt_common` service fixture publishes bytes per (project root, uuid) per process, so `repair` in a second clone of a vendored project gets `vendor_artifact_redownload_failed` (SHA mismatch). That's a fixture artifact, not a bug.
257
269
- A legacy `* -text` uuid `.gitattributes` in an LFS-tracking repo keeps the tarball committed as an LFS pointer until the next vendored run and a `git add --renormalize` (documented in docs/ecosystems.md, #1541) (2026-10-15).
258
270
- npm with a member `file:` directory dependency (`install-strategy=nested`, `install-links=false`) installs that directory's own devDependencies into `<dir>/node_modules`, so a root crawl sees them. That's npm's behaviour (2026-10-14).
0 commit comments