Repository navigation
Build: fix nightly gem unwind test on bundler < 2.2 (#1685) - #1687
Mikola Lysenko (mikolalysenko) wants to merge 3 commits into
Conversation
Assisted-by: Claude Code:claude-opus-5-5
The unconverged-supersede unwind test needs a superseding hosted re-scan that moves only the Gemfile block to the new patch. Bundler 1.17 to 2.1 write one merged GEM section, where discovery can't attribute the new pin, so that re-scan refuses it (redirect_unattributable) and writes nothing. The window the test covers never opens there, and its premise assert failed on both old-bundler nightly legs. On those eras the test now asserts the refusal and that both files stay on the earlier patch, then stops with a SKIP line. Bundler 2.2+ runs the full rollback and remove checks as before. Fixes #1685 Assisted-by: Claude Code:claude-opus-5-5
Review follow-up for the bundler < 2.2 branch of the unconverged supersede test. It now parses the scan output and requires the skipped event for this gem's new patch, checks that the refused scan left the Gemfile and lock byte-identical, and then still runs rollback or remove on the converged gen 2 pair with the same cleanup and frozen-install checks, so old bundler legs keep covering the unwind. The refusal itself is tracked as #1688. Refs #1685 Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review 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 bb18fa1. Configure here.
|
Labeled Ready for review (burn-down agent).
Generated by Claude Code |
|
Labeled Ready for review by the burn-down agent.
Generated by Claude Code |
Final review briefWhat it does. Test-only fix for the nightly failure in #1685. On bundler < 2.2 (one merged Risk: low. One Look here
Verified. Read the full diff (1 file, +41/−11). Changes I made. None. Open question (doesn't block this PR). #1690 fixes the product limitation (#1688) and rewrites this same Auto-merge is armed, so approving sends this straight to the merge queue. Generated by Claude Code |
LLM Description written by Claude Code:claude-opus-5-5
Fixes #1685
Problem
The nightly full-scope run on main (39907645034) fails both old-bundler
e2e-extendedgem legs (bundler 1.17.3 and 2.1.4 on Ruby 3.1) ingem_hosted_unwind_after_unconverged_supersede_undoes_the_new_block, added in #1664.Root cause
The test needs the "unconverged window" from #1626: a superseding hosted re-scan moves the Gemfile block to the new patch while the lock still pins the old one. Bundler 1.17 to 2.1 write one merged
GEMsection that lists every remote. Lockfile discovery can't attribute the new pin there, so the gen-3 scan refuses it withredirect_unattributableand writes nothing. Locally on bundler 2.1.4 the scan reports:The Gemfile stays on gen 2, so the test's premise assert (
gemfile.contains(GEN3),e2e_redirect_gem_build.rs:2346) fails before rollback or remove even runs. The product behaves safely here: it refuses and leaves both files unchanged. The window #1626 fixed can't open on these bundler eras. PR CI and the merge queue run only the bundler 4.0.21 leg, which is why only the nightly saw this.Change
Test only, one function. On bundler < 2.2 (
fx.bundler.at_least(2, 2), the same gate the source-block unwind test already uses), the test no longer expects the unconverged window. Instead it:skippedevent forvuln-gem's gen-3 uuid witherrorCode: redirect_unattributable;rollback/removeon that gen-2 pair, with the same checks as before: nopatch-registryleft in either file, the gem declared again, and a frozenbundle installaccepting the restored lock unchanged.Bundler 2.2+ runs the original unconverged-window path unchanged. The doc comment and
#[ignore]text say which era gets which path. No product code changed.The refusal itself is a real product limitation: on bundler < 2.2 a superseding patch is never applied, and scan exits 0. That is filed as #1688 for the product lane and referenced in the test comment.
Runner usage
No workflow change. Lean PR run: same ~28 Linux jobs and job-minutes before and after. The nightly old-bundler legs run the same tests.
Tests (local, Ruby 3.3.6)
:2346(Gemfile still on gen 2)e2e_redirect_gem_build+e2e_vendor_gem_buildwith--ignoredon bundler 2.1.4: 32 + 8 passed.cargo fmt --all -- --checkclean.cargo clippy --workspace --all-features -- -D warningsclean. The--all-targetsclippy errors (duplicatecommon/module loads and others) exist on main too and are unrelated./code-review high
Six findings, all addressed in bb18fa1: the refusal check now parses the JSON and matches purl, uuid and code; the files are compared byte for byte; old bundler still runs the unwind (which also removes the duplicate-fixture concern, because both iterations now test something); the doc and
#[ignore]text are updated; and the product limitation is filed as #1688.Not in this PR
The Windows
testshards in the same nightly fail on path-form mismatches (RUNNER~18.3 names vs canonical\\?\C:\Users\…, mixed separators):hosted::governing_root::tests::vlt_project_root_governs_unlisted_directories,get_failure_paths::engine_nested_apply_preserves_conflicts_introduced_during_fetch, and an unidentifieduser_patchestest. The night before,uv::tests::global_uv_settings_reads_the_user_then_first_system_filefailed instead. That is a separate root cause.https://claude.ai/code/session_014zBZGsFDqCwbUGY77ue3Dq
Generated by Claude Code