Skip to content

Commit 1c5f5a8

Browse files
committed
bundler: 2026-12-06 run, #2545
1 parent b2cae97 commit 1c5f5a8

3 files changed

Lines changed: 34 additions & 4 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[agent] 2026-12-06: Bundler (RubyGems) bug-hunt run
2+
3+
**Tested:** main `cd7c5c5` (unchanged since 12-05; two commits after release 5.2.0, `d987721`). Linux. Ruby 3.3.6 with Bundler 4.1.1 (still the newest; no newer prerelease). The common-path cells ran on this SHA on 12-05 and were not repeated.
4+
5+
**Focus:** the handover from the Bazel run (`entries/bundler/20261206T131500Z-from-bazel.md`), then backlog item 7 (a git merge on a hosted pair).
6+
7+
**Harness:** the repo's stand-in (`tests/nokogiri/patch_service.rb`) with blobs added to the patch view, `path vendor/bundle`, locks with `CHECKSUMS`. Gems: ffi 1.17.2 (the `ruby` build, `force_ruby_platform`, with 3 platform records beside the `ruby` one), rack 3.1.8, rake.
8+
9+
**Re-triage:** none. Main has not moved since the last re-checks.
10+
11+
**Cells**
12+
13+
| Cell | Result |
14+
| --- | --- |
15+
| Agent, ffi installed as its `ruby` build (`PLATFORMS ruby`), a Ruby-only fix with the same patched file in every build, 4.1.1, 4 runs: scan, re-scan, `apply --check`, `vex`, rollback | **fail, #2545**: the code loads patched and rollback is clean, but `applied` names another platform's record each run, `apply --check` checks 4 patches, and `vex` attests three platform gems that are neither installed nor locked |
16+
| The same with a patched file that differs per build (the handover's shape), 8 runs | **fail, #2545**: one record is written, the `ruby` one in 3 runs of 8; `vex` then names only that record's platform gem and not `pkg:gem/ffi@1.17.2` |
17+
| Agent, the same project, a fix that changes a C source and a Ruby file, platform records bringing binaries, 6 runs | the `ruby` record is applied and the extension rebuilt every run; rollback restores the source and the build. A platform record whose only file in the copy is the shared Ruby file is attested beside it (in #2545) |
18+
| Hosted, 4.1.1: the hosted pair on a branch, `main` bumps another gem, `git merge` conflicts in `Gemfile` and `Gemfile.lock`; resolved by hand in the Gemfile, `git checkout --ours Gemfile.lock`, `bundle install` | pass: the lock comes out as the hosted one plus the bump, frozen install, app loads the patch, re-scan "already on hosted patches", `vex`, rollback gives `main`'s pair byte for byte |
19+
| Hosted scan while the Gemfile still holds conflict markers | exit 0, nothing rewritten; see "Ruled out" |
20+
21+
**Filed**
22+
- https://github.com/SocketDev/socket-patch/issues/2545: agent mode matches a gem installed as its `ruby` build to every platform record of the fix.
23+
24+
**Ruled out** (added to `known-non-bugs/bundler.md`)
25+
- A hosted scan over a Gemfile with git conflict markers says "`gem "rack"` is declared more than once in Gemfile … merge them into one declaration": both sides of the conflict declare the gem, Bundler itself refuses the file first, and the scan changes nothing.
26+
- "No release variant … matches the installed distribution" (`no_matching_variant`) after `.socket/` was deleted while a patch was applied: the copy holds a patch the manifest no longer knows. `bundle pristine` clears it.
27+
28+
**Blocked / not reached:** a Dependabot-style bump on a hosted pair; interrupted vendored unwind; a platform record that leaves out one Ruby's binary; a mirror with hex checksums; Ruby 3.4 / 4.0 / 2.7 (none under `/opt`).

‎known-non-bugs/bundler.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,3 +280,5 @@ Documented limitations and verified false positives. One bullet each. Search thi
280280
- After a vendored rollback the lock differs from a copy saved after `bundle lock --remove-platform ruby` when that command ran on an already vendored lock: the copy held the vendored `PATH` section. Rollback gives the pre-patch lock less the removed platform (2026-12-05).
281281
- "1 vulnerability left to patch: 1 needs a paid Socket plan" when a mock offers two `tier: free` patches with different advisories for one gem version: by design (`scan/discovery.rs` `package_coverage`), a free patch that the free tier's merged patch leaves out counts as paid; the service offers one merged free patch, so the two-patch answer is a mock artifact (2026-12-06).
282282
- `setsid cmd &` inside a non-interactive shell can fork, so `kill -INT -- -$!` finds no process and the run goes on in the background ("Another socket-patch process is operating"): start the command with `&` and signal it and its children (`pkill -INT -P $P; kill -INT $P`) (2026-12-06).
283+
- A hosted scan over a Gemfile that still holds git conflict markers says "`gem \"x\"` is declared more than once in Gemfile ... merge them into one declaration" and exits 0 with nothing rewritten: both sides declare the gem, and Bundler refuses the file itself (2026-12-06).
284+
- `no_matching_variant` ("No release variant ... matches the installed distribution") after `.socket/` was deleted while a patch was still applied: the copy holds a patch the manifest no longer knows; `bundle pristine` clears it (2026-12-06).

‎state/bundler.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Harness: rubygems.org is reachable, the Socket patch API is not. Use the repo's
1212
| System or user gem home (no `BUNDLE_PATH`) | pass with `GEM_HOME` (11-15); native rebuild (11-17); `path` beside a system copy (#2313 fixed, 12-02); a global-config `path` shared by two projects 4.1.1 (12-04); `BUNDLE_PATH` in the environment 4.1.1 (12-05); a local `path` over an env `BUNDLE_PATH`: the unused env home is patched too: fail #2531 | pass 4.1.1: an unlocked version in the home is skipped (#2075 holds, 11-27); an env `BUNDLE_PATH` outside the project, puma hosted beside: frozen install, `vex`, rollback 4.1.1 (12-05) | pass: warning, `--gem-refresh-shared` (11-15); stale copies on a second machine (12-01); a global-config `path` (12-04) or env `BUNDLE_PATH` (12-05) shared by two projects: warning, `--gem-refresh-shared`, rollback remedy; a relative env `BUNDLE_PATH` 2.6.9 (12-05); the printed `path` remedy under an env `BUNDLE_PATH`: `vex` fails, fail #2531 |
1313
| `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) |
1414
| 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) (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-
| Multi-platform lock, platform gems (`-x86_64-linux-gnu`), one patch per platform gem (#2422) | pass 4.1.1 (12-02), a clone on the `ruby` build too; a platform record that brings its binaries: no build, `apply --check`, `vex`, `pristine` and re-apply, rollback byte-exact 4.1.1, 2.6.9; a copy 5.2.0 left stuck is repaired by `apply` and by `rollback` (#2499 holds, 12-05); such a record written on another build (arm64-darwin or musl manifest on glibc): `apply` exits 1 with no remedy: fail #2520; a Ruby-only glibc-written manifest on a musl tree: applied by content; with `--all-releases` each build uses its own record (12-04, 12-05); `--all-releases` warnings on a lock without `ruby`: fail #2452; a re-scan says "1 package has a newer patch available" every time: #2370 | pass 4.1.1 (12-02, 12-05): after the printed `--remove-platform`; a platform without a patch is skipped; a platform removed after vendoring; `--add-platform` after vendoring refused as documented; builds split over two fixes skipped with the reason; a patch withdrawn after vendoring (12-03) | pass 4.1.1 (12-02): all platforms patched; one without a patch: refused with the remedy; `--remove-platform` after wiring; builds split over two fixes: skipped with the reason (12-03); a machine that installs the `ruby` build (`force_ruby_platform`, per gem or in the env) 4.1.1 (12-06) |
15+
| Multi-platform lock, platform gems (`-x86_64-linux-gnu`), one patch per platform gem (#2422) | pass 4.1.1 (12-02), a clone on the `ruby` build too; a platform record that brings its binaries: no build, `apply --check`, `vex`, `pristine` and re-apply, rollback byte-exact 4.1.1, 2.6.9; a copy 5.2.0 left stuck is repaired by `apply` and by `rollback` (#2499 holds, 12-05); such a record written on another build (arm64-darwin or musl manifest on glibc): `apply` exits 1 with no remedy: fail #2520; a Ruby-only glibc-written manifest on a musl tree: applied by content; with `--all-releases` each build uses its own record (12-04, 12-05); `--all-releases` warnings on a lock without `ruby`: fail #2452; a re-scan says "1 package has a newer patch available" every time: #2370; a gem installed as its `ruby` build beside platform records (`force_ruby_platform`, `PLATFORMS ruby`): matched to every record, `vex` attests builds that are not installed: fail #2545 (12-06) | pass 4.1.1 (12-02, 12-05): after the printed `--remove-platform`; a platform without a patch is skipped; a platform removed after vendoring; `--add-platform` after vendoring refused as documented; builds split over two fixes skipped with the reason; a patch withdrawn after vendoring (12-03) | pass 4.1.1 (12-02): all platforms patched; one without a patch: refused with the remedy; `--remove-platform` after wiring; builds split over two fixes: skipped with the reason (12-03); a machine that installs the `ruby` build (`force_ruby_platform`, per gem or in the env) 4.1.1 (12-06) |
1616
| Gem with a native extension (rebuild after patching, rollback restores the build) | pass 30 gems 4.0.18 (11-17); a `.h`-only patch, a Rust gem (11-28); a killed `apply`, `--offline`, no compiler leave the gem intact; a C patch 4.1.1: CI clone, `pristine`, re-apply, rollback byte-exact (12-01) | refused as documented, exit 1, other gems vendored, 4.0.24 (11-14) | pass 4.0.18, 4.0.24 (11-14); a C patch 4.1.1: deployment clone, `pristine`, rollback (12-01) |
1717
| 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 4.1.1 (11-27); parent dropped with `bundle remove`: rollback clean (11-28) | pass 2.5.23 to 4.0.24 (11-14) |
1818
| 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 (11-14) |
19-
| `bundle update` / `bundle add` / `bundle remove` / `bundle outdated` after patching | pass 4.0.18: add, remove, clean, outdated (11-14); a patched gem moved to another version 4.1.1 (11-30) | pass 4.0.18: add, remove (another gem), update, outdated, `cache` (11-14); #2325 fixed, not re-run; the vendored `gem` line edited (`require: false`, a `group` block): rollback exits 1, fail #2338 (still, 12-03) | pass: add / remove 2.6.9 (11-13); `lock` flags, `update <other gem>`, `clean` (11-16); the printed steps to a newer release (11-27); a wired line edited (11-28); `bundle remove` of a patched gem (12-01); `lock --normalize-platforms`, `update --all`, `binstubs`, `doctor`, then rollback 4.1.1 (12-06) |
19+
| `bundle update` / `bundle add` / `bundle remove` / `bundle outdated` after patching | pass 4.0.18: add, remove, clean, outdated (11-14); a patched gem moved to another version 4.1.1 (11-30) | pass 4.0.18: add, remove (another gem), update, outdated, `cache` (11-14); #2325 fixed, not re-run; the vendored `gem` line edited (`require: false`, a `group` block): rollback exits 1, fail #2338 (still, 12-03) | pass: add / remove 2.6.9 (11-13); `lock` flags, `update <other gem>`, `clean` (11-16); the printed steps to a newer release (11-27); a wired line edited (11-28); `bundle remove` of a patched gem (12-01); `lock --normalize-platforms`, `update --all`, `binstubs`, `doctor`, then rollback 4.1.1 (12-06); a `git merge` that conflicts in the pair, resolved with `--ours` and `bundle install`, rollback byte-exact 4.1.1 (12-06) |
2020
| 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), 2.5.22 (11-24); #2214 fixed (11-25); platform gem after `--remove-platform` pass 4.1.1 (12-01) | pass on all, CRLF and `vendor/cache` archives too (11-16); `bundle cache --all-platforms` 4.1.1 and a cache built after the scan 2.6.9 (12-01) |
2121
| `vex` reports only what is really applied | pass 2.6.9, 4.0.18 (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 |
2222
| `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) |
@@ -41,13 +41,13 @@ Harness: rubygems.org is reachable, the Socket patch API is not. Use the repo's
4141

4242
## Backlog
4343

44-
1. Re-check when fixed: #2531, #2520, #2508, #2500, #2483, #2484, #2471, #2452, #2436, #2338 (still fails 12-05), #2354; #2376's left-over case. Re-run the #2325 repro (fixed, not re-run).
44+
1. Re-check when fixed: #2545, #2531, #2520, #2508, #2500, #2483, #2484, #2471, #2452, #2436, #2338 (still fails 12-05), #2354; #2376's left-over case. Re-run the #2325 repro (fixed, not re-run).
4545
2. Platform records with binaries, the rest: a record that leaves out one Ruby's binary (documented failure: check the message); a `ruby`-build manifest on a platform build; `--all-releases` manifests in `vex`.
4646
3. Interrupted runs, the rest: a vendored unwind of a once-hosted gem stopped during the refresh (as #2500); a hosted `rollback` stopped between its two writes (2 ms apart, about 0.8 s in); an agent `apply` with a native rebuild stopped between two gems.
4747
4. A mirror whose index has hex checksums (gemstash, or rewrite `info/*`): the hosted unwind, vendored mode, the agent native rebuild, credentials in the URL.
4848
5. Vendored and git, the rest: a gem-shipped `.gitattributes` with a `filter` rule or inside a platform gem's tree (after #2483); a Rails lock that keeps the generic `aarch64-linux` platform after the printed `--remove-platform`.
4949
6. Agent native rebuild, the rest: a private source, sass-embedded; real nokogiri with `--use-system-libraries` (#2136).
50-
7. Team workflows on a hosted pair: a git merge or rebase that conflicts in `Gemfile.lock`, a Dependabot-style bump of a patched gem's version in the Gemfile alone.
50+
7. Team workflows, the rest: a Dependabot-style bump of a hosted gem's version in the Gemfile alone; a `git rebase` or merge that conflicts on a vendored pair. For per-build records in agent tests, give each build its own mark (override `repack`); the stock stand-in's mark is the same in every build and hides #2545's second shape.
5151
8. Re-run the repros of fixes not re-run yet: #2106, #2185, #2129, #2151, #2162, #2087, #2092, #2117, #2285.
5252
9. Ruby 3.4, 4.0 and 2.7 as soon as one appears under `/opt` (ruby-build can't download). Bundler 4.1 `CONTENT ADDRESSES`.
5353
10. A gem home shared by two Rubies; after #2531, the other shadowed tiers (env `BUNDLE_PATH` under local `deployment` or `path.system`).

0 commit comments

Comments
 (0)