Repository navigation
Bug hunt ledger: Bundler (RubyGems) #316
Replies: 94 comments
|
[agent] 2026-09-30: Bundler (RubyGems) bug-hunt run This is the first run, so the ledger started empty and there were no Tested: main Setup: the sandbox can't reach the Socket patch API. I used a temporary, uncommitted copy of Cells
Issues
False positives ruled out
Next
|
|
[agent] 2026-09-30: Bundler (RubyGems) bug-hunt run Tested: main Setup: a temporary, uncommitted copy of Cells
Issues
False positives ruled out
Next
|
|
[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 Bundler (RubyGems) puts global installs: What to check (prove each with a real global install, not by reading source):
Add OS × Bundler (RubyGems) version cells for |
|
[agent] 2026-10-01: Bundler (RubyGems) bug-hunt run Tested: main Setup: for agent and Re-triage
Cells (global mode, maintainer checklist)Probe run: https://github.com/SocketDev/socket-patch/actions/runs/36816092864 (ubuntu, macos and windows × Ruby 2.7 / 3.3 / 3.4).
Other cells
Issues
False positives ruled out
Blocked
Next
|
|
[agent] 2026-10-01: handover from the Composer bug-hunt routine (lead, unverified for gem) While I was confirming #438 (Composer, Windows), the root cause turned out to be Composer evidence: #438 and the probe run https://github.com/SocketDev/socket-patch/actions/runs/36827949605 |
|
[agent] 2026-10-01: Bundler (RubyGems) bug-hunt run Tested: main Setup: a hold-open copy of Re-triage
Cells
Issues
False positives ruled out
Blocked
Next
|
|
[agent] 2026-10-01: Bundler (RubyGems) bug-hunt run Tested: main Setup: a copy of Re-triage
Cells
Issues
False positives ruled out
Next
|
|
[agent] 2026-10-02: Bundler (RubyGems) bug-hunt run Tested: main Setup: uncommitted probe tests added to a copy of Re-triage
Cells
Issues
False positives ruled out
Next
|
|
[agent] 2026-10-02: Bundler (RubyGems) bug-hunt run Tested: main Setup: uncommitted probes in copies of Re-triage
Cells
Issues
False positives ruled out
Next
|
|
[agent] 2026-10-02: Bundler (RubyGems) bug-hunt run Tested: main Setup: uncommitted probe tests in a copy of Re-triage
Cells
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. This ledger still lists these issues as failing, but they are now closed:
Please re-check them and update the matrix on your next run. Generated by Claude Code |
|
[agent] 2026-10-02: Bundler (RubyGems) bug-hunt run Tested: main Setup: a ~30-line Python mock of the patch API serving Re-triage
Cells
Issues
False positives ruled out
Probe branches
Next
|
|
[agent] 2026-10-03: Bundler (RubyGems) bug-hunt run Tested: main Setup: a temporary Re-triage
Cells
Issues
False positives ruled out
Next
|
|
[agent] 2026-11-02: Bundler (RubyGems) bug-hunt run Tested: main Re-triage
Cells (backlog item 5)
Cells (backlog item 4, stale-install guard, OS/version-independent unit-level harness with a fake
All consistent with CLI_CONTRACT.md's Gem stale-install guard: group exclusion isn't part of the judgment, so the guard stays conservative (the shared copy is what Filed: nothing. Commented / closed: nothing. Ruled out: the excluded-group warning above (conservative, no false attestation); Probes: none (leftover Next
|
|
[agent] 2026-11-02: Bundler (RubyGems) bug-hunt run Tested: main Re-triage
Cells (backlog items 4 and 5). Each cell: the command → Gemfile byte-identical, lock keeps the patch-registry GEM remote → re-scan exit 0, Gemfile unchanged → frozen fresh install PATCHED, lock byte-identical →
After Filed: nothing. Commented / closed: nothing. Ruled out:
Probes: none (leftover Next
|
|
[agent] 2026-11-02: Bundler (RubyGems) bug-hunt run Tested: main Re-triage
New in Bundler 4.1.0.beta3 (2026-10-28): Cells
Filed: #1989 (#1989). Commented / closed: nothing. Ruled out: nothing new. #457 (closed) had the same symptom but a different cause (a missing blank line), so #1989 isn't a duplicate. Probes: none (leftover Next
|
|
[agent] Janitor: ledger drift. These issues are now closed, but this ledger still lists them as failing or awaiting a fix:
Please re-verify on current main and update the ledger. Generated by Claude Code |
|
[agent] 2026-11-13: Bundler (RubyGems) ledger reset by the maintainer The ledger had grown to 97 KB of state plus 68 run entries, and every run re-read all of it. It now starts clean for the 5.1.0-era main:
The routine now runs twice a day and hunts in this order: the common path in all three modes, the workflows people really have, then friction. |
|
[agent] 2026-11-13: Bundler (RubyGems) bug-hunt run Tested: main Harness: the sandbox reaches rubygems.org but not the Socket patch API, so I used a standalone mock (Python) of the patch API and the patch registry next to the real rubygems.org: real Re-triage: nothing to do. #1109 is Cells
Filed
Commented / closed: nothing. Ruled out
Not filed, worth a look later: the |
|
[agent] 2026-11-14: Bundler (RubyGems) bug-hunt run Tested: main Harness: a standalone Python mock of the patch API and registry next to the real rubygems.org, with real Re-triage: #2069 and #2070 are open and claimed; main has not moved, nothing to re-check. #1109 is Cells
Filed
Commented / closed: nothing. Ruled out
Not filed, worth a look later: |
|
[agent] 2026-11-14: Bundler (RubyGems) bug-hunt run Tested: main Harness: the standalone Python mock again (patch API on Re-triage: #2069 still reproduces on Cells
Filed
Commented / closed: nothing. Ruled out
|
|
[agent] 2026-11-15: Bundler (RubyGems) bug-hunt run Tested: main Harness: the standalone Python mock again, rebuilt from the state file's notes ( Re-triage: main has not moved; #2069, #2070, #2075, #2076, #2083 and #2084 are open and unchanged, nothing to re-check. #1109 is Cells
Filed
Commented / closed: nothing. Ruled out
|
|
[agent] 2026-11-15: Bundler (RubyGems) bug-hunt run Tested: main Harness: a Re-triage: main has not moved, so nothing to re-check. #1109 is Cells
Filed
Commented / closed: nothing. Ruled out
|
|
[agent] 2026-11-16: Bundler (RubyGems) bug-hunt run Tested: main Harness: the standalone Python mock again, with real Re-triage: main has not moved, so nothing to re-check. #1109 is Cells
Filed
Commented / closed: nothing. Ruled out
|
|
[agent] 2026-11-16: Bundler (RubyGems) bug-hunt run Tested: main Harness: the standalone Python mock, rebuilt from the state file's notes, with Re-triage: main has not moved, so nothing to re-check. #1109 is Cells
Filed
Commented / closed: nothing. Ruled out
|
|
[agent] 2026-11-17: Bundler (RubyGems) bug-hunt run Tested: main Harness: no mock this run. Agent records were written by hand ( Re-triage: not done. #2083 and #2086 (the two oldest without Cells (agent mode,
Filed
Commented / closed: nothing. Found, not filed (3-issue cap; first backlog item after re-triage)
Ruled out
|
|
[agent] 2026-11-17: Bundler (RubyGems) bug-hunt run Tested: main Harness: the standalone Python mock rebuilt from the state file's notes ( Re-triage (the two oldest without
Cells
Filed
Commented / closed: nothing. Ruled out
|
|
[agent] 2026-11-18: Bundler (RubyGems) bug-hunt run Tested: main Harness: a Python mock of the patch API and the patch registry (13 gems), plus Re-triage
Cells
Filed
Commented / closed: nothing. Ruled out
|
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 Bundler (RubyGems) bug-hunt routine (label pm:bundler).
Last run: 2026-11-18, main
89c482d, release 5.1.0, newest Bundler 4.1.0 stable (no newer prerelease) (tested so far: 1.17.3, 2.3.27, 2.4.19, 2.5.22/23, 2.6.9, 4.0.18, 4.0.24, 4.1.0.beta3, 4.1.0). Ruby 3.1.6, 3.2.6 and 3.3.6; RubyGems 4.1.0 on 3.2.6.The ledger was reset on 2026-11-13. The old 97 KB ledger is in this branch's history (
git show ec2d4516f:state/bundler.md); search it withgit grep, don't copy it back.Harness notes: the sandbox reaches rubygems.org but not the Socket patch API. A standalone mock of the patch API and patch registry works for all three modes (endpoints:
POST …/patches/batch,GET …/patches/by-package/<purl>,POST …/patches/package,GET …/patches/view/<uuid>withblobContent, and a compact index under/patch-registry/gem/<token>/<uuid>/; copy the/infoline from rubygems.org and swap the checksum). Build the patched gem by repacking the upstream.gemwith itsmetadata.gzunchanged, and pass--api-url <mock> --proxy-url <mock> --patch-server-url <mock>to every command (without a token the CLI calls the proxy URL). For vendored mode the grant'starballartifact needsintegrity.sha512(SRI) and a second artifact{"kind":"gem-stub-gemspec"}servinggem spec <patched.gem> --ruby. Give test repos a**/vendor/bundle/ignore line.--api-token fake --org testworks in place of the proxy route. rbenv Rubies are in/opt/ruby-3.1.6(Bundler 2.3.27, 2.6.9),/opt/ruby-3.2.6(2.4.19, 4.0.18),/opt/ruby-3.3.6(2.5.22, 4.0.18); Bundler 1.17.3 installs and runs on 3.1.6 (bundle _1.17.3_,RUBYOPT=-W0);gem install bundler -v 4.1.0/4.0.24works there (2.6.9 on 3.3.6 too), andgem update --system 4.1.0gives RubyGems 4.1. Select a Bundler withBUNDLER_VERSION. A patched gem can also be made without Ruby: copy the upstream.gem, change one file indata.tar.gzand recomputechecksums.yaml.gz. A realistic project:gem install rails -v 7.1.5into a scratchGEM_HOME, thenrails new app --skip-git --skip-bundle --skip-javascript --skip-hotwire --skip-asset-pipeline --skip-docker(81 gems, installs in 30 s); patch rack, rails-html-sanitizer, puma, bootsnap, web-console, capybara. Agent mode needs no mock at all: write.socket/manifest.jsonand.socket/blobs/<git-sha256>by hand (mkrec.pyin #2104), with the gem's own file asbeforeHash; for a native gem, injectrb_define_global_constinto anInit_function and check the constant afterrequire. A killedapplyistimeout -s KILL <secs> socket-patch apply.scan --mode agentworks through the mock when the view's files carryblobContent/beforeBlobContent(base64). A C marker that needs noInit_edit: append__attribute__((constructor)) static void m(void){ rb_define_global_const("X", Qtrue); }. Rails 8:gem install rails -v 8.0.2, samerails newflags (140 gems, 25 s). For a superseding patch, swap the mock to a new uuid for the same purl.Coverage matrix
Linux only. A cell is
passwith the Bundler versions and the date,fail #N,n/a, oruntested.bundle install, app loads patched code,vex, rollback,bundle installagainbundle cachetoo (11-15); Rails 8.0 app, 12 gems (5 native), deployment clone without dev/test, rollback byte-exact 4.0.18 (11-18)BUNDLE_PATH)GEM_HOME(11-15); native rebuild (bcrypt, precompiled ffi) and rollback byte-exact in a sharedGEM_HOME4.0.18, 2.5.22 (11-17)3b14afc, not re-run) (2.6.9, 4.0.18)scanandrollbackwith--gem-refresh-shared(11-15); the remedy after a plain rollback / remove fail #2086bundle config set path vendor/bundleBUNDLE_DEPLOYMENT,BUNDLE_FROZEN,.bundle/config)GEM_HOME=BUNDLE_APP_CONFIG, deployment,without) 4.0.18 (11-17)BUNDLE_WITHOUTtoo, 4.0.18 (11-14)-x86_64-linux)rubyplatform it installs patched, standalonevexfail #20873b14afc(staged rebuild from the source gem, #2098), 4.0.18, 11-17: precompiled nokogiri 1.18.3 (C file, and an addedpatches/libxml2/*.patchwith nocache/), ffi 1.17.1, sqlite3 2.5.0, google-protobuf 4.29.3, and 26 source-built gems (puma, nio4r, bcrypt, json, msgpack, bootsnap, oj, prism, openssl, psych ...): app loads the patch,vex,bundle pristinethen re-apply, rollback byte-exact. Gems that build in their own tree: scrypt rollback fail #2104, digest-crc no-op build fail #2105, argon2 never rebuilds fail #2106. Anapplykilled at 12 points through the build,--offlinewithout the source gem and no compiler onPATHall leave the gem intact and recover (11-17). Precompiled pg withoutlibpq-dev: untouched, the error hides the cause, fail #2117Bundler.requireloads it was fail #2084 (fixed on3b14afc, not re-run)bundle update/bundle add/bundle remove/bundle outdatedafter patching--redownloadthenapply(11-14)lock --add-platform,cache(11-14)lock --add-platform,update <other gem>,clean,doctor,binstubspass 4.0.18 (11-14);lock --update,update --conservative,lock --add-checksums,--normalize-platforms,check,listpass 4.0.18 (11-16); outdated / update was fail #2070;outdated,update --all,bin/setupon the Rails 8 app pass 4.0.18 (11-18)GemfileandGemfile.lockbyte for byteremove,vendor --revertpass 4.0.18 (11-14)vendor/cachearchives too (11-16); installed copy left patched when the gem home has nocache/dir, fail #2092;removeof a transitive and a direct gem out of 12 pass 4.0.18 (11-18);rollbackunder a plain-httpSOCKET_RUBYGEMS_URLis refused as documented, nothing written (11-18)vexreports only what is really appliedbundle pristinetoo (11-13)vendored_tree_out_of_syncwas fail #2076 (fixed on3b14afc, not re-run)gems.rb/gems.lockedspellinggemfile_not_loaded), not re-runlist, rollback from the root (11-16)list, rollback from the root (11-14)setupand the Bundler plugin it installssetupand the plugin were removed in v5 (CLI_CONTRACT "…no longer published"); onlygem_bundler_plugin_staledetection is left, untested\continuation, modifiers,;,platforms/install_if/groupblocks, tabs, CRLF, no final newline,=beginblocks,__END__, comments that look like declarations)--jsonoutputpristine,vex, rollback (tree byte-exact) pass on89c482d, with a native gem (bcrypt) too: the.sois recompiled upstream (#2089 fixed, 11-18); agent to vendored and back leaves the in-place patch with no record, fail #2093; vendored then agent for the gem vendored mode refused (mixed): install,vex,repair, rollback pass 4.0.18 (11-16)pristinepasses (#2083 fixed, 11-18);get <purl> --mode vendoredover one of three hosted gems pass 4.0.18 (11-16)repairandscan --pruneleave it alone (11-16); any revert of the vendored gem then corrupts the lock, was fail #2090 (fixed on3b14afc, not re-run)OVERRIDESlock, and on RubyGems 4.1 with a native rebuild (11-16)OVERRIDESlock and the new default lock that lists therubyvariant beside platform builds (11-16)OVERRIDES,global_gem_cache,cooldown(patched gem newer than the window), RubyGems 4.1 native refresh (11-16);prunefail #2092;CONTENT ADDRESSESuntestedvex, rollback (11-17)check,vex, rollback (11-17)GEMsection, deployment clone,outdated,update,vex, rollback,pristine(11-17)Backlog
SOCKET_RUBYGEMS_URL, a private source, a Rust (rb_sys) gem, sass-embedded / other binary-only platform gems, eventmachine (C++), a.h-only patch, musl, two projects with their own records for one gem in a shared gem home. The rebuilt nokogiri links systemliblzma/libzdynamically where the prebuilt one is self-contained: check a slim runtime image.remove/vendor --revert(not onlyrollback) and--offlineafter hosted to vendored (Fix vendored gem unwind leaving a hosted-patched install (#2083) #2113); a superseding patch on one gem of a hosted + vendored pair;get(notscan) onto a newer agent patch; a superseding agent patch for a gem with a native extension.redirect_gem_no_checksums_sectionsays "bundler < 2.6 does not write one" on a 2.6.9 lock (its remedy works);scan --mode vendoredexits 1 whenever one patched gem is refused, with next steps that read like success (noted in Vendored gem scan on a stock Rails Gemfile fails 5 of 7 gems (group blocks, native extensions) and none of the errors says what to do, thoughgroup:at the top level and--mode hostedboth work #2091);remove <gem>from a monorepo root doesn't name the sub-projects that pin it;apply --checksays "Runsocket-patch applyto regenerate them" for a gemapplyrefuses; the hosted next step says "a plainbundle installkeeps the gems it already has" when the stale copy is a platform build the lock no longer names;docs/usage.mdnever mentions Ruby.group:at the top level and--mode hostedboth work #2091), Bundler 2.6.9 / 2.5.22 / 4.1.0 on it,bundle update railsto 8.1 with hosted pins, a hosted transitive pin that blocks an upgrade of its parent, thruster (platform-only gem).scan --prune; in-tree build gems after Fix in-place gem rebuild ignoring in-tree build products (#2104, #2105) #2108 (scrypt, digest-crc: re-run Agentrollbackof a gem that builds its library in its own tree (scrypt, ffi-compiler gems) restores the source but leaves the patched binary loaded, and no command lists it afterwards #2104 / Agentapplyreports a digest-crc C patch applied andvexattests it, but the gem's Rakefile build is a no-op and Ruby keeps loading the unpatched extension #2105 repros)./opt/ruby-*itself,apply --dry-runstarts no Ruby, a relative crawl root (Rebuild gem native extensions from a relative crawl root #2048). Other flags the nested apply ofscan --mode agentmay drop (same cause asscan --mode agent --no-gem-native-rebuild(andSOCKET_NO_GEM_NATIVE_REBUILD=1) still rebuilds the gem native extension andvexattests it; onlyapplyandgethonor the opt-out #2069).--gem-refresh-sharedwith two projects pinning the same gem version,removeof one gem out of several,SOCKET_GEM_REFRESH_SHARED=1.rbenv install 2.7.8if it builds in time).rollback/removetell the user to re-run with--gem-refresh-shared, but the re-run exits 1 with "nothing to roll back" and the patched gem stays in the shared gem home #2086 (still reproduces on89c482d, 11-18), Standalonevexrefuses a hosted gem asnot_appliedbecause of a leftover<gem>-<version>-x86_64-linuxdirectory that has no gemspec, after the scan's ownrm -f … && bundle installremedy #2087 (claimed 11-18, not re-run), Vendored gem scan on a stock Rails Gemfile fails 5 of 7 gems (group blocks, native extensions) and none of the errors says what to do, thoughgroup:at the top level and--mode hostedboth work #2091, Hosted gemrollback/removeleave the patched gem installed when the gem home has nocache/dir (Bundler 4.1prune,rm -rf ruby/*/cache), and the "next package-manager install" note does not fix it #2092, Vendoring a gem that agent mode already patched drops its manifest record but keeps the in-place patch, so afterrollback/remove/vendor --revertthe app still loads patched code and no command can undo it #2093, Agent re-scan that replaces a gem patch with a newer one leaves the old patch's other files patched:apply --checkandvexpass, and afterrollbackthe app still loads patched code that no command lists #2096, Agentapplycan never rebuild argon2, the gem the docs name as rebuilt from its installed tree: its one-shotextconf.rbfails onMakefile.real, and the remedy says to install a compiler #2106, Agentapplybuild failure for a precompiled gem (pg without libpq-dev) cuts off the cause, points at anmkmf.logit has deleted, and says to install a compiler that is already there #2117 and Agent-modescanfrom a monorepo root skips the Bundler projects below it without a word: "No packages found. Run your package manager's install first." or a success summary for the root alone #2125 once fixed.scan --mode agent --no-gem-native-rebuild(andSOCKET_NO_GEM_NATIVE_REBUILD=1) still rebuilds the gem native extension andvexattests it; onlyapplyandgethonor the opt-out #2069, A hosted-patched gem disappears frombundle outdatedandbundle updatecan no longer move it, and nothing in the scan output or docs says so #2070, Vendored gem scan exits 1 with "Gemfile.lock GEM specs has no entry" for a gem in the shared gem home that the project does not lock, where hosted mode skips it with a warning #2075,vexwarnsvendored_tree_out_of_syncfor every vendored gem afterbundle install, and the remedy it names never clears it because Bundler keeps the unused registry copy #2076, Vendored mode declares a transitive gem withoutrequire: false, soBundler.requirestarts loading it at boot (hosted mode adds the option) #2084, Reverting a vendored gem while another gem is hosted puts its spec in the hosted gem'sGEMsection: freshbundle installfails androllbackcan no longer undo either gem #2090, Agentrollbackof a gem that builds its library in its own tree (scrypt, ffi-compiler gems) restores the source but leaves the patched binary loaded, and no command lists it afterwards #2104 and Agentapplyreports a digest-crc C patch applied andvexattests it, but the gem's Rakefile build is a no-op and Ruby keeps loading the unpatched extension #2105 were closed by fixes; a pass over each is cheap.Known non-bugs
The full list is in
known-non-bugs/bundler.mdon this branch. Search it withgit grepbefore filing, and append one line when you rule something out. Don't read it whole. Most likely to be re-filed:gem buildhas a different gemspec. Repack with the originalmetadata.gz.vex/listreport no patches on a hosted project whose patch URLs are on loopback: pass--patch-server-url.vexexits 2 asking for a product when the project has no git origin, gemspec or other manifest: pass--product.apply --checksays a native gem is out of sync after Bundler rebuilt it from the hosted patched gem (agent record + hosted pin): documented, runapplyagain after a reinstall.All reactions