Repository navigation
Don't report locked gems in the cooldown summary - #9981
Merged
Merged
Conversation
When a source has `cooldown:` set, any resolve that keeps gems at their locked versions, such as `bundle lock --add-platform` or `bundle install` after a Gemfile change, listed every locked gem with a newer release inside the window as "skipped by the cooldown setting". Those entries credited the cooldown for a version the lockfile chose. The gem was not unlocked, so the resolver keeps the locked version with or without the cooldown, and `--cooldown 0` writes the same lockfile. Skip gems that are not being unlocked and resolved to their locked version. Gems being updated and gems new to the lockfile are still reported.
hsbt
approved these changes
Oct 30, 2026
hsbt
added a commit
that referenced
this pull request
Nov 5, 2026
The spec added by #9981 refers to compact_index_v2, which replaced compact_index_cooldown only on master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was the end-user or developer problem that led to this PR?
When a Gemfile source has
cooldown:set, any resolve that keeps gems at their locked versions prints a "skipped by the cooldown setting" entry for every locked gem that has a newer release inside the cooldown window. This happens withbundle lock --add-platform, or withbundle install/bundle lockafter an unrelated Gemfile change.The entries say
resolved <locked version> instead, which credits the cooldown for a version the lockfile chose. Nothing was unlocked, so the resolver keeps the locked version anyway, and--cooldown 0writes an identical lockfile. In one of our apps, adding a platform or a gem prints 23 such lines.Reproduction:
What is your fix for the problem, implemented in this PR?
filter_cooldown/cooldown_excluded_versionsrecord every newer candidate inside the window as skipped. Locked versions themselves are exempt (#9599), but the newer candidates are still recorded.cooldown_skipped_summarythen only drops versions that aren't newer than the resolved one or don't satisfy the requirements. For a locked gem that isn't being unlocked, the locked version wins by preference (top-level gems only get a>= lockedfloor), so the newer versions pass that check and are reported, even though the resolver would not have picked them without the cooldown either.The summary now skips gems that aren't being unlocked and resolved to their locked version. Gems being updated (
bundle update,bundle update GEM,bundle lock --update) and gems new to the lockfile are still reported.bundle lock --add-platform x86_64-linuxrake 13.4.2 …, resolved 10.0.0 insteadgem "rack",bundle lockrack 3.2.7 …andrake 13.4.2 …rackonlybundle lock --update rakerake 13.4.2 …, resolved 11.3.0 insteadbundle lock --updaterake 13.4.2 …, resolved 11.3.0 insteadThe added spec fails without the fix:
Related: #9576, #9599.
Make sure the following tasks are checked