You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dc71818
Browse filesBrowse the repository at this point in the historyBrowse files
[agent] 2026-11-28: Bundler (RubyGems) bug-hunt run
2
+
3
+
**Tested:** main `cfc870f` (unchanged since 2026-11-26), release 5.1.0 (from npm, for the regression check). Linux. Ruby 3.3.6 with Bundler 2.6.9 and 4.1.1. Newest Bundler is still 4.1.1. Main had not moved, so this run worked the backlog (items 3 and 8).
4
+
5
+
**Harness:** one loopback server in front of four instances of the repo's stand-in (`tests/nokogiri/patch_service.rb`): rack 2.2.8, rake 13.2.1, and mustermann 3.0.3 and tilt 2.4.0 (both transitive through sinatra 3.2.0); a project with `path vendor/bundle`, a range requirement with a comment, a `group` block and a `CHECKSUMS` lock, in a git repository. The front also answers `/telemetry`.
6
+
7
+
**Re-triage:** the open issues without `agent:needs-human` (#2269, #2283, #2284, #2285, #2313, #2325, #2326) were all filed on this same main, so there was nothing to re-check. Nothing closed.
| Vendored, `bundle remove` of the parent of both transitive gems: re-scan, `vendor --check`, `vex`, rollback, frozen install | pass: the added lines stay until rollback, which restores the range and the comment |
15
+
| Vendored, the vendored `gem` line edited, then `bundle install` (lock unchanged): moved into a `group` block, `require: false` or `group:` added, quotes changed, an option on a transitive gem's added line |**fail #2338** (4.1.1, 2.6.9; 5.1.0 too): `scan` and `vendor --check` accept it, `rollback` / `remove` exit 1 |
16
+
| Vendored, a trailing comment appended to the vendored line, 4.1.1 and 2.6.9 | pass (#988 holds) |
| Hosted, a wired line moved into a `group` block, or given `require: false` / `group:`: `bundle install`, frozen install, app, `vex`, rollback, frozen install | pass: rollback takes `source:` off and keeps the edit |
19
+
|`report` by name and by purl, hosted and vendored gems, `--reason`, `--message`, `--json`, an unknown name | pass: the modes are right, the unknown name is refused with the UUID hint |
20
+
21
+
**Filed**
22
+
-https://github.com/SocketDev/socket-patch/issues/2338: a vendored gem cannot be rolled back or removed once its Gemfile line is edited in any way but a trailing comment. `vendor --check` says the wiring is verified, `rollback` and `remove` exit 1 blaming the lock (which has no diff), `rollback --dry-run` previews a success, and the named remedies (`vendor`, a re-scan) do nothing. Putting the line back character for character, or deleting `path:` by hand and running `bundle install`, both work and neither is named. Not a regression. Suspect `crates/socket-patch-core/src/vendor/gem.rs:3849`.
23
+
24
+
**Ruled out** (added to `known-non-bugs/bundler.md`)
25
+
- After `bundle remove` of the only parent of a vendored or hosted transitive gem, the added line keeps the gem in the bundle: a pin by design, rollback takes it out.
26
+
- Text added inside the marker comment of a hosted transitive line makes rollback keep the line as the user's own. Contrived.
27
+
28
+
**Blocked / not reached:** Ruby 3.4 / 4.0 (none under `/opt`), the Rails 8 app on Bundler 2.5.22, `bundle lock --add-platform` on a vendored platform gem, `report` in agent mode, the re-runs of backlog 6.
Copy file name to clipboardExpand all lines: known-non-bugs/bundler.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,3 +235,6 @@ Documented limitations and verified false positives. One bullet each. Search thi
235
235
- Vendored mode rewrites a range requirement with a trailing comment to an exact pin without the comment; rollback restores both (2026-11-28).
236
236
- A `.gitignore` rule that covers `.socket/vendor` (`vendor`, the Jekyll default): the vendored scan refuses with the rule's line and writes nothing (2026-11-28).
237
237
-`apply --offline` on a precompiled Rust (`rb_sys`) gem with no source gem cached is refused as documented; with network access it rebuilds from the rubygems.org source gem (2026-11-28).
238
+
- After `bundle remove` of the only parent of a vendored (or hosted) transitive gem, the line socket-patch added keeps that gem in the bundle; `scan`, `vendor --check` and `vex` still count it, and rollback takes the line out. The added line is a pin by design (2026-11-28).
239
+
- Text added inside the `# added by socket-patch (transitive dependency)` comment of a hosted transitive line makes rollback keep the line as the user's own, without `source:`. Contrived (2026-11-28).
240
+
- A trailing comment appended to a vendored `gem` line does not block rollback (#988); any other edit of the line does and is filed as #2338, so don't re-file it per edit (2026-11-28).
Copy file name to clipboardExpand all lines: state/bundler.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,21 +2,21 @@
2
2
3
3
Last run: 2026-11-28, main `cfc870f`, release 5.1.0, newest Bundler 4.1.1. Tested so far: Bundler 1.17.3, 2.3.27 to 4.1.1 on Ruby 3.1.6 to 3.3.6.
4
4
5
-
Harness notes: rubygems.org is reachable, the Socket patch API is not. Use the repo's stand-in, `tests/nokogiri/patch_service.rb`: `PatchService.new(name, version, platforms, uuid, ghsa, workdir, mark)` appends `mark` to `lib/<name>.rb` of the real gems and serves the API, the index and the artifacts for ONE 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`, serve the gem's `spec.to_ruby`). For several gems, put one loopback server in front of several instances (subclass, override `url` with the front's): route a path that holds a uuid to that instance's `respond`, merge `batch` (by the body's `components`) and `package` (by `uuids`), answer `by-package/<purl>`, and serve `…/patches/blob/<git-sha256>`. Pass `--api-url <mock> --patch-server-url <mock> --api-token fake --org nokogiri-e2e` to every command. Rubies: `/opt/rbenv/versions` (3.1.6, 3.2.6, 3.3.6); `gem install bundler -v <v>`, then select it with `BUNDLER_VERSION`. A Rails app: `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` (10 minutes). The release: `npm install @socketsecurity/socket-patch@5.1.0`. Agent cells need no mock: hand-write `.socket/manifest.json` and `.socket/blobs/<git-sha256>`, then `apply --offline`. `vex` writes with `--output`.
5
+
Harness: rubygems.org is reachable, the Socket patch API is not. Use the repo's stand-in, `tests/nokogiri/patch_service.rb`: `PatchService.new(name, version, platforms, uuid, ghsa, workdir, mark)` appends `mark` to `lib/<name>.rb` of the real gems and serves the API, the index and the artifacts for ONE 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`, serve the gem's `spec.to_ruby`). For several gems, put one loopback server in front of several instances (subclass, override `url` with the front's): route a path that holds a uuid to that instance's `respond`, merge `batch` (by the body's `components`) and `package` (by `uuids`), answer `by-package/<purl>`, and serve `…/patches/blob/<git-sha256>`. Pass `--api-url <mock> --patch-server-url <mock> --api-token fake --org nokogiri-e2e` to every command. Rubies: `/opt/rbenv/versions` (3.1.6, 3.2.6, 3.3.6); `gem install bundler -v <v>`, then select it with `BUNDLER_VERSION`. A Rails app: `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` (10 min). The CLI build takes 11 min: start it first. The release: `npm install @socketsecurity/socket-patch@5.1.0`. Agent cells need no mock: hand-write `.socket/manifest.json` and `.socket/blobs/<git-sha256>`, then `apply --offline`. `vex` writes with `--output`.
6
6
7
7
## Coverage matrix
8
8
9
9
| Workflow | Agent | Vendored | Hosted |
10
10
| --- | --- | --- | --- |
11
-
| Common path: scan, patch, fresh `bundle install`, app loads patched code, `vex`, rollback, `bundle install` again | pass 2.5.22 to 4.1.1 (11-26), under `bundle exec` too (11-25); Rails 8.0 app, 10 gems 4.1.1 (11-26), 2.6.9 (11-27) | pass 2.5.22, 4.0.25, 4.1.1, deployment clone (11-26); CRLF pair (11-25); Rails 8.0 app 4.1.1: 7 of 10 gems once 5 platforms are removed (11-26), 2.6.9: 6 of 10 (11-27); the printed `--remove-platform ruby` alone: fail #2284; a merge conflict in the pair 4.1.1: nothing written, resolved with `bundle install`, `vex`, rollback (11-28); the Dockerfile gem layer (`COPY Gemfile Gemfile.lock`): fail #2326 | pass 2.5.22, 2.6.9, 4.0.25, 4.1.1: 5 gems (2 native, nokogiri from prebuilds), deployment clone, `pristine`, `update --all`, rollback byte-exact (11-26); Rails 8.0 app, 10 gems 4.1.1: `pristine`, `update --all`, `add` / `remove`, rollback byte-exact (11-26), 2.6.9 (11-27); a killed scan heals on a re-scan (11-24); a merge conflict in the pair 4.1.1: refused with the marker's line, resolved with `bundle install`, `vex`, rollback (11-27); second machine with gems installed: `vex` names `scan`, which works (11-26) |
11
+
| Common path: scan, patch, fresh `bundle install`, app loads patched code, `vex`, rollback, `bundle install` again | pass 2.5.22 to 4.1.1 (11-26), under `bundle exec` too (11-25); Rails 8.0 app, 10 gems 4.1.1 (11-26), 2.6.9 (11-27) | pass 2.5.22, 4.0.25, 4.1.1, deployment clone (11-26); CRLF pair (11-25); Rails 8.0 app 4.1.1: 7 of 10 gems once 5 platforms are removed (11-26), 2.6.9: 6 of 10 (11-27); the printed `--remove-platform ruby` alone: fail #2284; a merge conflict in the pair 4.1.1: nothing written, resolves with `bundle install` (11-28); the Dockerfile gem layer (`COPY Gemfile Gemfile.lock`): fail #2326 | pass 2.5.22, 2.6.9, 4.0.25, 4.1.1: 5 gems (2 native, nokogiri from prebuilds), deployment clone, `pristine`, `update --all`, rollback byte-exact (11-26); Rails 8.0 app, 10 gems 4.1.1: `pristine`, `update --all`, `add` / `remove`, rollback byte-exact (11-26), 2.6.9 (11-27); a killed scan heals on a re-scan (11-24); a merge conflict in the pair 4.1.1: refused with the marker's line (11-27); second machine with gems installed: `vex` names `scan`, which works (11-26) |
12
12
| System or user gem home (no `BUNDLE_PATH`) | pass 4.0.18, 2.5.22 with `GEM_HOME` (11-15); native rebuild, rollback byte-exact (11-17); a `path` other than `vendor/bundle`, or nothing installed in it yet: fail #2313| pass 4.1.1: an unlocked version in the home is skipped (#2075 holds, 11-27) | pass 4.0.18: warning, `--gem-refresh-shared` on `scan` and `rollback` (11-15); two projects on one gem (11-18); the printed `rm … && bundle install` remedy 2.5.22 (11-20), after agent mode 4.0.18 (11-24) |
13
13
|`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) |
14
14
| Deployment and frozen installs (`BUNDLE_DEPLOYMENT`, `BUNDLE_FROZEN`, `.bundle/config`) | pass frozen 2.6.9, 4.0.18 (11-13); Docker-image style (`GEM_HOME` = `BUNDLE_APP_CONFIG`, deployment, `without`) 4.0.18 (11-17) | 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) |
15
15
| Multi-platform lock, platform gem (`-x86_64-linux`); PR #2226 may remove hosted and vendored mode here | pass 4.0.18, 4.1.0: Ruby-file patch applied, C patch refused as documented (11-16); ffi, sqlite3, rack beside a hosted nokogiri: `pristine` then `apply`, rollback 4.0.18 (11-20) | from prebuilds (#2154): nokogiri pass 2.3.27 to 4.1.1; ffi and sqlite3 pass 4.0.18, superseding patch, frozen install, deployment clone, `vex`, `update --all`, `add`, rollback byte-exact; a missing prebuild and a `ruby` entry beside the builds are refused (4.1.1 11-26); `--remove-platform` after vendoring: fail #2283| from prebuilds (#2150): nokogiri pass 2.3.27 to 4.1.1 (11-25); ffi and sqlite3 pass 4.0.18: superseding patch, one-gem rollback, `pristine`, `install --local` clone, rollback byte-exact (11-20); a missing prebuild is refused and `--remove-platform` fixes it (11-24) |
16
-
| Gem with a native extension (rebuild after patching, rollback restores the build) | pass 4.0.18 (11-17): 4 precompiled and 26 source-built gems, `pristine` then re-apply; eventmachine (C++), a `.h`-only patch of puma (11-27), a Rust (`rb_sys`) gem, precompiled and source-built (11-28): 4.1.1, rollback byte-exact; a killed `apply`, `--offline` and no compiler leave the gem intact | refused as documented, exit 1, other gems vendored, 4.0.24 (11-14) | pass 4.0.18, 4.0.24 (11-14); json and puma on 4.0.18 (11-19) |
17
-
| Patched gem that is only a transitive dependency | pass 2.6.9, 4.0.18 (11-14) | installs and reverts 4.0.18; `require: false` on the added line 2.6.9, 4.1.1 (#2084 holds, 11-27) | pass 2.5.23 to 4.0.24 (11-14) |
16
+
| Gem with a native extension (rebuild after patching, rollback restores the build) | pass 4.0.18 (11-17): 4 precompiled and 26 source-built gems, `pristine` then re-apply; eventmachine (C++), a `.h`-only patch of puma (11-27), a Rust (`rb_sys`) gem (11-28): 4.1.1, rollback byte-exact; a killed `apply`, `--offline` and no compiler leave the gem intact | refused as documented, exit 1, other gems vendored, 4.0.24 (11-14) | pass 4.0.18, 4.0.24 (11-14); json and puma on 4.0.18 (11-19) |
17
+
| Patched gem that is only a transitive dependency | pass 2.6.9, 4.0.18 (11-14) | installs and reverts 4.0.18; `require: false` on the added line 2.6.9, 4.1.1 (#2084 holds, 11-27); parent dropped with `bundle remove`: the added lines stay, rollback clean (11-28)| pass 2.5.23 to 4.0.24 (11-14) |
18
18
| 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) |
19
-
|`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 (another gem), update, outdated, `cache` (11-14); `bundle remove` of the vendored gem, or moving it to a newer version by hand, 2.5.22 to 4.1.1: fail #2325; a `.gitignore` rule covering `.socket/vendor` is refused with the rule's line (11-28) | 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); the printed steps to move a gem to a newer release, direct and transitive 4.1.1 (11-27) |
19
+
|`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 (another gem), update, outdated, `cache` (11-14); `bundle remove` of the vendored gem, or moving it to a newer version by hand, 2.5.22 to 4.1.1: fail #2325; the vendored `gem` line edited (into a `group` block, an option added), 2.6.9, 4.1.1: fail #2338; a `.gitignore` rule covering `.socket/vendor` is refused with the rule's line (11-28) | 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); the printed steps to move a gem to a newer release, direct and transitive 4.1.1 (11-27); a wired line moved into a `group` block or given an option: rollback keeps the edit (11-28) |
20
20
| Rollback and remove restore `Gemfile` and `Gemfile.lock` byte for byte | pass (pair never touched) (11-14); a gem edited in place: `bundle pristine <gem>` is named and works (11-26) | rollback, `remove`, `vendor --revert` pass 4.0.18 (11-14), 2.5.22 (11-24); #2214 fixed (11-25); platform gem after `--remove-platform`: fail #2283| 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, `--add-checksums` on a patched lock (11-19) |
21
21
|`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; #2076 fixed, not re-run | pass 2.6.9, 4.0.18, stale shared-home copy omitted (11-15); #2087 fixed, not re-run |
22
22
|`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) |
@@ -42,12 +42,12 @@ Harness notes: rubygems.org is reachable, the Socket patch API is not. Use the r
42
42
43
43
1.`vex` product forms (#2243): a precompiled gem patched from a `?platform=ruby` record is named `pkg:gem/<name>@<version>` only. Not filed (PR #2257); re-check on agent mode once #2257 or #2226 lands.
44
44
2. Precompiled platform gems: PRs #2226 / #2257 change hosted and vendored mode for them; re-run the nokogiri, ffi and sqlite3 cells after either merges.
45
-
3.`report`(#2193): names resolve (11-27); the send needs a `/telemetry` route in the mock. The per-run counts of #2178 under `--json`.
46
-
4. Re-check when fixed: #2269, #2283, #2284, #2285, #2313, #2325, #2326. A mirror whose index has hex checksums (gemstash, or rewrite `info/*`): the hosted unwind, vendored mode, the agent native rebuild, credentials in the URL.
45
+
3.`report`passes for hosted and vendored gems, by name and purl, `--json`(11-28; the mock needs a `/telemetry` route). Left: agent mode, a UUID after rollback, the per-run counts of #2178.
46
+
4. Re-check when fixed: #2269, #2283, #2284, #2285, #2313, #2325, #2326, #2338. A mirror whose index has hex checksums (gemstash, or rewrite `info/*`): the hosted unwind, vendored mode, the agent native rebuild, credentials in the URL.
47
47
5. Agent native rebuild, the rest: a private source, sass-embedded; real nokogiri with `--use-system-libraries` (#2136).
48
48
6. Re-run the repros of fixes not re-run yet: #2106, #2185, #2129, #2151, #2162, #2087, #2092 (4.1 `prune`), #2117.
49
49
7. The terminal UI rework (#2153): read the gem messages of `show`, `rollback` and `vex` as a first-time user (`get` by name and `list` read well, 11-28).
50
-
8. The Rails 8 app, the rest (all three modes passed on 4.1.1 and 2.6.9): Bundler 2.5.22, `bundle lock --add-platform` on a vendored platform gem (Bundler refuses it, look at the message). Vendored gems the user changes after vendoring (see #2325): the line moved into a `group` block, an option added to it, a vendored transitive gem whose parent is removed.
50
+
8. The Rails 8 app, the rest (all three modes passed on 4.1.1 and 2.6.9): Bundler 2.5.22, `bundle lock --add-platform` on a vendored platform gem (Bundler refuses it, look at the message).
51
51
9. Ruby 3.4 and 4.0, and Bundler 2.2 / 2.3 on Ruby 2.7, as soon as a Ruby appears under `/opt` (ruby-build can't download: cache.ruby-lang.org is blocked). Bundler 4.1 `CONTENT ADDRESSES`.
52
52
10. Second machine, the rest: a restored CI `vendor/bundle` cache, a shared gem home there. A gem home shared by two Rubies. Agent mode with other explicit roots (#2313): `BUNDLE_PATH` outside the project, a global-config `path`, `--standalone`.
0 commit comments