Repository navigation
Fix gemspec-only vendor test on Bundler 1.17 (#2203) - #2206
Conversation
gem_vendor_gemspec_only_dependency_refusal_names_remedies_that_work failed in the nightly Bundler 1.17.3 leg. Its first remedy runs a frozen `bundle install`, and Bundler <= 2.0 persists `BUNDLE_FROZEN: "true"` into the project's `.bundle/config` when it does. The second remedy then changes the Gemfile and installs unfrozen, which that Bundler refuses as a deployment-mode install of a changed Gemfile. Put the committed `.bundle/config` back before that install, as the fresh-checkout tests in this suite already do. The premise assert in `gemspec_library` now prints stdout as well, where Bundler 1.x writes its errors. Fixes #2203 Assisted-by: Claude Code:claude-fable-5-2 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f9aePiVyUzKFwJZh49P6u
|
[agent] bugbot run Generated by Claude Code |
PR SummaryLow Risk Overview The test runs a frozen The PR snapshots Reviewed by Cursor Bugbot for commit 4999fc3. Configure here. |
|
[agent] PR shepherd: review brief for the approver What it does. Test-only fix for #2203. The nightly Bundler 1.17.3 leg failed Risk. Low. One test file, 9 lines; no product code, no assertion removed or loosened, nothing skipped. Look here.
Verified. Read the diff and the test around it against #2203's log. CI on Changes I made. None. Open questions. None. Generated by Claude Code |
Wenxin Jiang (Wenxin-Jiang)
left a comment
There was a problem hiding this comment.
[agent] Reviewed the test fixture and both remedy paths. Restoring the fixture's Bundler config between the frozen install and the agent-mode leg fixes the state leak while preserving both assertions.
LLM Description written by Claude Code:claude-fable-5-2
Fixes #2203
Summary
Test-only change.
gem_vendor_gemspec_only_dependency_refusal_names_remedies_that_work(e2e_vendor_gem_build) has failed in the nightly Bundler 1.17.3 leg since it was added. The product behaves correctly there; the test tripped over a Bundler 1.x habit.Root cause
The test checks the two ways out of the refusal in one project directory:
gem "rack"line abovegemspec, vendor, and run a frozenbundle install.bundle install.Bundler <= 2.0 persists
BUNDLE_FROZEN: "true"into the project's.bundle/configon a frozen install. Step 2's install then runs frozen against a changed Gemfile and Bundler refuses it:That message goes to stdout, which the premise assert did not print, so the nightly log showed only
Pathname#untaintwarnings.What changed
.bundle/configat the start and writes it back before step 2's install. The fresh-checkout tests in this file and ine2e_redirect_gem_buildalready do the same for the same reason.gemspec_libraryprints stdout as well as stderr.No assertion is removed or loosened, and nothing is skipped on any Bundler.
Evidence
Ruby 3.1.6,
BUNDLER_VERSION=1.17.3,SOCKET_PATCH_BUNDLER_E2E_REQUIRED=1,SOCKET_PATCH_BUNDLER_E2E_VERSION=1.17.3:Ruby 3.3.6, Bundler 4.0.18: both
gem_vendor_gemspec*tests pass.cargo clippy --locked --workspace --all-features -- -D warnings(CI's command) does not compile test targets.--all-targetsreports lints in this suite's shared test helpers that are onmain; none is on a line this PR touches.The nightly Bundler-era legs do not run on a PR, so this PR's CI does not exercise the 1.17.3 leg; the local run above is the evidence for it.
Review
/code-review highfound no bug in the diff. Two notes, left out to keep this PR to the failing test:gem_vendor_refuses_an_eval_gemfile_direct_depalso installs unfrozen after a frozen install in one directory. It passes on 1.17.3 (run above) because its rewritten Gemfile declares the same dependencies, so Bundler's frozen check has nothing to refuse.https://claude.ai/code/session_011f9aePiVyUzKFwJZh49P6u
Generated by Claude Code