Skip to content

Commit 5a4c9e5

Browse files
committed
bundler: compact state
1 parent c9ca578 commit 5a4c9e5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎state/bundler.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Last run: 2026-11-20, main `6579162`, release 5.1.0, newest Bundler 4.1.0 stable (no newer prerelease). Tested so far: Bundler 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 on Ruby 3.1.6, 3.2.6, 3.3.6.
44

5-
Harness notes: the sandbox reaches rubygems.org but not the Socket patch API. Use the repo's own stand-in, `tests/nokogiri/patch_service.rb`: `PatchService.new(name, version, platforms, uuid, ghsa, workdir, mark)` downloads the real gems, appends `mark` to `lib/<name>.rb`, and serves the patches API, the compact index and the artifacts for ONE gem on a loopback port (run one per gem; org `nokogiri-e2e`). An empty platform list gives a ruby-platform patch; vendored mode then also needs a `gem-stub-gemspec` artifact (add it to `package_result` and serve the gem's `spec.to_ruby`). It serves no blobs, so agent mode cannot use it: write `.socket/manifest.json` and `.socket/blobs/<git-sha256>` by hand, with the gem's own file as `beforeHash`. Pass `--api-url <mock> --patch-server-url <mock> --api-token fake --org nokogiri-e2e` to every command. Give test repos a `**/vendor/bundle/` ignore line. Rubies are in `/opt/rbenv/versions` (3.1.6: Bundler 2.3.27, 2.6.9; 3.2.6: 2.4.19, 4.0.18; 3.3.6: 2.5.22, 4.0.18, 4.1.0); `gem install bundler -v <v>` works. Select a Bundler with `BUNDLER_VERSION`. A realistic project: `gem install rails -v 8.0.2` into a scratch `GEM_HOME`, then `rails new app --skip-git --skip-bundle --skip-javascript --skip-hotwire --skip-docker`. `vex` writes with `--output` (`-o` is `--org`); `remove` takes one purl. No Ruby 3.4 / 4.0 here (ruby-build's downloads are blocked). Bundler 4.x and 2.5+ lock nokogiri for 8 platforms by default; a patch with fewer prebuilds is refused until `bundle lock --remove-platform` drops the rest.
5+
Harness notes: the sandbox reaches rubygems.org but not the Socket patch API. Use the repo's own stand-in, `tests/nokogiri/patch_service.rb`: `PatchService.new(name, version, platforms, uuid, ghsa, workdir, mark)` downloads the real gems, appends `mark` to `lib/<name>.rb`, and serves the patches API, the compact index and the artifacts for ONE gem on a loopback port (run one per gem; org `nokogiri-e2e`). An empty platform list gives a ruby-platform patch; vendored mode then also needs a `gem-stub-gemspec` artifact (add it to `package_result` and serve the gem's `spec.to_ruby`). It serves no blobs, so agent mode cannot use it: write `.socket/manifest.json` and `.socket/blobs/<git-sha256>` by hand, with the gem's own file as `beforeHash`. Pass `--api-url <mock> --patch-server-url <mock> --api-token fake --org nokogiri-e2e` to every command. Git-ignore `**/vendor/bundle/` in test repos. Rubies are in `/opt/rbenv/versions` (3.1.6: Bundler 2.3.27, 2.6.9; 3.2.6: 2.4.19, 4.0.18; 3.3.6: 2.5.22, 4.0.18, 4.1.0); `gem install bundler -v <v>` works. Select a Bundler with `BUNDLER_VERSION`. A realistic project: `gem install rails -v 8.0.2` into a scratch `GEM_HOME`, then `rails new app --skip-git --skip-bundle --skip-javascript --skip-hotwire --skip-docker`. `vex` writes with `--output` (`-o` is `--org`); `remove` takes one purl. No Ruby 3.4 / 4.0 here (ruby-build's downloads are blocked).
66

77
## Coverage matrix
88

@@ -20,7 +20,7 @@ Linux only. A cell is `pass` with the Bundler versions and the date, `fail #N`,
2020
| 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) |
2121
| `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, `cache` (11-14) | pass: add / remove 2.6.9 (11-13); `lock` flags, `update <other gem>`, `clean`, `doctor`, `check` 4.0.18 (11-16); `outdated`, `update --all` on the Rails 8 app (11-18; #2070 fixed) |
2222
| 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) | pass on all, CRLF and `vendor/cache` archives too (11-16); `remove` of a transitive and a direct gem out of 12 (11-18); no `cache/` dir 2.6.9 (#2092 fixed), `--add-checksums` on a patched 2.6.9 lock then rollback and `pristine` (11-19) |
23-
| `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` was fail #2076 (fixed on `3b14afc`, not re-run) | pass 2.6.9, 4.0.18, stale shared-home copy omitted (11-15); orphan platform dir was fail #2087 (fixed, not re-run) |
23+
| `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` was fail #2076 (fixed on `3b14afc`, not re-run) | pass 2.6.9, 4.0.18, stale shared-home copy omitted (11-15); #2087 fixed, not re-run |
2424
| `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) |
2525
| 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) |
2626
| Monorepo: several Gemfiles, nested projects, scan from the repo root | one project by design; from the root it names the projects and the `--cwd` to use (#2125 fixed, 11-19) | 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) |
@@ -38,13 +38,13 @@ Linux only. A cell is `pass` with the Bundler versions and the date, `fail #N`,
3838

3939
## Backlog
4040

41-
1. Precompiled platform gems, the rest (#2150, #2154, #2155): agent mode beside a hosted or vendored platform gem (needs hand-written blobs), a superseding patch for a platform gem in each mode, a monorepo with two locks naming different platform sets, `force_ruby_platform` (config and per-gem) under a platform-only lock, `bundle cache --all-platforms`, a `java` / JRuby lock if a JRuby appears, `vendor_prebuilt_platform_pending` on a gem that is already vendored, a platform gem other than nokogiri (ffi, sqlite3, google-protobuf), `vex` for the vendored gem warns about the stale upstream copy in `vendor/bundle` on every common-path run (friction candidate).
41+
1. Precompiled platform gems, the rest (#2150, #2154, #2155): agent mode beside a hosted or vendored platform gem (needs hand-written blobs), a superseding patch for a platform gem in each mode, a monorepo with two locks naming different platform sets, `force_ruby_platform` (config and per-gem) under a platform-only lock, `bundle cache --all-platforms`, a `java` / JRuby lock if a JRuby appears, `vendor_prebuilt_platform_pending` on a gem that is already vendored, a platform gem other than nokogiri (ffi, sqlite3, google-protobuf).
4242
2. Agent native rebuild, the rest (#2098, #2136): `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; #2136 on real nokogiri with `--use-system-libraries`.
4343
3. Re-run the repros of the fixes that are not re-run yet: #2129, #2151, #2162 (fixed 11-19/20), then #2087, #2091 on the Rails 8 app, #2092 under Bundler 4.1 `prune`, #2117, #2069, #2070, #2075, #2076, #2084, #2090, #2104, #2105.
4444
4. The terminal UI rework (#2153): read every gem message of `scan`, `list`, `show`, `get`, `rollback` and `vex` on the common path as a first-time user; `--json` shapes unchanged.
4545
5. Odd-Gemfile shapes, the rest: a patched gem that lives in a private `source` block (same name and version as a public gem), in all three modes; a default gem in the Ruby's own gem home (no `GEM_HOME`); an Appraisal lock in agent mode; `bundle install --standalone`; a scoped mirror (`BUNDLE_MIRROR__HTTPS://RUBYGEMS.ORG/`) under hosted mode.
4646
6. Mixed and switched states, the rest: agent to hosted in a shared gem home; `get` (not `scan`) onto a newer agent patch; a superseding agent patch for a gem with a native extension.
47-
7. Friction candidates: `scan --mode vendored` exits 1 whenever one gem is refused, with next steps that read like success; a rollback of a vendored gem prints "1 unwired package keeps its patched bytes in installed trees" though the installed copy was never patched (seen again 11-20); `rollback --gem-refresh-shared` after a plain rollback prints nothing and exits 0 while the shared copy stays patched; `remove <gem>` from a monorepo root doesn't name the sub-projects that pin it; `docs/usage.md` never mentions Ruby.
47+
7. Friction candidates: `scan --mode vendored` exits 1 whenever one gem is refused, with next steps that read like success; a rollback of a vendored gem prints "1 unwired package keeps its patched bytes in installed trees" though the installed copy was never patched (seen again 11-20); `remove <gem>` from a monorepo root doesn't name the sub-projects that pin it; `docs/usage.md` never mentions Ruby.
4848
8. The Rails 8 app, the rest: Bundler 2.6.9 / 4.1.0 on it, a hosted transitive pin that blocks an upgrade of its parent, thruster (platform-only gem) in agent mode. Vendored `scan --prune`; `apply --dry-run` starts no Ruby; a relative crawl root (#2048).
4949
9. Ruby 3.4 and 4.0, and Bundler 2.2 / 2.3 on Ruby 2.7: run them as soon as a Ruby appears under `/opt`. Bundler 4.1 `CONTENT ADDRESSES`.
5050
10. Re-check when fixed: #2174, #2152 (still reproduces on `6579162`, 11-20), #2106 (not re-run 11-20; no commit touches it).

0 commit comments

Comments
 (0)