Skip to content

Commit 8abb243

Browse files
committed
bundler: run 2026-11-26, filed #2269, closed #2242
1 parent 3ebf95b commit 8abb243

3 files changed

Lines changed: 57 additions & 20 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[agent] 2026-11-26: Bundler (RubyGems) bug-hunt run
2+
3+
**Tested:** main `cfc870f` (27 commits since `e685fb1`, among them the fixes for #2219, #2230, #2231 and #2242, VEX package products (#2243) and `vex --grype-config` (#2252)); 5.1.0 is still the latest release and was built from its tag for one comparison. Linux. Ruby 3.3.6 with Bundler 4.1.1, 4.0.25, 4.0.18 and 2.5.22; Ruby 3.2.6 with Bundler 2.6.9. Newest Bundler is still 4.1.1.
4+
5+
**Harness:** one loopback server in front of five instances of the repo's stand-in (`tests/nokogiri/patch_service.rb`): rack 2.2.8, rake 13.2.1, json 2.9.1 and racc 1.8.1 (ruby platform, the last two with a native extension, racc transitive) and nokogiri 1.18.10 with all 8 prebuilds. Project: `path vendor/bundle`, a range requirement, a group block, a Bundler 4.1 default lock.
6+
7+
**Re-triage**
8+
- #2242: fixed by c40cc39. The new `rm -rf <gem dir> <gemspec> <archive> && bundle install` clears the old Ruby's tree, `vex` then writes every statement and the re-scan is quiet. Commented and closed.
9+
- #1109 carries `agent:needs-human`: skipped.
10+
- Closed by their fixes and re-run here: #2219 (`vex` now names `socket-patch scan`, which replaces the copies) and #2231 (`apply --check`, `apply` and `rollback` name `bundle pristine <gem>`, which works). #2230 was not re-run.
11+
12+
**Cells**
13+
14+
| Cell | Result |
15+
| --- | --- |
16+
| Hosted, 4.1.1, 5 gems: scan, frozen install, lock stable, app, deployment clone, `vex`, `pristine`, `outdated`, `update --all`, `check`, `doctor`, `list`, rollback, frozen install, `pristine` | pass: pair byte-exact |
17+
| Hosted, 4.0.25, 2.5.22, 2.6.9 (Ruby 3.2.6): scan, frozen install, app, `vex`, `pristine`, rollback | pass: pair byte-exact |
18+
| Agent, 4.1.1, 4.0.25, 2.5.22, 2.6.9: scan, app, frozen install, `vex`, `apply --check`, `pristine`, `apply`, rollback | pass |
19+
| Vendored, 4.1.1, 4.0.25, 2.5.22: rack and rake vendored, json and racc refused, nokogiri from prebuilds (on 4.1.1 after `bundle lock --remove-platform ruby`), frozen install, deployment clone, `vex`, rollback | pass: pair byte-exact |
20+
| Vendored, then `get json` / `get racc --mode hosted` (the printed remedy), frozen install, app, `vex`, re-scans, rollback: 4.1.1, 4.0.25, 2.5.22; with `--mode agent` on 4.0.25 | installs, `vex` and rollback pass; every later `scan --mode vendored` exits 1: **fail #2269** |
21+
| Agent, a gem edited in place: `apply --check`, `apply`, `rollback`, `bundle pristine rack`, `rollback` | pass (#2231 fixed) |
22+
| Hosted on a second machine that had its gems installed, 4.0.25: `bundle install`, `vex`, the named `scan`, `vex` | pass (#2219 fixed) |
23+
| Agent with the gem tree of an earlier Ruby in `vendor/bundle`, 4.0.18 | pass: both trees patched, `apply --check` and `vex` agree, rollback restores both |
24+
| `vex --grype-config`, hosted, 4.1.1: `.grype.yaml` created, removed from the list when a later `vex` has nothing to attest | pass |
25+
26+
**Filed**
27+
- https://github.com/SocketDev/socket-patch/issues/2269 (`ux`): vendored mode refuses a gem with a native extension and names `--mode hosted` or `--mode agent`. Once the user has patched the gem that way, every `scan --mode vendored` refuses it again with the same remedy, counts it as failed and as "left to patch (40%)" and exits 1, while the app loads the patched code and `vex` attests all five gems. `scan --mode agent` on the same project exits 0 but counts the vendored gems as left to patch. Not a regression: 5.1.0 exits 1 on the same re-scan. Suspect `vendor/gem.rs:653`, `scan/report.rs:568`.
28+
29+
**Commented / closed:** #2242 closed as fixed (https://github.com/SocketDev/socket-patch/issues/2242#issuecomment-7181456843).
30+
31+
**Ruled out** (added to `known-non-bugs/bundler.md`)
32+
- `vex` names the precompiled nokogiri (installed as `x86_64-linux-gnu`, record `?platform=ruby`) as `pkg:gem/nokogiri@1.18.10` only, without the `name@version-platform` form `docs/usage.md` gives for Grype and Syft. Not filed: the contract takes the forms from the record's `platform` qualifier and open PR #2257 gives each platform gem its own record. First on the backlog to re-check.
33+
- The empty `.socket/manifest.json` an agent `rollback` leaves, the stale `socket.vex.json` after a rollback, and the "Not hosted" lines of a hosted scan over vendored gems: documented.
34+
35+
**Blocked / not reached:** Grype, Syft and Trivy could not be run (the sandbox refuses downloaded scanners), so the VEX product forms were read, not matched by a scanner. #2230 behind a mirror, #2210 (needs Bazel), `report`, the Rails 8 app, Ruby 3.4 / 4.0 and JRuby.

‎known-non-bugs/bundler.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,7 @@ Documented limitations and verified false positives. One bullet each. Search thi
217217
- A hosted gem's version bumped by hand in the Gemfile with `source:` kept: `bundle install` fails naming the patch source, a re-scan says "already on hosted patches". The documented flow (`rollback <purl>`, `bundle install`, re-scan) works; the user broke the pair, so not filed (2026-11-25).
218218
- After `bundle update` moves a gem, the old version left in `vendor/bundle` gets "Not hosted … this project doesn't lock it": the documented `redirect_gem_version_not_locked`; `bundle clean` clears it (2026-11-25).
219219
- `vex` omitting a gem while an earlier Ruby's tree (`vendor/bundle/ruby/3.2.0`) holds an unpatched copy is fail-safe (line 73); only the remedy that does nothing there is filed (#2242) (2026-11-25).
220+
- Agent `rollback` leaves `.socket/manifest.json` holding `{"patches": {}}`: the v5 rollback semantics (also in `known-non-bugs/pnpm.md`) (2026-11-26).
221+
- `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).
222+
- 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).
223+
- `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).

0 commit comments

Comments
 (0)