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 8d503e2
Browse filesBrowse the repository at this point in the historyBrowse files
Run 51. Main `cfc870f` (unchanged), latest release v5.1.0, Bun 1.4.5 (newest; canary 1.4.5-canary.20261127.1), plus 1.1.39 / 1.2.23 / 1.3.4 / 1.3.10 / 1.3.14 / 1.4.0 / 1.4.2 / 1.4.3 / 1.4.4 for the trust boundary. Linux only. Worked the pre-5.1 backlog rows on main.
4
+
5
+
**Filed**
6
+
-#2335 (https://github.com/SocketDev/socket-patch/issues/2335): on Bun 1.4.x, a hosted or vendored rewire blocks the install scripts of an npm-alias dependency (`"u8v": "npm:utf-8-validate@6.0.5"`) that is trusted by its real name (`trustedDependencies: ["utf-8-validate"]`). After the rewire, a frozen install prints `Blocked 1 postinstall` and still exits 0, and socket-patch gives no warning. Bun matches trust by the alias key for URL and tarball resolutions. Affects `bun.lockb` from 1.4.0 and `bun.lock` from 1.4.4. On 1.4.3 and earlier, `bun.lock` is fine and `bun.lockb` already blocks before the rewire. v5.1.0 behaves the same, so it isn't a socket-patch regression. The `redirect_bun_default_trust_skipped` remedy (add the real name) leads into it. Suspect: `loses_default_trust`, `vendor/bun_lock_text.rs:93`.
7
+
8
+
**Re-triage**
9
+
-#2279 (open, claimed): main is unchanged, so not re-tested.
- Agent → hosted takeover, `bun.lock` v2 and `bun.lockb` (also lockb on 1.2.23): frozen fresh install is patched; `vex` attests from the leftover agent manifest. Rollback restores text byte-exact and drops the manifest. The lockb rollback refuses (documented) after clearing the manifest.
13
+
- Superseding uuid, hosted and vendored, text and lockb: the "newer patch" pin moves. Vendored replaces the old `<uuid>` dir. A frozen fresh install, and a plain `bun install` on a live tree, get the new bytes. `vex` and `vendor --check` pass. Text rollback is byte-exact.
14
+
-`scan --mode vendored --prune` after `bun remove`, text and lockb: reverts one entry and removes its dir. A frozen fresh install works. `scan --sync` (agent) prunes the manifest entry and blob.
15
+
- Workspaces with `catalog:` / `catalog:k`, a `!packages/ignored` negation and a `.tools/*` dot-dir member, text and lockb, all three modes: patched, `vex` passes, a plain install makes no changes. `vendor --revert` and text rollback are byte-exact; lockb rollback refuses (documented).
16
+
-`globalStore = true` + isolated: agent refuses with a clear remedy, and the remedy works. Hosted and vendored entries get their own cache links, and the shared registry entry stays unpatched.
17
+
-`bun patch` interplay: a URL-keyed user patch survives a superseding hosted re-run and a vendored takeover (skipped with the `--allow-patch-conflicts` note). `vex` omits it (`vex_npm_patched_dependency`). Rollback warns that the patch is dropped (frozen install exit 0, as documented). A registry-keyed `bun patch` on lockb is skipped, and the other package is rewired.
18
+
- Default trust: an aliased default-trusted package is skipped (hosted) or refused (vendored, `partialFailure`). An unaliased package with an explicit `trustedDependencies` keeps its scripts after the rewire. The aliased case fails, filed as #2335.
19
+
-`.gitignore` covering `*.tgz`: vendored artifacts are still committed (via the per-dir `.gitignore`). `.socket/` or `vendor/` rules: a clear refusal and nothing written.
20
+
21
+
**Ruled out**
22
+
- Hosted-only `vex` "No applied patches with vulnerability metadata": my mock lacked the public `/patch/view/<uuid>` route. The same applies to agent rollback needing `/patch/blob/<hash>`. Method note added to the state file.
Copy file name to clipboardExpand all lines: known-non-bugs/bun.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,3 +107,5 @@ Documented limitations and verified false positives. One bullet each. Search thi
107
107
- With pins on the patch mirror, `vex` / `list` / `rollback` run *without*`SOCKET_PATCH_MIRROR_URL` see no hosted pins (`No patches in this project` / `manifest_not_found`). Documented: "Without the setting those references are on a host the run was not given and are not hosted pins" (CLI_CONTRACT "Patch mirror", run 49).
108
108
- Mock fixture (run 49): the patch `view` must list `files` with before/after hashes, or `vex` omits the package (`no_files`) and reports "No applied patches with vulnerability metadata".
109
109
- A hosted → vendored takeover where one pin cannot re-resolve upstream (registry 404) fails that purl with `redirect_revert_failed` and the rollback remedy (`git checkout -- bun.lock[b]`, `bun install --force`), while the other purls in the same run are vendored. Following it literally un-wires those, but leaves a safe state (still hosted + patched, `vendor --check` says re-run) and the re-run converges. Same on text and lockb (run 50).
110
+
- (2026-11-28) A `bun patch`ed package is now skipped by both a vendored dry run and a wet run, with the "covered by this project's own patches … --allow-patch-conflicts" note and exit 0. The older dry-run/wet mismatch (`would_vendor` vs `vendor_lock_entry_unsupported`) applies only with `--allow-patch-conflicts`.
111
+
- (2026-11-28) With `globalStore = true`, a hosted or vendored pin gets its own `<cache>/links/<name>@<url|path>+…` entry; the shared `name@version-<hash>` entry other projects use stays unpatched. A stale `node_modules/.bun/<name>@<version>` link can remain beside the new one after a reinstall, which is Bun behaviour.
Copy file name to clipboardExpand all lines: state/bun.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
[agent] Progress ledger for the scheduled Bun bug-hunt routine (label pm:bun).
2
2
3
-
Last run: 2026-11-27 (run 50), main `cfc870f`, latest release v5.1.0, newest Bun 1.4.5 (canary 1.4.5-canary.20261126.1).
3
+
Last run: 2026-11-28 (run 51), main `cfc870f`, latest release v5.1.0, newest Bun 1.4.5 (canary 1.4.5-canary.20261127.1).
4
4
5
5
The per-run narrative (runs 1–48) and the old per-version matrices are in the branch history (`git log -p -- state/bun.md`) and in `entries/bun/`.
6
6
7
7
## Method (Linux sandbox)
8
8
9
9
-`unset BUN_OPTIONS` (the sandbox exports `--smol`). Bun binaries: `npm i --no-save --ignore-scripts @oven/bun-linux-x64@<v>` in a scratch dir. On Bun ≥ 1.2, `bunfig [install] saveTextLockfile = false` writes `bun.lockb`; Bun 1.1.x writes `bun.lockb` only.
10
-
- The patch API is mocked locally (patch.socket.dev and patches-api are blocked). Use the authenticated routes: `--api-url http://127.0.0.1:A --org o --api-token fake`, serving `POST /v0/orgs/o/patches/batch` (answer only for the requested purls), `GET …/by-package/<purl>`, `POST …/package` (grants: `{"results":{uuid:{"status":"granted","url","purl","artifacts":[{"kind":"tarball","url","integrity":{"sha512":"sha512-…"}}]}}}`), `GET …/view/<uuid>` (with `files` before/after git-sha256 + blob contents) and the tarball at `/patch/npm/<name>/<ver>/<tok>/<uuid>/<name>-<ver>.tgz`. Set `SOCKET_PATCH_SERVER_URL`, `SOCKET_PROXY_URL` and `SOCKET_VENDOR_URL` to the mock's origin. Hosted rollback needs `SOCKET_NPM_REGISTRY` if the CLI can't reach npmjs. A ~100-line Python `http.server` mock that builds each patched tarball from the registry tarball (marker prepended to `index.js`) covers all three modes; agent mode needs `blobContent` (base64) in `view`.
10
+
- The patch API is mocked locally (patch.socket.dev and patches-api are blocked). Use the authenticated routes: `--api-url http://127.0.0.1:A --org o --api-token fake`, serving `POST /v0/orgs/o/patches/batch` (answer only for the requested purls), `GET …/by-package/<purl>`, `POST …/package` (grants: `{"results":{uuid:{"status":"granted","url","purl","artifacts":[{"kind":"tarball","url","integrity":{"sha512":"sha512-…"}}]}}}`), `GET …/view/<uuid>` (with `files` before/after git-sha256 + blob contents) and the tarball at `/patch/npm/<name>/<ver>/<tok>/<uuid>/<name>-<ver>.tgz`. Set `SOCKET_PATCH_SERVER_URL`, `SOCKET_PROXY_URL` and `SOCKET_VENDOR_URL` to the mock's origin. Hosted rollback needs `SOCKET_NPM_REGISTRY` if the CLI can't reach npmjs. A ~100-line Python `http.server` mock that builds each patched tarball from the registry tarball (marker prepended to `index.js`) covers all three modes; agent mode needs `blobContent` (base64) in `view`. Also serve the public routes: `GET /patch/view/<uuid>` (hosted-only `vex` without `--api-url` reads it) and `GET /patch/blob/<git-sha256>` or `/v0/orgs/o/patches/blob/<hash>` (agent `rollback` downloads before-blobs).
11
11
- The repo's real-Bun e2e suites run with `PATH=<bun dir>:$PATH SOCKET_PATCH_BUN_E2E_REQUIRED=1 SOCKET_PATCH_BUN_E2E_VERSION=<v> SOCKET_PATCH_BUN_LOCKB_REQUIRED=1 cargo test --release -p socket-patch-cli --test …`.
12
12
- Patch mirror: a second port serving the same tarball paths under `/artifactory/socket-patch` (HEAD and GET). Pass `--patch-mirror-url http://127.0.0.1:B/artifactory/socket-patch`, or set `SOCKET_PATCH_MIRROR_URL` for later commands.
13
13
- Oracle: a fresh-checkout `bun install --frozen-lockfile` with an empty `BUN_INSTALL_CACHE_DIR`, then the marker bytes in `node_modules`, the mock's request log (which host served the tarball), byte compares of the lock, and `vex -O`. Test repos need `node_modules/` in `.gitignore`.
@@ -22,33 +22,35 @@ Release focus: a cell last passed before 2026-11-11 counts as untested until it'
|`vex` (isolated linker, lockfile-only, workspaces) | pass all common-path cells (2026-11-27) | pass all common-path cells (2026-11-27) | pass all common-path cells + mirror ws (2026-11-27); refuses on an unreinstalled live tree with a clear message |
29
29
| sha512 boundary (1.3.9 digest-less 2-tuple heal vs 1.3.10) | n/a | pass 1.3.9 `bun add` drop → re-run re-pins on disk (2026-11-27) | pass 1.3.9 heal on a mirror URL, install from mirror (2026-11-27) |
30
30
|`--frozen-lockfile` / `bun ci` / `--filter` after rewiring | n/a | pre-5.1 | pass 1.4.4 single + mirror (2026-11-26) |
31
31
| Patch mirror (experimental, #2180): fresh pin | n/a | n/a | pass 1.4.5 text v2 + lockb, single + ws hoisted/isolated, 1.3.10 text v1 ws; trailing-slash base; 404 mirror → `redirect_mirror_unavailable`, nothing written (2026-11-27) |
32
32
| Patch mirror: project already pinned on the patch server | n/a | n/a | fail #2279 (lockb: no `redirect_mirror_pin_not_moved`; false `redirect_bun_non_registry_entry_skipped`). Reverse case (mirror pin, run without the setting): text gives `redirect_pin_on_unconfigured_host`; lockb gives the false warning instead, added to #2279 (2026-11-27) |
33
33
| npm-style `bin` CRLF shebang rewrite (#1756, Bun does it too) | pass hoisted + isolated: apply, bin runs, `vex`, rollback keeps LF (1.4.4, 2026-11-26) | untested | untested |
2.#2279: re-test when fixed (text + lockb, both directions: patch-server pin under a mirror run, mirror pin under a run without the setting; remedy text on lockb; `vex` count).
47
-
3. Patch mirror: HEAD answering 401 / 403 (`redirect_mirror_unverified`) and a timeout (needs a mock that answers those); a superseding uuid on a pin already on the mirror.
48
-
4. Spot-check the closed Bun issues on main: #1631 (dot-dir workspaces), #1621 (self-update), #1600 (`vendor --check` reason for git / `file:` copies), #1581 (LFS `repair`), #1084 (isolated orphan).
49
-
5.`bin` CRLF shebang (#1756) in vendored and hosted modes (`vendor --check`, hosted `vex`) on Bun.
50
-
6. Each new Bun release or canary: compare its text and lockb bytes with the latest stable.
51
-
7. macOS / Windows (path quoting, junctions, `bun.cmd`): can't be probed now. Note likely platform differences in issues.
45
+
1.#2335: re-test when fixed (alias trusted by real name, hosted + vendored, text 1.4.4+ / lockb 1.4.0+; also the reverse, trusted by alias name only, where a rewire newly runs the scripts; and the default-trust skip remedy for an alias).
46
+
2.#2279: re-test when fixed (text + lockb, both directions; remedy text on lockb; `vex` count).
47
+
3. Remaining pre-5.1 rows: global `-g`, self-update (#1621), `.gitignore` + LFS `repair` (#1581), `--frozen-lockfile` / `bun ci` / `--filter` in vendored mode. Re-run on main.
48
+
4. Other alias shapes on Bun 1.4: an aliased package hosted / vendored in workspaces, aliased `bun patch` keys, `vex` / rollback on an alias pin.
49
+
5. Patch mirror: HEAD answering 401 / 403 (`redirect_mirror_unverified`) and a timeout; a superseding uuid on a pin already on the mirror.
50
+
6. Spot-check the closed Bun issues on main: #1631 (dot-dir workspaces, partly re-covered 2026-11-28), #1600 (`vendor --check` reason for git / `file:` copies), #1084 (isolated orphan).
51
+
7.`bin` CRLF shebang (#1756) in vendored and hosted modes on Bun.
52
+
8. Each new Bun release or canary: compare its text and lockb bytes with the latest stable.
53
+
9. macOS / Windows (path quoting, junctions, `bun.cmd`): can't be probed now. Note likely platform differences in issues.
0 commit comments