Bug hunt ledger: Bun #306
Replies: 6 comments
|
[agent] 2026-09-30: Bun bug-hunt run Tested: main Method: the patch API is unreachable from the sandbox ( This is the first run: there was no earlier ledger and no Cells
Issues
False positives ruled out
Probe
Next
|
|
[agent] 2026-10-01: Bun bug-hunt run Tested: main Method: same as run 1, with the mock rebuilt ( Re-triage (on
|
|
[agent] 2026-10-01: maintainer note: test global ( This is a maintainer request, not a run report. Add it to the top of the backlog and keep it there until the cells below are covered. Ask: make sure we correctly scan global installs when Where Bun puts global installs: What to check (prove each with a real global install, not by reading source):
Add OS × Bun version cells for |
|
[agent] 2026-10-01: Bun bug-hunt run Tested: main Method: real Re-triage (on
|
|
[agent] 2026-10-01: Bun bug-hunt run Tested: main Method: a Python mock of the authenticated patch API ( Re-triage
Cells
Issues
False positives ruled out
Blocked
Next
|
|
[agent] 2026-10-01: Bun bug-hunt run Tested: main No probe branch this run: Method: a Python mock of the patch API ( Re-triage
Cells (Linux)
Issues
False positives ruled out
Blocked
Next
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
[agent] Progress ledger for the scheduled Bun bug-hunt routine (label pm:bun).
Last updated: 2026-10-01 (run 5), main
61cfb9b, latest release 4.0.0, latest Bun 1.4.2.Method: real Bun installs (npm
@oven/bun-*or GitHub release binaries) and a local Python mock of the patch API: batch, by-package, thepatches/packagegrant,patches/viewwith blob contents,blob/<hash>, the hosted tarball route, and a/registry/passthrough forSOCKET_NPM_REGISTRY. SetSOCKET_PATCH_SERVER_URLto the mock. The oracle is the marker bytes after a fresh-checkoutbun install --frozen-lockfilewith an empty cache, plus byte comparison of the lockfiles andnode requirewhere 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-scriptsand never in agent mode, and it never runsvexon an isolated-linker tree. This ledger tracks what it doesn't.Coverage matrix
bun patchvex: isolated linkerbun.lockbtakeover ⇄ revertGlobal mode (
-g, agent; run 3)BUN_INSTALL_BINsetBUN_INSTALL_GLOBAL_DIRset-g --mode hostedrefusalbun.cmd)bun add -gfailed in the probe's space+unicode temp path)Untested: a non-writable global dir, a symlinked
BUN_INSTALL, and Bun 1.0.x.Bundled dependencies (
bundled: truelock entries; run 4)vexvexvex --no-verifynot_applied)Non-registry copies of a patched
name@version(run 5, Linux)vexvexvex --no-verifynot_applied)file:tgz)bun.lockb,github:tuplesLock-shape edge cases (run 5, Linux)
bun.lock+ CRLFpackage.json(1.1.45 v0, 1.3.14, 1.4.2): hosted scan → frozen install →rollback, and vendored →vendor --revert. Both byte-exact: pass.bun install --yarn(siblingyarn.lock), on 1.1.45 lockb, 1.2.23 and 1.4.2: hosted rewires both locks; lockbrollbackrefuses and touches neither file: pass.[install.scopes]custom-registry scope (1.3.14, 1.4.2): hosted rewrite and byte-exact rollback: pass.vexis correct: pass.bun addafter hosted (all four versions; the pins survive) and after vendored (digest-less re-save on < 1.3.10, healed by the re-run): pass.Takeovers and vendored VEX (run 4, Linux)
vendored_tree_out_of_syncis missing (1.4.2): fail, under With Bun's isolated linker,vexattests a hosted patch as not_affected (verified) while the installed copy under node_modules/.bun is still unpatched (v5 regression) #405 (comment). Hoisted control: pass.Other passes (Linux, 1.4.2 unless noted):
scan --global, and the (pre-v5)setuphook.SOCKET_GLOBAL=1≡-g;SOCKET_GLOBAL_PREFIX/--global-prefixscan only that dir;scan -ginside a project with a bunfig settingglobalDirdoesn't leak project dirs;vexwithout-gignores global copies.remove,repairandliston hosted pins.bun.lockbidempotency,--dry-run, and the rollback refusal.catalog:andoverrides.package.json.Backlog
-g) mode for hosted patches. Still to do: a non-writable global dir must fail loudly; a symlinkedBUN_INSTALL; Windows 1.1.45/1.2.23 with an ASCII temp path; Bun 1.0.x. Re-test Global mode misses every Bun global package when BUN_INSTALL_BIN or BUN_INSTALL_GLOBAL_DIR is set: scan -g reports success with nothing found, get -g / vex -g patch and attest nothing #443 (still reproduces on61cfb9b) and On Windows,scan -g/get -g/vex -gfind no global npm packages becausenpm root -gis spawned as barenpm, which never resolves tonpm.cmd#434 (bun.cmd) once PR Fix global PM probes spawning bare names from the project (#421, #434, #438, #440) #442 lands. Checklist: the 20261001T040000Z entry.bughunt/bun/20260930-default-trust,bughunt/bun/20260930-isolated-bunpatch,bughunt/bun/20261001-vex-isolatedandbughunt/bun/20261001-global-dirs. The sandbox can't delete branches (still denied in run 5), so no new probes until that's fixed.file:tarball copy of the patched package without warning, and vendoredvexattests not_affected (the #326 fix covers npm locks only) #497 variants:github:tuples (unresolvable in the sandbox, needs a probe) and a binarybun.lockbwith a URL dependency. Re-test when fixed.bundled: truelock entries that Bun never fetches: the bundled copy stays unpatched, scan reports success, and vendoredvexattests not_affected #469 follow-ups: macOS/Windows cells;bundledinside a workspace member;rollback/removeof a rewired bundled entry; re-test when fixed..bunjoins the crawler walks (Fix npm crawler missing relocated dependency stores (#359, #362) #365 landed without it). Then re-check the With Bun's isolated linker,vexattests a hosted patch as not_affected (verified) while the installed copy under node_modules/.bun is still unpatched (v5 regression) #405 vendored warning and Windows agent mode with the isolated linker (junctions).socket.ymlpolicy and per-run limits in a Bun workspace.Known non-bugs
patches-api.socket.devis blocked by the sandbox proxy. Mock the API. Also, the CLI's reqwest can't reachregistry.npmjs.orgfrom the sandbox (curl can), so hosted rollback/remove needSOCKET_NPM_REGISTRYpointed at a local passthrough. Without it you getcannot restore … error sending request, which is a sandbox artifact.rollback→missing_blobwhen the mock serves no before-blob (fixture limit).rollbackremoves the rolled-back entries from.socket/manifest.json, so a laterapplyis a success no-op (CLI_CONTRACTrollbackrow).bun.lockbpins:rollback/removerefuse with thegit checkout -- bun.lockbremedy (documented). After a hosted → vendored →vendor --revertround trip,bun.lockbis semantically identical (samebun pm hashand yarn dump) but not byte-identical: its string buffer keeps the dead URLs. The doc promises a byte-exact registry record, not the whole file.linker = "isolated"). From Bun 1.3.x a fresh workspace lock defaults to isolated.setupwas removed in v5 (v5 prerelease: scan → vex → vendor workflow, hosted by default #277). The run-1setuppass is obsolete.bun pm untrustedbut has no observable effect. Use better-sqlite3 to observe On Bun ≥ 1.3.5, hosted and vendored rewiring drops Bun's default trust, so install scripts of patched packages (better-sqlite3, esbuild, sharp…) are silently blocked #371.redirect_bun_workspace_unsupported), a pre-v2 workspace lock in vendored mode (vendor_bun_workspace_unsupported), and missing digest enforcement for text-lock URL/local tuples on Bun < 1.3.10.--global-prefixmust name thenode_modulesdir itself (~/.bun/install/global/node_modules). Its parent scans 0 packages; the flag is documented as the packages root.-gcombined with--mode hostedis a clap-level conflict: plain-text error, exit 2, no JSON envelope even with--json. Consistent with other usage errors.scan --dry-runexits 0 withstatus: successandwould_refusewhile the real run exits 1 withpartial_failure, for the same Bun preflight refusal. Documented (CLI_CONTRACTwould_refuse).vexattests from the committed artifact even when the installed tree is stale. By design: only avendored_tree_out_of_syncwarning is owed.vexon a bundled-copy project correctly refuses (not_applied). Bun hosted and vendored rewiring rewritesbundled: truelock entries that Bun never fetches: the bundled copy stays unpatched, scan reports success, and vendoredvexattests not_affected #469 is about vendored mode and--no-verify.bun pm bin -gignores a project-localbunfig.toml, soscan -ginside a project can't be redirected by the project.bun add, on Bun < 1.3.10 re-saves the local tuples withoutsha512. That's documented ("Digest-less re-saves"): the vendored re-run reportsalready_vendoredand re-pins the digest.""as the registry field of a tuple even when it came from an[install.scopes]or custom default registry, so rollback restoring""is correct.bun install --yarnproject, hostedrollbackrestoresbun.lockbyte-exact but adds a#<sha1>fragment to Bun'syarn.lockresolvedlines. It's semantically equivalent and yarn-classic's rewriter, so it isn't filed as a Bun bug.IntegrityCheckFailed.link:deps needbun linkregistration, andgithub:deps don't resolve in the sandbox. Both are environment limits.All reactions