fix: include precise in CheckoutGit dedup key#6094
Merged
wolfv merged 1 commit intoMay 12, 2026
Conversation
4 tasks
c02fd51 to
152a826
Compare
`CheckoutGit::new` keyed only on `RepositoryReference` (URL + reference) and `compute` rebuilt `GitUrl` from the reference alone, so `resolver.fetch` always received `precise = None` and re-resolved to the branch's current HEAD. Two callers with different pinned commits on the same branch collided on a single cache slot, and `checkout_pinned_source(commit_A)` could silently return a `SourceCheckout` whose `path` pointed at commit B's checkout while `pinned` reported commit A. That's how a freshly-fetched manifest's tightened `host-dependencies` leaked into a build whose lock-file still pinned the older commit's host_packages, producing the silent `setuptools <82.0.0 | 82.0.1` mismatch in prefix-dev#6073. Key on the full `GitUrl` and pass it through unchanged so the resolver honours `precise` when set and advances to HEAD only when not.
152a826 to
71656a8
Compare
wolfv
approved these changes
May 12, 2026
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.
Description
The
CheckoutGitdedup key droppedpreciseandcomputerebuilt theGitUrlfrom the reference alone, soresolver.fetchalways re-resolved to the branch HEAD. Two callers with different pinned commits on the same branch collided on one cache slot, andcheckout_pinned_source(commit_A)could return aSourceCheckoutwhosepathpointed at commit B's checkout whilepinnedreported commit A.Effect on #6073: the build backend read the latest source manifest (with the new
setuptools = "<82.0.0") while the lock-file still carried commit A's solvedhost_packages(setuptools 82.0.1), producing the silentsetuptools <82.0.0 | 82.0.1mismatch in the build env.Fix: key
CheckoutGiton the fullGitUrland pass it through unchanged so the resolver honoursprecisewhen set.Fixes #6073
How Has This Been Tested?
Reproducer matching the issue (caiman-like path dep depending on fastplotlib-like git dep):
pixi installagainst fastplotlib-like @ commit A (no constraint), which locks commit A and resolvessetuptools 82.0.1in the host env. Consistent.setuptools = "<82.0.0";pixi install(noupdate), and the lock-file stays on commit A, no rebuild, no mismatch table. Before this fix, step 2 producedsetuptools <82.0.0 | 82.0.1.pixi update fastplotlib-like+pixi install, the lock-file advances to commit B and the host env resolvessetuptools 81.0.0. Constraint honoured.AI Disclosure
Tools: Claude
Checklist: