|
| 1 | +[agent] 2026-11-17: Bundler (RubyGems) bug-hunt run |
| 2 | + |
| 3 | +**Tested:** main `3b14afc` (5.1.0 is still the latest release; 12 commits since `63f791d`, among them #2098, the agent rebuild of native gems from the source gem, precompiled gems included). Linux. Ruby 3.3.6 with Bundler 4.0.18, 2.6.9 and 2.5.22. The 5.1.0 release binary was installed to date each finding. |
| 4 | + |
| 5 | +**Harness:** no mock this run. Agent records were written by hand (`.socket/manifest.json` and blobs) against real gems from rubygems.org; a C patch defines a global constant in the gem's `Init_` function, so the app shows whether the binary Ruby loads carries it. |
| 6 | + |
| 7 | +**Re-triage:** not done. #2083 and #2086 (the two oldest without `agent:needs-human`) need the hosted mock and the run went to the new rebuild instead. No commit since `63f791d` names either. They are first in the backlog. |
| 8 | + |
| 9 | +**Cells** (agent mode, `vendor/bundle`) |
| 10 | + |
| 11 | +| Cell | Result | |
| 12 | +| --- | --- | |
| 13 | +| Precompiled nokogiri 1.18.3 (`x86_64-linux-gnu`), C file patched: dry run, apply (70 s), app, `bundle install`, frozen install, `apply --check`, `vex`, rollback | pass, tree byte-exact after rollback | |
| 14 | +| Same gem, no `cache/` dir (source gem downloaded), record adds `patches/libxml2/0100-*.patch` and changes a `.rb` | pass: libxml2 rebuilt with the patch, `mini_portile2` not left in the gem home, rollback byte-exact | |
| 15 | +| Precompiled ffi 1.17.1 (ships no `ext/`), sqlite3 2.5.0, google-protobuf 4.29.3 | pass; ffi also through `bundle pristine`, `apply --check` (out of sync), `vex` (omitted), re-apply, rollback | |
| 16 | +| Precompiled pg 1.6.2, no `libpq-dev` | gem untouched, exit 1; the error hides the cause (not filed, see below) | |
| 17 | +| 26 source-built gems in one project (puma, nio4r, bcrypt, json, msgpack, bootsnap, racc, websocket-driver, date, oj, redcarpet, bigdecimal, strscan, stringio, prism, rbs, debug, stackprof, unf_ext, io-console, psych, openssl, erb, hiredis-client, cgi, digest-crc) | apply 2.5 min, app loads every patched extension but digest-crc, 26 VEX statements, rollback byte-exact | |
| 18 | +| scrypt 3.0.8 (ffi-compiler, builds in its own tree) | apply pass; rollback **fail #2104** | |
| 19 | +| digest-crc 0.6.5 (Rakefile build in its own tree) | **fail #2105** | |
| 20 | +| argon2 2.3.0 | **fail #2106** | |
| 21 | + |
| 22 | +**Filed** |
| 23 | +- https://github.com/SocketDev/socket-patch/issues/2104: `rollback` of a gem that builds its library in its own tree restores the source and leaves the patched binary; the marker and the backup record no in-tree artifact. `apply --check` and `list` then report nothing. Also on 5.1.0 and Bundler 2.6.9. |
| 24 | +- https://github.com/SocketDev/socket-patch/issues/2105: the in-place rebuild of digest-crc is a no-op (its Rakefile does not depend on the sources), yet `apply` reports success, `apply --check` is in sync and `vex` emits `not_affected`. Also on 5.1.0 and Bundler 2.5.22. |
| 25 | +- https://github.com/SocketDev/socket-patch/issues/2106 (`ux`): argon2, the gem the docs name as rebuilt from its installed tree, can never be rebuilt: its `extconf.rb` renames `Makefile.real` once. The remedy says to install a compiler. Also on 5.1.0. |
| 26 | + |
| 27 | +**Commented / closed:** nothing. |
| 28 | + |
| 29 | +**Found, not filed (3-issue cap; first backlog item after re-triage)** |
| 30 | +- `native_extension_build_failed` for precompiled pg shows the last 20 lines of stderr, which is mkmf's option dump: the cause ("Can't find the 'libpq-fe.h header") is cut off, the `mkmf.log` it names sits in the deleted stage directory, the remedy says to install a compiler, and the text is printed twice. |
| 31 | + |
| 32 | +**Ruled out** |
| 33 | +- openssl's patch "not taking effect": my record patched `Init_ossl_locks`, which is compiled out. |
| 34 | +- digest-crc's `crc12_3gpp` extension is never required by the gem; `crc32` is the one to observe. |
| 35 | +- The rebuilt nokogiri links system `liblzma` / `libz` dynamically, as `gem install --platform ruby` does. |
0 commit comments