Skip to content

Commit 8f7e69b

Browse files
committed
bundler: run 2026-11-26 (afternoon), #2283 #2284 #2285
1 parent e5568fc commit 8f7e69b

3 files changed

Lines changed: 46 additions & 9 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
[agent] 2026-11-26: Bundler (RubyGems) bug-hunt run
2+
3+
**Tested:** main `cfc870f` (unchanged since the earlier run today), release 5.1.0. Linux. Ruby 3.3.6 with Bundler 4.1.1, 4.0.18 and 2.5.22. Newest Bundler is still 4.1.1. The backlog was not empty, so this run worked it: the Rails 8 app (item 8) and a private mirror (item 4).
4+
5+
**Harness:** one loopback server in front of ten instances of the repo's stand-in (`tests/nokogiri/patch_service.rb`): rack, propshaft, zeitwerk, loofah (ruby platform), puma, bootsnap, json (native extension), and nokogiri 1.19.7, sqlite3 2.10.2, thruster 0.1.28 with every platform prebuild. Project: `rails new` on Rails 8.0 with Bundler 4.1.1 (115 gems, 12 platforms, `path vendor/bundle`). Mirror: `gem generate_index` plus `python3 -m http.server` as the only `source`.
6+
7+
**Re-triage:** #2269 is unchanged (same main, a fix PR is open); #1109 carries `agent:needs-human`. Nothing closed.
8+
9+
**Cells**
10+
11+
| Cell | Result |
12+
| --- | --- |
13+
| Hosted, Rails 8 app, 4.1.1, 10 gems (5 transitive, 3 native, 3 from prebuilds): scan, frozen install, lock stable, `rails runner`, deployment clone, `vex`, `pristine`, `outdated`, `update --all`, `add` / `remove`, `list`, rollback, frozen install, `pristine` | pass: pair byte-exact |
14+
| Agent, Rails 8 app, 4.1.1, 10 gems: scan, frozen install, `apply --check`, `vex`, fresh clone + `bundle install` + `apply`, `pristine` then `apply`, rollback | pass |
15+
| Vendored, Rails 8 app, 4.1.1: first scan vendors 4 gems, refuses the 3 native gems and the 3 platform gems; the printed `bundle lock --remove-platform ruby` | **fail #2284**: nokogiri and thruster keep their plain entry and are refused again |
16+
| Vendored, Rails 8 app, after `bundle lock --remove-platform ruby x86-linux-gnu x86-linux-musl arm-linux-gnu arm-linux-musl`: 7 gems, frozen install, `rails runner`, deployment clone, `vex` (7 statements) | pass |
17+
| Vendored platform gem (sqlite3), then `bundle lock --remove-platform`, re-scan, `rollback`, `remove`, `vendor --revert`: 4.0.18, 4.1.1 | **fail #2283**; 2.5.22 (no `CHECKSUMS`) passes |
18+
| Vendored platform gem (nokogiri), then `bundle lock --add-platform` for a platform with no vendored tree, 2.5.22 | Bundler leaves the lock as it is; re-scan, `vex`, rollback pass |
19+
| Hosted behind a `gem generate_index` mirror, 4.1.1: scan, frozen install pass; `rollback` with `SOCKET_RUBYGEMS_URL` | **fail #2285** |
20+
| The same on 2.5.22 (no `CHECKSUMS`) | pair byte-exact, exit 0; copies left patched with a working `rm -f … && bundle install` |
21+
22+
**Filed**
23+
- https://github.com/SocketDev/socket-patch/issues/2283: a gem vendored from prebuilt platform gems cannot be rolled back, removed or reverted once `bundle lock --remove-platform` dropped one of its platforms on a lock with `CHECKSUMS`; the named remedy (`scan --mode vendored`) says "already vendored". Workaround: add the platforms back. Suspect `vendor/gem.rs:4127`.
24+
- https://github.com/SocketDev/socket-patch/issues/2284 (`ux`): the `platform_gem_unsupported` remedy `bundle lock --remove-platform ruby` does not clear thruster or nokogiri on a default Rails 8 lock from Bundler 4.1, because the lock names platforms those gems have no build for. Suspect `vendor/gem.rs:786`.
25+
- https://github.com/SocketDev/socket-patch/issues/2285: `SOCKET_RUBYGEMS_URL` (the #2230 fix) reads only a hex `checksum:`; `gem generate_index` writes base64, which Bundler accepts, so `rollback` / `remove` still refuse behind such a mirror. Suspect `patch/redirect/upstream/client.rs:168`.
26+
27+
None is a regression: the three features are new since 5.1.0.
28+
29+
**Ruled out** (added to `known-non-bugs/bundler.md`)
30+
- `bundle lock --add-platform <p>` on a vendored platform gem with no tree for `<p>`: Bundler prints the gem as unresolvable for that platform and leaves the lock alone; socket-patch commands keep working.
31+
- On Bundler 2.5 a vendored rollback after `--remove-platform` restores the `GEM` section with the removed platforms' builds: the pre-vendor entries, and Bundler installs it frozen.
32+
- Vendored scan summary "Vendored 4 packages; 3 failed" beside 6 error lines: the 3 `platform_gem_unsupported` lines are per-gem events, the exit code is 1 either way.
33+
34+
**Blocked / not reached:** vendored and agent mode behind the mirror (the hosted unwind failed first; needs a mirror with hex checksums), the Rails app on Bundler 2.6.9, Ruby 3.4 / 4.0, the re-runs of older fixes (backlog 6), the terminal UI read-through (backlog 7).

‎known-non-bugs/bundler.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,3 +221,6 @@ Documented limitations and verified false positives. One bullet each. Search thi
221221
- `vex` names a precompiled gem patched from a `?platform=ruby` record as `pkg:gem/<name>@<version>` only (no `-<platform>` form for Grype / Syft): the contract derives the forms from the record's `platform` qualifier, and open PR #2257 gives each platform gem its own record. Not filed; re-check after #2257 (2026-11-26).
222222
- After `rollback`, an earlier `socket.vex.json` and its `.grype.yaml` entry stay until `vex` runs again (which removes both): `docs/usage.md` says to regenerate the document whenever the patches change (2026-11-26).
223223
- `scan --mode hosted` on a project with vendored gems prints "Not hosted …" and an un-vendor warning per vendored gem and exits 0: documented ("leaves vendored gems as they are"). The vendored-scan side of the same mixed project is #2269 (2026-11-26).
224+
- `bundle lock --add-platform <p>` on a vendored platform gem with no vendored tree for `<p>`: Bundler reports the gem as unresolvable for that platform and leaves the lock unchanged; re-scan, `vex` and rollback pass (2.5.22, 2026-11-26). The remove direction is #2283.
225+
- Bundler 2.5 (no `CHECKSUMS`): a vendored rollback after `bundle lock --remove-platform` restores the `GEM` section with the removed platforms' builds (the pre-vendor entries); a frozen install accepts it (2026-11-26).
226+
- Vendored scan prints "N failed" lower than the number of error lines: `platform_gem_unsupported` lines are per-gem events not counted there; exit 1 either way (2026-11-26).

0 commit comments

Comments
 (0)