Bug hunt ledger: Bun #306
Replies: 12 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
|
|
[agent] 2026-10-02: Bun bug-hunt run Tested: main Method: a fresh Python mock of the org-scoped patch API ( Re-triage
Cells (Linux)
Issues
False positives ruled out
Blocked
Next
|
|
[agent] 2026-10-02: Bun bug-hunt run Tested: main Method: a fresh Python mock of the org-scoped patch API ( Re-triage
Cells (Linux): backlog item 5,
|
|
[agent] 2026-10-02: Bun bug-hunt run Tested: main Method: a fresh Python mock of the org-scoped patch API ( Re-triage
Cells (Linux)
Issues
False positives ruled out
Next
|
|
[agent] Janitor: ledger drift. The coverage matrix still lists these issues as
This is a heads-up only. The janitor never edits ledgers. Generated by Claude Code |
|
[agent] Janitor: ledger drift. The coverage matrix still lists these issues as
This is a heads-up only. The janitor never edits ledgers. Generated by Claude Code |
|
[agent] 2026-10-02: Bun bug-hunt run Tested: main Method: a fresh Python mock of the public proxy ( Re-triage
Cells (Linux)
IssuesFalse positives ruled out
Next
Generated by Claude Code |
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-02 (run 9), main
203e092, 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.Run 9: #366, #405 (fixed by #496) and #469 (fixed by #472) were verified fixed on Linux. Their cells below now read pass (Linux), and the macOS/Windows cells for them are untested on the fixed main.
Coverage matrix
bun patchvex: isolated linkerbun.lockbtakeover ⇄ revertIsolated-store edge cases after #496 (run 9, Linux)
+<hash>entries--backend=symlinkvexfresh clonevexafter in-place frozen reinstall (orphaned.bunentries)vexafter in-place reinstallvendored_tree_out_of_sync(#599)Global 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(URL tgz; run 6)github:tuplessocket.ymlpolicy and staged rollout (run 6, Linux)maxNewPatches: 1advancemaxNewPatches: 1advanceignorePackageskeeps pinenabled: falsewrites nothingsocket.ymlacross several independent Bun projects in one repo (run 7, Linux)includePaths(hosted, PATH glob)maxNewPatchesacross dirsminSeverityflag > env > fileignorePathskeeps pins byte-identical!/tests/re-include**/bun.lockbmarkerAgent mode applies path policy only at the scan root, so nested independent projects are always patched. That's generic, not Bun-specific: handed to npm (
entries/npm/20261002T072532Z-from-bun.md).Workspace members under ignored paths, and growth after a scan (run 8, Linux)
tests/member: agenttests/member: hosted (frozen patched)ignorePathsover members keeps them (agent / hosted / vendored)package-lock.json+bun.lockhosted.npmrcremoved)Between a scan and its re-run, an unwired registry copy of a patched
name@versionin the same lock is still attested by vendoredvexand by hostedvex --no-verify. npm does the same, so it's handed to npm (entries/npm/20261002T133747Z-from-bun.md), not filed as a Bun bug.Also passing in run 6: a dual-lock checkout (
bun.lock+ a stalebun.lockb, where Bun ≥ 1.2 readsbun.lockand hosted rewrites only it), and global mode with a symlinkedBUN_INSTALL(1.4.2: agent scan,vex -g,rollback -g).Lock-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 (needs a probe; the sandbox runs as root); Windows 1.1.45/1.2.23 with an ASCII temp path; Bun 1.0.x. 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 is still open (re-checked in run 9); re-test 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) on Windows now that Fix global PM probes spawning bare names from the project (#421, #434, #438, #440) #442 has landed. Checklist: the 20261001T040000Z entry.bughunt/bun/20260930-default-trust,bughunt/bun/20260930-isolated-bunpatch,bughunt/bun/20261001-vex-isolatedandbughunt/bun/20261001-global-dirs. Deletion is still blocked from the sandbox (runs 7–9), so no new probes until then.vexrefuses every hosted patch as not_applied after the usual in-placebun install, because it checks orphanednode_modules/.bunregistry entries that Bun never removes (regression from #496) #599 follow-ups: the orphan state after a version upgrade, and after hosted →rollback→ in-place install. Re-test when fixed.vexattests a hosted patch as not_affected (verified) while the installed copy under node_modules/.bun is still unpatched (v5 regression) #405 / 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 fixes (Windows isolated uses junctions).file:tarball copy of the patched package without warning, and vendoredvexattests not_affected (the #326 fix covers npm locks only) #497github:tuples (needs a probe); re-test Bun hosted and vendored modes skip a URL orfile:tarball copy of the patched package without warning, and vendoredvexattests not_affected (the #326 fix covers npm locks only) #497 when fixed.ignorePathsover workspace members on 1.3.14 / 1.1.45.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.scan <workspace-member>(e.g.scan packages/a): hosted reportssuccesswith 0 redirected andredirect_npm_no_lockfile; vendored refuses withvendor_lockfile_missing. Pinned as today's behaviour in bun-compatibility.md ("Not measured"); scan the root instead.scan -gis report-only. Use--mode agentto patch global copies.-gagent runs record the global copies in the cwd's.socket/manifest.json(by design).bun.lockcan't be read by Bun 1.1.45 (lockfile had changes, but lockfile is frozen) even without socket-patch. Whenbun.lockandbun.lockbare both present, Bun ≥ 1.2 readsbun.lock.SOCKET_PATCH_SERVER_URLmust name the same origin across runs. A mock on another port makes the earlier pins non-hosted.node_modulesand warnsredirect_bun_entry_not_foundfor their packages (exit 0). They have their own locks: scan them by PATH (scan '*/*' --mode hosted).blob/<hash>route. Without it the result ispartial_failure.vendor_bun_workspace_unsupported. That's the documented pre-v2 workspace limitation, and the lock is untouched.vexexit 2product_undetectedin a fixture without a package version or git origin: pass--product(fixture limit).node_modules/.bunentries: after a dependency is removed, its store dir (and, on 1.4.2, the member link) stays. That's Bun behaviour. It only matters to socket-patch through With Bun's isolated linker,vexrefuses every hosted patch as not_applied after the usual in-placebun install, because it checks orphanednode_modules/.bunregistry entries that Bun never removes (regression from #496) #599.applyon a workspace whose member links into an isolated store reports a duplicatealready_patchedskip per member-linked package (counts only, the bytes are right). pnpm behaves the same, so it's handed to pnpm (entries/pnpm/20261002T193154Z-from-bun.md).scan -gwithBUN_INSTALL_GLOBAL_DIRset reports the Node global prefix's packages, not Bun's. That's 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, not a new bug.All reactions