Repository navigation
Fix nightly gem e2e red on bundler 1.17/2.1 CRLF arm - #1995
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
Conversation
The nightly e2e-extended gem legs for bundler 1.17.3 and 2.1.4 fail since #1961 added the crlf-gemfile-source-block arm to gem_hosted_redirect_keeps_a_crlf_gemfile_crlf. Before 2.2 bundler writes one merged GEM section for every rubygems source, and the redirect nests the Socket block inside the user's own source block, so rollback refuses with hosted_wiring_contested. That is the documented era limit that gem_hosted_unwind_keeps_a_source_block_bang already skips for. Apply the same floor to the source-block arm only; the plain CRLF arm still runs on every bundler era. PR CI only runs bundler 4.0.21, so the gap showed up on the nightly schedule run alone. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aeQNTkAfriFzVGPKuZP
|
bugbot run Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 819c846. Configure here.
|
Ready for review (burn-down agent).
Generated by Claude Code |
Final review briefWhat it does: Test-only fix for the nightly Risk: low. One test file, 14 lines, no product code. The skip is narrow (that driver only, bundler < 2.2, Look here
Verified: I read the full diff and checked that the guard matches the sibling test's era floor and wording, and that Changes I made: none. Open questions: none for this PR. The description suggests a later product follow-up: attribute gems in nested source blocks on merged pre-2.2 locks. Auto-merge is armed, so approving sends this straight to the merge queue. Generated by Claude Code |
Pull request was closed
Problem
Tonight's scheduled CI run on main (41585451732, head 3eb2ec1) fails two
e2e-extendedgem legs for the first time:e2e-extended (ubuntu-latest, e2e_redirect_gem_build e2e_vendor_gem_build, 3.1, 2.1.4)e2e-extended (ubuntu-latest, e2e_redirect_gem_build e2e_vendor_gem_build, 3.1, 1.17.3)Both fail only on
gem_hosted_redirect_keeps_a_crlf_gemfile_crlf, in thecrlf-gemfile-source-blockarm, at the rollback assertion withhosted_wiring_contested/patched_ref_unattributable. The message reads "GEM section lists 2 remotes (a merged multi-source lock), and no gem in it is source-pinned to Socket patch …". The same legs passed the night before (41395558980, cbbbdb9), when this arm didn't exist yet. It was added in #1961.This is a deterministic failure, not a flake. I reproduced it locally with bundler 2.1.4.
Root cause
Before 2.2, bundler writes one merged
GEMsection for every rubygems source. The hosted redirect nests the Socketsource … doblock inside the user's ownsource "upstream" doblock. The Gemfile attribution reader invex/discover/gem.rsignores nested blocks, so rollback can't tie the gem to the patch. This is the documented era limit:gem_hosted_unwind_keeps_a_source_block_bang(#1056) already skips with "bundler {} merges every rubygems source into one GEM section". The new CRLF arm is missing that guard. PR CI only runs the bundler 4.0.21 leg, so the gap showed up only in the nightly schedule run.Fix
The source-block arm of the CRLF test now has the same
fx.bundler.at_least(2, 2)floor. It usescontinue, so the plaincrlf-gemfilearm still runs. Assertions are unchanged.Proof
Run locally with
--include-ignored crlf_gemfile_crlf:I couldn't run bundler 1.17.3 locally because it doesn't start on Ruby 3.3; CI pins Ruby 3.1 for that leg. It takes the same
< 2.2branch as 2.1.4.Where coverage still runs
Nothing is dropped:
Follow-up for the product (not changed here): attributing a gem in nested source blocks on a merged pre-2.2 lock would let rollback work on those bundlers too.
Generated by Claude Code
Note
Low Risk
Test-only guard aligned with an existing e2e skip; no production code or behavior changes.
Overview
Fixes nightly gem e2e failures on bundler 1.17 and 2.1 for
gem_hosted_redirect_keeps_a_crlf_gemfile_crlf.The
crlf-gemfile-source-blockloop arm now matchesgem_hosted_unwind_keeps_a_source_block_bang: when bundler is < 2.2, it prints SKIP andcontinues instead of running rollback assertions that fail withhosted_wiring_contested/patched_ref_unattributable. Pre-2.2 bundler merges rubygems sources into oneGEMsection, so nested Socket source blocks cannot be attributed on rollback.The plain
crlf-gemfilearm is unchanged and still runs on every bundler version. The test doc comment notes the ≥ 2.2 requirement for the source-block case.Reviewed by Cursor Bugbot for commit 819c846. Configure here.
Generated by Claude Code