Skip to content

Don't exclude the locked version from cooldown during bundle update#9599

Merged
hsbt merged 2 commits into
masterfrom
cooldown-keep-locked-version
Jun 5, 2026
Merged

Don't exclude the locked version from cooldown during bundle update#9599
hsbt merged 2 commits into
masterfrom
cooldown-keep-locked-version

Conversation

@hsbt
Copy link
Copy Markdown
Member

@hsbt hsbt commented Jun 5, 2026

What was the end-user or developer problem that led to this PR?

Fixes #9598

What is your fix for the problem, implemented in this PR?

A lockfile written before cooldown was enabled often pins a version now inside the cooldown window. bundle update/outdated floor each gem at >= locked_version but the cooldown filter then drops that same version, making resolution fail.

Keep the version sitting at the floor eligible. gems updated explicitly carry an exact = requirement and stay subject to cooldown.

Make sure the following tasks are checked

…ndow

bundle update and bundle outdated install a >= locked_version
prevent-downgrade floor, so resolution never moves a gem backwards. The
cooldown filter was excluding that same locked version, making
resolution impossible whenever the lockfile was written before cooldown
was enabled and still pins an in-cooldown release. Exempt the version
sitting exactly at the floor; gems updated explicitly carry an exact =
requirement and stay subject to cooldown.

#9598

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 5, 2026 00:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a Bundler resolver edge case where enabling a source cooldown could make bundle update/bundle outdated fail when the lockfile’s currently locked version falls within the cooldown window. The change ensures the “prevent-downgrade floor” version (>= locked_version) remains eligible for resolution, while still applying cooldown when a gem is explicitly updated.

Changes:

  • Adjust Bundler’s cooldown filtering to not exclude the version that exactly matches the lockfile floor (>= locked_version).
  • Add end-to-end specs covering bundle update --all, bundle outdated, and explicit bundle update <gem> behavior under cooldown.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
spec/install/cooldown_spec.rb Adds regression tests ensuring update/outdated don’t fail when the locked version is within cooldown, while explicit updates still respect cooldown.
bundler/lib/bundler/resolver.rb Skips cooldown exclusion for specs matching the lockfile’s >= locked_version floor to prevent impossible resolution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

The previous tests only exercised a top-level locked gem. Add a
transitive dependency that resolves only through an in-cooldown version,
and a case where a cooldown-eligible version above the locked one still
gets picked up, so the full update behavior stays pinned down.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hsbt hsbt merged commit feeaf9d into master Jun 5, 2026
108 checks passed
@hsbt hsbt deleted the cooldown-keep-locked-version branch June 5, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with new Bundler Cooldown feature when re-resolving dependencies

2 participants