Skip to content

fix(update): drop batch targets the dependency has already moved past - #151

Merged
sweepies merged 2 commits into
mainfrom
fix/batch-drops-superseded-targets
Oct 31, 2026
Merged

sweepies merged 2 commits into
mainfrom
fix/batch-drops-superseded-targets

Conversation

@sweepies

@sweepies sweepies commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Found on the Count's own repository: batch #150 would have downgraded node 26.13.0 → 24.22.2, dotnet 10.0.403 → 9.0.320 and ruby 4.0.9 → 3.4.12. I closed it unmerged.

Cause. Those three updates were ticked into a batch. The batch that followed (#145) carried the newer majors instead and left them ticked. plan::batch_plan treated a target as done only when it equalled the current value, so on the next run it applied the older targets again.

Fix. A target whose version is older than the dependency's current version is dropped as superseded, compared with the dependency's own versioning scheme. For a lockfile-only target, the locked version is the one compared. Targets equal to or newer than the current version behave as before.

a_batch_drops_a_target_older_than_the_current_version batches node 24.22.2 against a mise.toml on 26.13.0, and fails without the fix. It also checks that an equal target is dropped and a newer one is still batched.

View guided diff Turn on auto-fix

An update ticked into the batch after a later batch carried a newer release
was still applied, because a target only counted as done when it equalled
the current value. A batch then took node from 26.13.0 back to 24.22.2.
A target older than the current version, or than the locked one for a
lockfile-only target, is now dropped.
@deepsource-io

deepsource-io Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 829fe1e...c2ae471 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
Rust Oct 31, 2026 8:30a.m. Review ↗
JavaScript Oct 31, 2026 8:30a.m. Review ↗
Shell Oct 31, 2026 8:30a.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread crates/update/src/plan.rs Resolved
Comment thread crates/update/src/lockfiles/tests.rs Resolved
A ranged declaration such as ^1.40 names no single version, so a target
behind its locked release was still batched. The locked version now
counts, and the declared value only when it is a version.
@sweepies
sweepies merged commit df56088 into main Oct 31, 2026
16 checks passed
@sweepies
sweepies deleted the fix/batch-drops-superseded-targets branch October 31, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant