Skip to content

Skip cached releases with proven dependency conflicts - #21839

Draft
charliermarsh wants to merge 1 commit into
mainfrom
charlie/codex-prune-proven-conflicts
Draft

charliermarsh wants to merge 1 commit into
mainfrom
charlie/codex-prune-proven-conflicts

Conversation

@charliermarsh

Copy link
Copy Markdown
Member

When consecutive registry releases depend on a range ruled out by a fixed requirement, we currently select and reject each release separately, even when we have already fetched its metadata. Look ahead at that metadata after repeated conflicts and teach PubGrub about additional releases whose declared dependencies are proven incompatible. Follow up to two learned dependency edges only when their incompatibilities cover the entire intermediate range; otherwise use the existing search. The lookahead doesn't fetch more metadata and skips packages with potentially different sources.

For example, if the project pins A==1 and several releases of B each require A>=2, we can exclude those B releases together. A release that also allows A==1 still goes through normal selection.

Across 141 successful public-project resolutions, the outputs were byte-for-byte identical; four tried fewer distinct package/version pairs and none tried more. Distinct package counts did not change:

Project Baseline This change
Home Assistant 160 142
SciPy (doc extra) 182 167
Saleor 188 185
Kedro 58 57

Two independent warm runs of the checked-in Home Assistant fixture measured median solve times of 104.2 → 100.9 ms and 102.4 → 97.7 ms. I did not establish a repeatable timing improvement on the other projects.

@astral-sh-bot

astral-sh-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

uv test inventory changes

This PR changes the tests when compared with the main base revision.

  • Added tests: 1
  • Removed tests: 0
  • Changed suites: 1
uv::lock: +1 / -0

Added:

  • uv::lock::lock::lock_prunes_cached_releases_with_fixed_transitive_conflicts

Removed: none

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