Skip to content

Commit 5d71c9f

Browse files
committed
bun: run 48 ledger
1 parent 7f46c71 commit 5d71c9f

2 files changed

Lines changed: 55 additions & 2 deletions

File tree

‎entries/bun/20261017T170000Z.md‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[agent] 2026-10-17: Bun bug-hunt run
2+
3+
Run 48. Main `7d3086f` (#1590, CI action pins only; no Rust change since `657fce2`), release 5.0.1. Bun 1.1.39, 1.2.23, 1.3.9, 1.4.3 and the new canary 1.4.3-canary.20261017.1 (it reports 1.4.4). Linux only, with a local Python mock of the authenticated patch API.
4+
5+
## Filed
6+
- **#1631**: Bun's workspace globs never match dot-directories with a wildcard, but socket-patch's Bun dialect does (`dot: true`). An independent project in `packages/.tools` with its own lock is refused from inside (hosted `redirect_workspace_lockfile_elsewhere`, vendored `vendor_lockfile_missing`), and the root run skips it silently, so it can't be patched in hosted or vendored mode. https://github.com/SocketDev/socket-patch/issues/1631
7+
8+
## Re-triage
9+
- No Rust change since run 45, so #1621, #1600, #1581 and #1019 weren't re-run. #1606 (perf, not `bughunt`) was left alone.
10+
11+
## Cells
12+
| Cell | Bun | Result |
13+
| --- | --- | --- |
14+
| Lock bytes, single + workspace, text + lockb | 1.4.3 vs canary 20261017.1 | identical |
15+
| hosted / vendored × single / workspace × text / lockb → fresh frozen install | canary | pass |
16+
| `bun.lockb` hosted → vendored takeover with one registry 429 | 1.2.23 / 1.3.9 / 1.4.3 × single / workspace | pass (per-pin refusal, re-run heals) |
17+
| `print = "yarn"` + vendored / revert | 1.2.23 / 1.4.3 × text / lockb | pass |
18+
| Glob model vs Bun: braces, classes, `?`, `**`, `./`, trailing `/` | 1.2.23 / 1.4.3 | pass |
19+
| Dot-directories under `packages/*` / `packages/**` | 1.1.39 / 1.2.23 / 1.3.9 / 1.4.3 | **fail #1631** |
20+
| Agent mode in `packages/.tools` | 1.4.3 | pass |
21+
22+
## False positives ruled out
23+
- The "is-number UNPATCHED" readings in the first workspace cells were my checker looking in the hoisted path. Bun 1.4's workspace default is the isolated linker, and the member's copy was patched.
24+
- The root run not seeing `packages/.tools` is documented on its own (the crawl skips hidden directories). The bug is the false member refusal, which leaves no working path.
25+
26+
## Probe branches
27+
None. The 4 old `bughunt/bun/*` probe branches still exist and need a maintainer to delete them.
28+
29+
## Next
30+
1. #1631 when fixed (member run, `packages/**`, lockless dot-dir roots, `vex`).
31+
2. #1621, #1600, #1581 and #1019 when a fix lands; PR #1592 on Bun once it merges.
32+
3. The `git checkout -- bun.lockb` remedy text in a partial lockb takeover (backlog 24).
33+
4. `git+` copies inside workspace members; hosted → vendored takeover in an LFS repo on a legacy tree.
34+
5. Each new Bun canary's lock bytes.

‎state/bun.md‎

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

3-
Last updated: 2026-10-17 (run 47), main `657fce2`, latest release 5.0.1, latest Bun 1.4.3 (canary 1.4.4-canary.20261016 covered in run 46; no newer canary in run 47).
3+
Last updated: 2026-10-17 (run 48), main `7d3086f`, latest release 5.0.1, latest Bun 1.4.3 (canary 1.4.3-canary.20261017.1, reporting 1.4.4, covered in run 48).
44

55
Method (run 36 note: the authenticated routes work too: `--api-url <mock> --org o --api-token fake` serves `/v0/orgs/o/patches/{batch,by-package,package,view}`; still set `SOCKET_PATCH_SERVER_URL` to the mock origin or hosted pins aren't recognized and `rollback` exits `manifest_not_found`. Run 16 note: the sandbox shell exports `BUN_OPTIONS=--smol`, so unset it; run 17 note: on Bun ≥ 1.2, `bunfig [install] saveTextLockfile = false` writes a binary `bun.lockb`): real Bun installs (npm `@oven/bun-*` or GitHub release binaries) and a local Python mock of the patch API: batch, by-package, the `patches/package` grant, `patches/view` with blob contents, `blob/<hash>`, the hosted tarball route, and a `/registry/` passthrough for `SOCKET_NPM_REGISTRY`. Set `SOCKET_PATCH_SERVER_URL` and `SOCKET_PROXY_URL` to the mock (run 32: without a token the CLI uses the public-proxy routes `/patch/batch`, `/patch/by-package/<purl>`, `/patch/view/<uuid>`, `/patch/blob/<hash>` and `POST /patch/package`, and `patch.socket.dev` returns 403 through the sandbox proxy). Test repos need `node_modules/` in `.gitignore`, or the fresh-clone oracle reads committed store entries. The oracle is the marker bytes after a fresh-checkout `bun install --frozen-lockfile` with an empty cache, plus byte comparison of the lockfiles and `node require` where runtime matters. The repo's own matrix (`scripts/backtest-bun.py`, `bun-compatibility.yml`) already covers plain hosted and vendored shapes across Bun 0.8.1–1.4.2. It always runs with `--ignore-scripts` and never in agent mode, and it never runs `vex` on an isolated-linker tree. This ledger tracks what it doesn't.
66

@@ -78,6 +78,8 @@ Run 46 (main unchanged at `657fce2`, so no re-triage): no new bugs. First canary
7878

7979
Run 47 (main unchanged at `657fce2`, so no re-triage): new **#1621**. `socket-patch --update` on a Bun-installed copy refuses `managed_install` as "managed by npm" and gives npm commands: `npm update -g …` for a `bun add -g` install (a no-op), and `npm install …@latest` for a Bun project (stray `package-lock.json`, stale `bun.lock`, and the next `bun install --frozen-lockfile` fails) and for the bunx cache. It's the Bun twin of #1111 (pnpm). Reproduced on 1.1.39 / 1.2.23 / 1.4.3. The yarn `global` store variant was handed to yarn-classic. See the run 47 section below.
8080

81+
Run 48 (new main `7d3086f`: CI action pins only (#1590), no Rust change, so no re-triage): new **#1631**. Bun's workspace globs never match dot-directories with a wildcard (`packages/*` and `packages/**` skip `packages/.tools`; an explicit `packages/.tools` matches), but socket-patch's `WorkspacesDialect::BUN` / `BUN_PRE_1_3` set `dot: true`. An independent project in `packages/.tools` with its own lock is refused from inside (hosted `redirect_workspace_lockfile_elsewhere`, vendored `vendor_lockfile_missing`), and the root run skips it silently (the hidden-dir crawl skip), so hosted and vendored can't patch it at all (1.1.39 / 1.2.23 / 1.3.9 / 1.4.3 × text / lockb). Also passing: the canary's lock bytes, and the `bun.lockb` hosted → vendored takeover under registry 429s. See the run 48 section below.
82+
8183
Run 44 (new main `15ead12`: #1559 for #1541, plus non-Bun fixes): new **#1581**. On a tree a pre-#1541 release vendored, in a repo that LFS-tracks `*.tgz`, `repair` (the remedy `vendor --check` prints in an LFS-less clone) leaves the root `<uuid>/.gitattributes` as legacy `* -text`. The repaired tarball goes back into LFS on commit, and fresh frozen installs still fail (1.2.23 / 1.3.9 / 1.4.3; lockb member mirrors are upgraded; plain npm is the same). #1541 verified fixed for new vendored runs (1.2.23 / 1.4.3 × text / lockb × single / workspace), and the 5.0.1 → main vendored re-run + `git add --renormalize` upgrade path passes. Passing: the #1534 leftovers (lockfile-only nested project, nested project inside a workspace member dir) and main `vendor --revert` of 5.0.1-vendored (legacy `.gitattributes`) workspaces.
8284

8385
## Coverage matrix
@@ -649,6 +651,19 @@ Other passes (Linux, 1.4.2 unless noted):
649651
| 1.4.3 | bunx cache (`$TMPDIR/bunx-<uid>-<spec>`) | `npm install …@latest` | wrong target | **fail #1621** |
650652
| 1.4.3 / 1.2.23 / 1.1.39 | control: `bun add -g …@latest` / `bun add …@latest` | n/a | 4.0.0 → 5.0.1, frozen install passes | pass |
651653

654+
### Run 48 (main `7d3086f`, Linux)
655+
| Cell | Bun | Result |
656+
| --- | --- | --- |
657+
| Lock bytes (single + workspace, text + lockb) | 1.4.3 vs 1.4.3-canary.20261017.1 | identical |
658+
| hosted / vendored, single + workspace, text + lockb → fresh cold frozen install | canary 20261017.1 | pass |
659+
| `bun.lockb` hosted → vendored takeover, one purl's registry document 429s | 1.2.23 / 1.3.9 / 1.4.3 × single / workspace | pass (`redirect_revert_failed` for that purl, the other vendored, frozen install patched, re-run heals, `vendor --check` 0) |
660+
| `[install.lockfile] print = "yarn"` + vendored → frozen → `vendor --check` → revert | 1.2.23 / 1.4.3 × text / lockb | pass (yarn.lock left to Bun) |
661+
| Workspace glob model vs real Bun: braces, `[ab]`, `?`, `**`, `./`, trailing `/`, nested patterns | 1.2.23 / 1.4.3 | pass (same lists) |
662+
| Same, dot-directories (`packages/*` → `packages/.hidden`, `packages/**` → `packages/.cache/x`) | 1.2.23 / 1.4.3 | **fail #1631** (Bun skips them, socket-patch matches them) |
663+
| Independent project in `packages/.tools`: hosted / vendored member run, `--cwd`, PATH, `get` | 1.1.39 / 1.2.23 / 1.3.9 / 1.4.3 × text / lockb | **fail #1631** (false refusal; root run silent) |
664+
| Same, agent scan + `vex --product` | 1.4.3 text | pass |
665+
| Control: `!packages/tools2` independent project | 1.4.3 text | pass (`nested_project_skipped` from root, member run pins its own lock) |
666+
652667
## Backlog
653668

654669
0. **Maintainer request (partly covered in runs 3 and 6):** global (`-g`) mode for hosted patches. Still to do: a non-writable global dir must fail loudly (needs a probe; the sandbox runs as root); Windows 1.1.45/1.2.23 with an ASCII temp path; Bun 1.0.x. #443 is still open; re-test #434 (`bun.cmd`) on Windows now that #442 has landed. Checklist: the 20261001T040000Z entry.
@@ -676,9 +691,13 @@ Other passes (Linux, 1.4.2 unless noted):
676691
20. #1534 leftovers: macOS/Windows path quoting of the suggested PATH (lockfile-only and member-dir nesting pass, run 44).
677692
17. #1444: done in run 46 (79 pins, 429 mock: pass). Left: the same on `bun.lockb` (rollback refuses by design, so only the takeover) and on macOS/Windows.
678693
22. #1621: re-test when fixed (global, project, isolated-linker project, workspace root, bunx cache, the passive update notice, `bun.lockb` projects); macOS/Windows path shapes (`%USERPROFILE%\\.bun\\install\\global`).
679-
21. Each new Bun canary: compare its text and lockb bytes with the latest stable (run 46: 1.4.4-canary.20261016 identical).
694+
21. Each new Bun canary: compare its text and lockb bytes with the latest stable (run 46: 1.4.4-canary.20261016 identical; run 48: 1.4.3-canary.20261017.1 identical).
695+
23. #1631: re-test when fixed (member run in hosted / vendored mode, root-run reachability, `packages/**`, a lockless dot-directory under a lockless root, and `vex` on the stray lock). On macOS / Windows, check that Bun skips dot-directories the same way.
696+
24. The partial-takeover remedy text: on a shared `bun.lockb`, `redirect_revert_failed` advises `git checkout -- bun.lockb`, which would also discard the purls vendored in the same run (a re-run is the working remedy). Check whether the text lock and npm give the same hint before deciding whether it's worth a UX issue.
680697
## Known non-bugs
681698

699+
- A Bun `print = "yarn"` project: vendored / hosted runs leave the printed `yarn.lock` alone, and Bun regenerates it on its next install. Bun reads only `bun.lock(b)` (run 48).
700+
682701
- A `429` from the upstream registry during a hosted rollback / remove / takeover restore isn't retried: CLI_CONTRACT "Throttling" retries only patch-API JSON calls ("Nothing else is retried"), and the pin is refused `hosted_restore_refused` / `redirect_revert_failed` with nothing written for it. The lock stays frozen-installable and a re-run finishes (run 46).
683702
- Mock fixture (run 46): key patches by `name@version`, not by name, or second versions of a name (`ms`, `debug`) look unpatched in a large tree.
684703

0 commit comments

Comments
 (0)