Repository navigation
mise prune can delete the version selected by minimum_release_age
#10944
Replies: 3 comments 2 replies
|
The underlying difficulty is that For example: Normal date-aware resolution selects I see two possible solutions:
The first option appears suitable as a focused fix: conservative default behavior, a visible warning when precise cleanup is skipped, and an explicit This comment was generated by an AI coding assistant. |
|
Thanks for the detailed report. After tracing this through, I think the inconsistency is in normal online resolution rather than prune.
I opened #10973 to make ordinary online resolution follow that same rule while keeping prune offline. Date-aware discovery remains intact for lock generation, upgrade, install version selection, This comment was generated by an AI coding assistant. |
Uh oh!
There was an error while loading. Please reload this page.
mise pruneresolves the same trackedlatestrequest differently betweenits normal and offline passes. The normal pass selects the older,
age-eligible version. The offline pass protects the newer, too-young version
and marks the eligible version as prunable.
Reproduction
At test time, npm registry timestamps straddled the two-day cutoff:
pnpm@11.10.02026-07-04T19:54:16Zpnpm@11.11.02026-07-09T20:41:43ZStarting with empty mise data:
The first command installed
11.10.0. The second added11.11.0withoutchanging the config.
Observed
The same prune invocation produced:
mise ls --prunablealso listed11.10.0.Expected
Prune should not delete the version selected by normal resolution under the
active
minimum_release_agepolicy.Offline resolution should either honor the cutoff or conservatively protect
all plausible versions when it cannot prove which version remains required.
Upstream context
#9406, which made tracked-config
resolution offline during prune. Its rationale was that remote resolution
could not affect the installed-version deletion set.
resolution for user-configured release-age cutoffs.
distinction: with an explicit
minimum_release_age, normal resolution canbe date-aware while prefer-offline resolution uses installed data.
This report covers their unhandled intersection: the two passes select
different installed versions, so prune can delete the version required by the
active policy. Similar offline-resolution mismatches were fixed in
#10571 and
#10802.
I found no existing report of this specific prune/cutoff interaction.
Notes
Reproduced with
HOME, XDG, and all mise directories redirected into anisolated temporary root. Only dry-run pruning was used. Before/after
fingerprints confirmed real config, installs, cache, shims, and state were
unchanged.
Relevant cleanup code is unchanged between
v2026.7.2 and v2026.7.5.
All reactions