fix(python): honor minimum release age for core versions#10311
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughParses python-build git history and precompiled date strings to populate ChangesPython Precompiled Version Timestamps
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9a6df21. Configure here.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/plugins/core/python.rs`:
- Around line 191-196: The git invocation building the args for "git log" (the
array containing "--format=%cI", "--name-only", and the path
"plugins/python-build/share/python-build") should be constrained to add-only
history so created_at reflects the original add commit, not last-touch edits;
update the git log args to include "--diff-filter=A" (and keep "--format=%cI"
and "--name-only") so only file-add commits are considered, and make the same
change for the other similar git log invocation(s) in python.rs (the other
occurrence around the referenced lines).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 83f52ab3-6a1e-4b88-b15b-05e560153692
📒 Files selected for processing (2)
e2e/core/test_python_precompiled_minimum_release_agesrc/plugins/core/python.rs
Greptile SummaryThis PR fixes Python version listings so
Confidence Score: 5/5Safe to merge — the change is additive, failures fall back to empty timestamp maps, and no install path is modified. Both new code paths have graceful degradation: the source-build git log failure is caught, logged, and replaced with an empty map, so version listing continues uninterrupted without timestamps. The precompiled conversion is purely mechanical and validated by unit tests. The No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "fix(python): honor minimum release age f..." | Re-trigger Greptile |
| created_at | ||
| .entry(version.to_string()) | ||
| .or_insert_with(|| timestamp.clone()); |
There was a problem hiding this comment.
Newest-first git log +
or_insert_with stores modification date, not creation date
git log outputs commits newest-first. or_insert_with keeps the first value inserted, which is the most-recent commit touching each definition file. If a definition (e.g. 3.12.0) was patched or fixed in a later commit, the map stores that modification timestamp rather than the original creation timestamp. A user running minimum_release_age on the source-build path would see Python 3.12.0 (released 2023-10-03) silently hidden because its definition was touched more recently.
Adding --diff-filter=A to the git log call restricts output to commits that first Added each file, so the map always records the true release date.
| let output = crate::cmd!( | ||
| "git", | ||
| "-C", | ||
| self.python_build_path(), | ||
| "-c", | ||
| format!("safe.directory={}", self.python_build_path().display()), | ||
| "log", | ||
| "--format=%cI", | ||
| "--name-only", | ||
| "--", | ||
| "plugins/python-build/share/python-build", | ||
| ) | ||
| .read()?; |
There was a problem hiding this comment.
Adding
--diff-filter=A restricts the log to commits that first Added each definition file, ensuring the map records the original release date rather than the date of any subsequent patch or maintenance commit.
| let output = crate::cmd!( | |
| "git", | |
| "-C", | |
| self.python_build_path(), | |
| "-c", | |
| format!("safe.directory={}", self.python_build_path().display()), | |
| "log", | |
| "--format=%cI", | |
| "--name-only", | |
| "--", | |
| "plugins/python-build/share/python-build", | |
| ) | |
| .read()?; | |
| let output = crate::cmd!( | |
| "git", | |
| "-C", | |
| self.python_build_path(), | |
| "-c", | |
| format!("safe.directory={}", self.python_build_path().display()), | |
| "log", | |
| "--format=%cI", | |
| "--name-only", | |
| "--diff-filter=A", | |
| "--", | |
| "plugins/python-build/share/python-build", | |
| ) | |
| .read()?; |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
9a6df21 to
a173003
Compare
a173003 to
a5c1ec1
Compare
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.2 x -- echo |
20.8 ± 1.1 | 18.1 | 25.4 | 1.00 |
mise x -- echo |
21.8 ± 1.7 | 19.2 | 41.3 | 1.05 ± 0.10 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.2 env |
20.8 ± 1.2 | 18.1 | 26.1 | 1.00 |
mise env |
21.4 ± 1.2 | 18.5 | 28.8 | 1.03 ± 0.08 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.2 hook-env |
21.2 ± 1.2 | 18.3 | 25.7 | 1.00 |
mise hook-env |
23.4 ± 3.4 | 18.6 | 35.4 | 1.10 ± 0.17 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2026.6.2 ls |
18.3 ± 1.2 | 15.6 | 23.1 | 1.00 |
mise ls |
19.3 ± 1.4 | 15.9 | 23.9 | 1.05 ± 0.11 |
xtasks/test/perf
| Command | mise-2026.6.2 | mise | Variance |
|---|---|---|---|
| install (cached) | 146ms | 145ms | +0% |
| ls (cached) | 66ms | 67ms | -1% |
| bin-paths (cached) | 74ms | 79ms | -6% |
| task-ls (cached) | 153ms | 153ms | +0% |

Summary
minimum_release_agecan filter themRoot cause
Core Python returned
VersionInfoentries withoutcreated_at, so the shared release-age filter had no timestamp metadata to hide newly published Python versions.Tests
rustfmt --edition 2024 --check src/plugins/core/python.rscargo test parses_python --quietmise run test:e2e e2e/core/test_python_precompiled_minimum_release_ageThis PR was generated by an AI coding assistant.
Note
Medium Risk
Changes version listing behavior for a core tool and adds a git subprocess on the source-build path; failures degrade to missing timestamps rather than breaking installs.
Overview
Core Python remote version listings now set
created_at, so sharedminimum_release_agefiltering can exclude versions that are too new.For precompiled listings (
python.compile=false/ Windows), release dates from the python-build-standalone index (YYYYMMDD) are normalized to ISO timestamps on eachVersionInfo. For source-build listings, a newgit logpass overplugins/python-build/share/python-buildmaps each definition name to the commit time it was added; failures are logged and listing still works without timestamps.Unit tests cover the parsers, and an e2e script asserts
mise latest/mise ls-remote --jsonrespect--minimum-release-agefor precompiled Python without installing.Reviewed by Cursor Bugbot for commit a5c1ec1. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
Tests