|
1 | 1 | [agent] Progress ledger for the scheduled Bundler (RubyGems) bug-hunt routine (label pm:bundler). |
2 | 2 |
|
3 | | -Last run: 2026-11-15, main `63f791d`, release 5.1.0, newest Bundler 4.0.24 stable and 4.1.0.beta3 prerelease (tested so far: 2.3.27, 2.4.19, 2.5.22/23, 2.6.9, 4.0.18, 4.0.24, 4.1.0.beta3). Ruby 3.1.6, 3.2.6 and 3.3.6. Second run of 11-15. |
| 3 | +Last run: 2026-11-16, main `63f791d`, release 5.1.0, newest Bundler 4.1.0 stable (released 2026-11-16; no newer prerelease) (tested so far: 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. |
4 | 4 |
|
5 | 5 | 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 with `git grep`, don't copy it back. |
6 | 6 |
|
7 | | -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>` with `blobContent`, and a compact index under `/patch-registry/gem/<token>/<uuid>/`; copy the `/info` line from rubygems.org and swap the checksum). Build the patched gem by repacking the upstream `.gem` with its `metadata.gz` unchanged, 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's `tarball` artifact needs `integrity.sha512` (SRI) and a second artifact `{"kind":"gem-stub-gemspec"}` serving `gem spec <patched.gem> --ruby`. Give test repos a `**/vendor/bundle/` ignore line. `--api-token fake --org test` works in place of the proxy route. For a gem with precompiled builds, `nokogiri 1.16.0` compiles from source in under a minute here. 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); `gem install bundler -v 4.0.24` / `4.1.0.beta3` works there (2.6.9 on 3.3.6 too). A patched gem can also be made without Ruby: copy the upstream `.gem`, change one file in `data.tar.gz` and recompute `checksums.yaml.gz`. A realistic project: `gem install rails -v 7.1.5` into a scratch `GEM_HOME`, then `rails 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. |
| 7 | +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>` with `blobContent`, and a compact index under `/patch-registry/gem/<token>/<uuid>/`; copy the `/info` line from rubygems.org and swap the checksum). Build the patched gem by repacking the upstream `.gem` with its `metadata.gz` unchanged, 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's `tarball` artifact needs `integrity.sha512` (SRI) and a second artifact `{"kind":"gem-stub-gemspec"}` serving `gem spec <patched.gem> --ruby`. Give test repos a `**/vendor/bundle/` ignore line. `--api-token fake --org test` works in place of the proxy route. For a gem with precompiled builds, `nokogiri 1.16.0` compiles from source in under a minute here. 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); `gem install bundler -v 4.1.0` / `4.0.24` works there (2.6.9 on 3.3.6 too), and `gem update --system 4.1.0` gives RubyGems 4.1 (the container is new each run). Select a Bundler with `BUNDLER_VERSION`. The sandbox refuses `rm -rf` on a path built from `$HOME`; use a new directory instead. A patched gem can also be made without Ruby: copy the upstream `.gem`, change one file in `data.tar.gz` and recompute `checksums.yaml.gz`. A realistic project: `gem install rails -v 7.1.5` into a scratch `GEM_HOME`, then `rails 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. |
8 | 8 |
|
9 | 9 | ## Coverage matrix |
10 | 10 |
|
11 | 11 | Linux only. A cell is `pass` with the Bundler versions and the date, `fail #N`, `n/a`, or `untested`. |
12 | 12 |
|
13 | 13 | | Workflow | Agent | Vendored | Hosted | |
14 | 14 | | --- | --- | --- | --- | |
15 | | -| Common path: scan, patch, fresh `bundle install`, app loads patched code, `vex`, rollback, `bundle install` again | pass 2.4.19, 2.5.22, 2.6.9, 4.0.18; Rails 7.1 app with bootsnap and a CI clone without groups on 4.0.18 (11-15) | pass 2.5.22, 2.6.9, 4.0.18, 4.1.0.beta3, CRLF pair too (11-15); `vex` warning fail #2076; on a Rails Gemfile 5 of 7 gems are refused with no remedy, fail #2091 | pass 2.3.27 to 4.0.24, 4.1.0.beta3 (11-14); Rails 7.1 app on 2.5.22, 2.6.9, 4.0.18, cross-Bundler installs and `bundle cache` too (11-15) | |
| 15 | +| Common path: scan, patch, fresh `bundle install`, app loads patched code, `vex`, rollback, `bundle install` again | pass 2.4.19, 2.5.22, 2.6.9, 4.0.18, 4.1.0 (11-16); Rails 7.1 app with bootsnap and a CI clone without groups on 4.0.18 (11-15) | pass 2.5.22, 2.6.9, 4.0.18, 4.1.0, CRLF pair too (11-16); `vex` warning fail #2076; on a Rails Gemfile 5 of 7 gems are refused with no remedy, fail #2091 | pass 2.3.27 to 4.0.24, 4.1.0 (11-16); Rails 7.1 app on 2.5.22, 2.6.9, 4.0.18, cross-Bundler installs and `bundle cache` too (11-15) | |
16 | 16 | | System or user gem home (no `BUNDLE_PATH`) | pass 4.0.18, 2.5.22 with `GEM_HOME` (11-15) | fail #2075 (2.6.9, 4.0.18) | pass 4.0.18: warning, `scan` and `rollback` with `--gem-refresh-shared` (11-15); the remedy after a plain rollback / remove fail #2086 | |
17 | 17 | | `bundle config set path vendor/bundle` | pass 2.6.9 (11-13) | pass 4.0.18 (11-14) | pass 2.3.27 to 4.0.18 (11-14) | |
18 | 18 | | Deployment and frozen installs (`BUNDLE_DEPLOYMENT`, `BUNDLE_FROZEN`, `.bundle/config`) | pass frozen 2.6.9, 4.0.18 (11-13) | pass frozen and deployment clone, with `BUNDLE_WITHOUT` too, 4.0.18 (11-14) | pass frozen on all, deployment clone 2.5.22, 2.6.9, 4.0.18 (11-14) | |
19 | | -| Multi-platform lock, platform gem (`-x86_64-linux`) | pass 4.0.18: Ruby-file patch applied, C patch refused as documented (11-15) | pass 4.0.18: 7-platform lock, precompiled gem beside vendored ones (11-15) | pass 4.0.18: nokogiri refused, rest installs (11-14); moved to the `ruby` platform it installs patched, standalone `vex` fail #2087 | |
| 19 | +| Multi-platform lock, platform gem (`-x86_64-linux`) | pass 4.0.18, 4.1.0: Ruby-file patch applied, C patch refused as documented (11-16) | pass 4.0.18, 4.1.0: 7-platform lock, precompiled gem beside vendored ones (11-16) | pass 4.0.18, 4.1.0: nokogiri refused, rest installs (11-16); moved to the `ruby` platform it installs patched, standalone `vex` fail #2087 | |
20 | 20 | | Gem with a native extension (rebuild after patching, rollback restores the build) | pass 2.5.22, 2.6.9, 4.0.18, build failure restored too (11-15); `scan --no-gem-native-rebuild` fail #2069 | refused as documented, exit 1, other gems vendored, 4.0.24 (11-14) | pass 4.0.18, 4.0.24 (11-14) | |
21 | 21 | | Patched gem that is only a transitive dependency | pass 2.6.9, 4.0.18 (11-14) | installs and reverts 4.0.18; `Bundler.require` loads it fail #2084 | pass 2.5.23 to 4.0.24 (11-14) | |
22 | 22 | | Git and path sources next to a patched gem | pass 4.0.18 (11-14) | pass 4.0.24, 4.1.0.beta3 (11-14) | pass 4.0.18, 4.0.24, incl. a gem transitive through a path gem (11-14) | |
23 | 23 | | `bundle update` / `bundle add` / `bundle remove` / `bundle outdated` after patching | pass 4.0.18: add, remove, clean, outdated, `--redownload` then `apply` (11-14) | pass 4.0.18: add, remove, update, outdated, `lock --add-platform`, `cache` (11-14) | add / remove pass 2.6.9 (11-13); `lock --add-platform`, `update <other gem>`, `clean`, `doctor`, `binstubs` pass 4.0.18 (11-14); outdated / update fail #2070 | |
24 | | -| Rollback and remove restore `Gemfile` and `Gemfile.lock` byte for byte | pass (pair never touched) (11-14) | rollback, `remove`, `vendor --revert` pass 4.0.18 (11-14) | rollback and `remove` pass on all, CRLF and `vendor/cache` archives too (11-14) | |
| 24 | +| Rollback and remove restore `Gemfile` and `Gemfile.lock` byte for byte | pass (pair never touched) (11-14) | rollback, `remove`, `vendor --revert` pass 4.0.18 (11-14) | pair restored on all, CRLF and `vendor/cache` archives too (11-16); installed copy left patched when the gem home has no `cache/` dir, fail #2092 | |
25 | 25 | | `vex` reports only what is really applied | pass 2.6.9, 4.0.18, after `bundle pristine` too (11-13) | attests correctly 4.0.18; false `vendored_tree_out_of_sync` fail #2076 | pass 2.6.9, 4.0.18, stale shared-home copy omitted (11-15); orphan platform dir fail #2087 | |
26 | 26 | | `gems.rb` / `gems.locked` spelling | pass 2.5.22 (11-15) | refused as documented (`gemfile_not_loaded`), not re-run | pass 4.0.18 (11-14) | |
27 | 27 | | Lock with a CHECKSUMS section (Bundler 2.6+) | n/a | pass 4.0.18; without the section 2.5.22, 2.6.9 (11-15) | pass 4.0.18 (11-13) | |
28 | | -| Monorepo: several Gemfiles, nested projects, scan from the repo root | untested (agent scans one project by design) | untested | pass 4.0.18: scan, `list`, rollback from the root (11-14) | |
| 28 | +| Monorepo: several Gemfiles, nested projects, scan from the repo root | untested (agent scans one project by design) | pass 4.1.0: 3 Gemfiles, scan, frozen installs, `list`, rollback from the root (11-16) | pass 4.0.18: scan, `list`, rollback from the root (11-14) | |
29 | 29 | | `setup` and the Bundler plugin it installs | n/a: `setup` and the plugin were removed in v5 (CLI_CONTRACT "…no longer published"); only `gem_bundler_plugin_stale` detection is left, untested | n/a | n/a | |
30 | 30 | | Re-runs (idempotency) and `--json` output | pass 4.0.18 (11-14) | re-scan pass 2.6.9, 4.0.18 (apart from #2075) | pass 4.0.18 (11-14) | |
31 | | -| Switching modes on one project | hosted to agent pass 4.0.18 (11-15); agent to hosted leaves the upstream archive, `pristine` / `--redownload` fail #2089 | hosted to vendored: pair and mixed state pass 4.0.24; rollback afterwards leaves patched installs, fail #2083 | hosted beside vendored gems (mixed) installs and attests 4.0.18 (11-15); any revert of the vendored gem then corrupts the lock, fail #2090 | |
32 | | -| Bundler 4.1 prerelease | untested | pass 4.1.0.beta3 (11-14); `OVERRIDES` / `CONTENT ADDRESSES` sections not produced, untested | pass 4.1.0.beta3 (11-14); same sections untested | |
| 31 | +| Switching modes on one project | hosted to agent pass 4.0.18 (11-15); agent to hosted leaves the upstream archive, `pristine` / `--redownload` fail #2089; agent to vendored and back leaves the in-place patch with no record, fail #2093 | hosted to vendored: pair and mixed state pass 4.0.24; rollback afterwards leaves patched installs, fail #2083 | hosted beside vendored gems (mixed) installs and attests 4.0.18, 4.1.0, `repair` and `scan --prune` leave it alone (11-16); any revert of the vendored gem then corrupts the lock, fail #2090 | |
| 32 | +| Bundler 4.1 specifics (4.1.0 stable) | pass with an `OVERRIDES` lock, and on RubyGems 4.1 with a native rebuild (11-16) | pass with an `OVERRIDES` lock and the new default lock that lists the `ruby` variant beside platform builds (11-16) | pass with `OVERRIDES`, `global_gem_cache`, `cooldown` (patched gem newer than the window), RubyGems 4.1 native refresh (11-16); `prune` fail #2092; `CONTENT ADDRESSES` untested | |
33 | 33 | | Bundler 1.x refused where the docs say so | untested | untested | untested | |
34 | 34 |
|
35 | 35 | ## Backlog |
36 | 36 |
|
37 | | -1. Mixed and switched states, the rest (#2089 and #2090 came from here): agent to hosted with a native gem or a shared gem home; agent to vendored and back; hosted first and then `vendor <one purl>`; `scan --prune` and `repair` on a mixed project; a re-scan when a newer patch supersedes one of a mixed pair. |
| 37 | +1. Mixed and switched states, the rest (#2089, #2090 and #2093 came from here): agent to hosted with a native gem or a shared gem home; vendored to agent; hosted first and then `vendor <one purl>`; a re-scan when a newer patch supersedes one of a mixed pair; `repair` on a vendored project prints "No manifest; no patch artifacts to download." (check it against the contract). |
38 | 38 | 2. Friction pass, the rest. Still open candidates: `redirect_gem_no_checksums_section` says "bundler < 2.6 does not write one" on a 2.6.9 lock (its remedy works); `scan --mode vendored` exits 1 whenever one patched gem is refused, with next steps that read like success (noted in #2091); `remove <gem>` from a monorepo root doesn't name the sub-projects that pin it; `apply --check` says "Run `socket-patch apply` to regenerate them" for a gem `apply` refuses; the hosted next step says "a plain `bundle install` keeps the gems it already has" when the stale copy is a platform build the lock no longer names; `docs/usage.md` never mentions Ruby. |
39 | 39 | 3. The Rails app, the rest: a Rails 8 Gemfile (kamal, thruster, solid_*), the default dev setup with a shared rbenv gem home, `bin/setup`, a Dockerfile-style `BUNDLE_PATH=/usr/local/bundle` install, `bundle update` / `bundle update rails` with hosted pins (beyond #2070), Dependabot-style `bundle lock --update <gem>`. |
40 | 40 | 4. Vendored mode, the rest: `remove` / `vendor --revert` after a hosted to vendored takeover (#2083 covers `rollback` only), `scan --prune`. |
41 | 41 | 5. Agent mode, the rest: the system gem home under `/opt/ruby-*` itself, `apply --dry-run` starts no Ruby, a relative crawl root (#2048), an interrupted rebuild, a monorepo. Other flags the nested apply of `scan --mode agent` may drop (same cause as #2069). |
42 | 42 | 6. Hosted shared gem home, the rest: `--gem-refresh-shared` with two projects pinning the same gem version, `remove` of one gem out of several, `SOCKET_GEM_REFRESH_SHARED=1`. |
43 | | -7. Bundler 4.1 lock sections `OVERRIDES` and `CONTENT ADDRESSES`: find which Gemfile or setting makes 4.1.0.beta3 write them, then hosted and vendored. Ruby 3.4 is not in the sandbox. |
| 43 | +7. Bundler 4.1, the rest: content-addressable gems (the `CONTENT ADDRESSES` lock section needs a registry that serves them; see `lockfile_generator.rb`), `override "x", with:, in:`, `bundle update` / `outdated` under `cooldown`, the OS credential store, `bundler/inline`. Ruby 3.4 is not in the sandbox. |
44 | 44 | 8. Deployment mode and `.bundle/config` shapes around the stale-install guard. #1109 is open and waiting on a maintainer decision; don't re-file it. |
45 | 45 | 9. Bundler 1.x refused where the docs say so (needs a Ruby that still runs Bundler 1.17; none in the sandbox). |
46 | | -10. Re-check #2069, #2070, #2075, #2076, #2083, #2084, #2086, #2087, #2089, #2090 and #2091 once fixed. |
| 46 | +10. Re-check #2069, #2070, #2075, #2076, #2083, #2084, #2086, #2087, #2089, #2090, #2091, #2092 and #2093 once fixed. |
47 | 47 |
|
48 | 48 | ## Known non-bugs |
49 | 49 |
|
|
0 commit comments