Repository navigation
Stop a running upgrade re-solve at the time bound - #102
Merged
Merged
Conversation
…nager#22598) With UpgradeTimeFactor or UpgradeMaxTime set, each re-solve runs under a child context ending at the pass's bound. A re-solve cut there counts as no gain and ends the pass. A parent cancel or deadline behaves as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
With
UpgradeTimeFactororUpgradeMaxTimeset, eachUpgradeRootsre-solve now runs under a child context that ends at the pass's bound. Before, the bound was checked only before a re-solve, so one in flight could overrun it by a whole solve (on PPM's s2-105 list, that set the pass's floor at ~1.4x the base solve). For rstudio/package-manager#22598.limit - (now - passStart)). No new option.Tests (
resolver/upgrade_cut_test.go): an index wrapper that stalls reads under a deadline until the ctx ends (5s fail-safe), so a "slow" re-solve costs ~100ms real time. Covers: running re-solve cut, base returned, no further re-solve; cut after a gain keeps the gain; each re-solve's deadline equals the pass's remaining time (fake clock: 25s/15s/5s at factor 2.5); parent deadline unchanged with and without a bound; no bound adds no deadline; repeated runs identical.RED on main: the 4 cut/deadline tests failed (upgraded answer after 3 re-solves, no deadline on re-solves); the parent and no-bound tests passed, as they should. GREEN after the fix.
Checked:
go test -race ./...pass; vet, gofmt, golangci-lint clean. packse 147 = 94/2/6/4/41, SAT oracle 102 with 8 disagreements, ecosystem 165 pins, transcript unchanged (no testdata changed).Merged origin/main (v0.24.0 release); the auto-merge put the entry in the tagged 0.24.0 section, moved back to Unreleased in 86c98cf.
RoboRev: job 5262 (66782db) and job 5263 (86c98cf), both pass with no findings.
Independence audit (
audit.sh --paths '%go-pyresolver-worktrees/upgrade-child-deadline%', afteragentsview sync): PASS, exit 0. 1 authoring session, 241 in the lineage, no known reference retrieved. Cross-repo note: 2curldownloads of the uv release binary by a dogfood session in the lineage (a binary, not source).🤖 Generated with Claude Code