GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — With Bun's isolated linker, `vex` attests a hosted patch as not_affected (verified) while the installed copy under node_modules/.bun is still unpatched (v5 regression) · Issue #405 · SocketDev/socket-patch Closed Labels agent:triagedbugSomething isn't workingSomething isn't workingbughuntFound by a scheduled package-manager bug-hunt agentFound by a scheduled package-manager bug-hunt agentpm:bunBunBunpriority:p1 Description[agent] Found by the scheduled Bun bug-hunt routine (ledger #306). SummaryWith Bun's isolated linker, v5 hosted mode is the default for This is a regression from 4.0.0. 4.0.0 omits the same purl from the document ( Related: #366 shares the root cause (agent mode can't see packages under ImpactThe document says
Every Bun ≥ 1.3 workspace that runs Repro (Linux, Bun 1.4.2, main
|
| OS | Bun 1.2.23 (linker = "isolated") |
Bun 1.3.14 (isolated / default workspace) | Bun 1.4.2 (isolated / default workspace) | hoisted control |
|---|---|---|---|---|
| Linux | fail | fail / fail | fail / fail | pass (not_applied) |
| macOS (macos-latest) | fail | fail / fail | fail / fail | pass |
| Windows (windows-latest) | fail | fail / fail | fail / fail | pass |
On Bun 1.2.23 a default workspace still installs hoisted, so that cell is correctly not_applied on all 3 OSes. That's expected, not a fix.
Regression check (Linux, Bun 1.4.2, isolated): release 4.0.0 → omitted (package_not_found), pass. main 2463257 (#277, v5) → attested, fail. So the first bad commit is the v5 consolidation (#277), the one that added manifest-less VEX's "attest from the pin when nothing is installed".
crates/socket-patch-cli/src/commands/vex_consumed.rs:69-121 (hosted_consumed_copies): npm's shared-location copies come from the crawler's installed map plus the alias walk and identity fallback. None of these walks node_modules/.bun/*/node_modules/<name>. with_store_variants (:323) only expands copies that were already found.crates/socket-patch-core/src/vex/verify.rs:98-105: an empty HostedCopies.paths means "none installed", which the lockfile basis then excuses. The npm crawler's missing .bun store discovery (the same gap as Bun isolated linker: transitive packages under node_modules/.bun are "not installed" in agent mode, and scan --mode agent exits 0 with them unpatched #366, crates/socket-patch-core/src/crawlers/npm_crawler.rs) turns that into a false attestation.A fix for #366 that teaches the crawler the .bun store would probably fix this too. Even so, vex should probably refuse to take the "nothing installed" branch while node_modules/.bun/ exists.
Probe run (3 OS × Bun 1.2.23 / 1.3.14 / 1.4.2, main built on each runner; cases iso-bunfig, ws-default, hoisted-control): https://github.com/SocketDev/socket-patch/actions/runs/36801259018
[agent] Triaged: priority:p1 (Bun, npm family). Not a duplicate. #366 is the agent-mode symptom, and this is the hosted-VEX symptom.
Shares root cause with #359, #362, #366, #373: the npm crawler recognizes dependency stores only by hard-coded directory names, so node_modules/.bun/<name>@<ver>/node_modules/<name> is dropped by the generic hidden-entry skip. hosted_consumed_copies then sees no installed copy and VEX takes the "nothing installed" branch. Will be fixed together in #365, which I'm taking over this run.
Generated by Claude Code
[agent] Bun bug-hunt routine (ledger #306): still reproduces on main d984832. Here's a vendored-mode variant with the same root cause (the .bun/ store is invisible to the installed-copy lookup).
In vendored mode the attestation standing on the committed artifact is by design (CLI_CONTRACT "Vendored" row). But the contract also says "A present installed tree with different bytes only warns vendored_tree_out_of_sync", and with the isolated linker that warning never fires:
echo '{"name":"p","version":"1.0.0","dependencies":{"to-regex-range":"5.0.1"}}' > package.json printf '[install]\nlinker = "isolated"\n' > bunfig.toml && bun install socket-patch scan --mode vendored --json --yes $G # [email protected] vendored, bun.lock rewired # not reinstalled: node_modules/.bun/[email protected]/node_modules/is-number/index.js is unpatched socket-patch vex --json -O o.json $G # success, verified, warnings: []
| Bun 1.4.2, Linux, 2 runs each | installed copy | vex warnings |
|---|---|---|
linker = "isolated" |
.bun/[email protected]/… unpatched |
[] (missing) |
linker = "hoisted" (control) |
node_modules/is-number unpatched |
["vendored_tree_out_of_sync"] |
After a fresh bun install --frozen-lockfile, the isolated store copy (.bun/[email protected]+vendor+npm+<uuid>+is-number-7.0.0.tgz/…) is patched and vex is correct. A fix for the .bun store lookup should restore the warning too.
Generated by Claude Code
[agent] Re-triaged after the vendored-mode comment: still priority:p1. The missing vendored_tree_out_of_sync warning has the same root cause (the .bun/ store is invisible to the installed-copy lookup), so it's in scope here.
Generated by Claude Code
[agent] Claiming this issue (with #366, #373, #495; shared root cause: the npm crawler only recognizes isolated stores by hard-coded names/shapes, so .bun, .deno and Yarn 4's .store are skipped). Branch: agent/fix-npm-crawler-isolated-stores. Claim-ID: 2026-10-01T19:20:55Z-253dcb
Generated by Claude Code