Repository navigation
Conversation
📝 WalkthroughWalkthroughAdds Aqua semantic version sorting through ChangesAqua semantic version sorting
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/backend/aqua.rs`:
- Around line 3356-3358: Update the version sorting comparator in the versions
collection flow to use semantic precedence via left.cmp_precedence(right)
instead of Version::cmp. Keep the existing zip, sort, and version extraction
behavior unchanged so build metadata does not affect ordering.
- Around line 745-750: Update the aqua version-matching helper around the
semantic-sort check to accept and use resolved ToolRequest options from
request.options() instead of self.ba.opts(). Thread those options through
fuzzy_match_filter and related callers, preserving the existing semver decision,
and add a request-level regression test covering tools-table version_sort =
"semver".
🪄 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: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 8ed8f931-d110-4ccc-b707-791228757f9c
📒 Files selected for processing (3)
docs/dev-tools/backends/aqua.mdregistry/tuist.tomlsrc/backend/aqua.rs
Greptile SummaryAdds opt-in semantic-precedence sorting for Aqua version matching, enables it for Tuist, propagates tool options through backend matching APIs, and documents fallback to upstream ordering when candidates are not valid semantic versions. Confidence Score: 5/5The PR appears safe to merge with no concrete correctness or security defects identified. Semantic ordering is opt-in, is applied after candidate filtering, falls back without reordering when parsing fails, and the highest-precedence candidate remains the one selected by the existing resolution flow. Important Files Changed
Reviews (1): Last reviewed commit: "fix(aqua): honor resolved version sort o..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be2ef0f5e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
| }; | ||
| let mut versions = versions.into_iter().zip(parsed).collect::<Vec<_>>(); | ||
| versions.sort_by(|(_, left), (_, right)| left.cmp_precedence(right)); |
There was a problem hiding this comment.
Avoid local SemVer ordering for Aqua resolution
For any Aqua tool opting into version_sort = "semver", this comparator determines the final element selected for both latest and prefix requests. This directly violates the repository invariant prohibiting new SemVer comparators for newest-version selection, since mise versions must remain opaque and resolution should preserve backend-defined semantics. Preserve upstream ordering or implement the correction through a package-aware backend path instead. AI-assisted — Tool: Codex; model: OpenAI/GPT-5.6 Sol; version: unavailable.
AGENTS.md reference: AGENTS.md:L221-L225
Useful? React with 👍 / 👎.
|
Thanks for identifying and demonstrating the Tuist ordering bug here. I opened #11481 as the generic follow-up that supersedes this implementation. It preserves the opt-in SemVer approach, but moves AI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable. |
|
This PR currently has merge conflicts. If this continues for 7 days, it will be closed automatically. This is warning day 1 of 7. Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it. This comment was generated by an automated workflow. |
|
This PR currently has merge conflicts. If this continues for 7 days, it will be closed automatically. This is warning day 2 of 7. Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it. This comment was generated by an automated workflow. |
|
This PR currently has merge conflicts. If this continues for 7 days, it will be closed automatically. This is warning day 3 of 7. Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it. This comment was generated by an automated workflow. |
|
This PR currently has merge conflicts. If this continues for 7 days, it will be closed automatically. This is warning day 4 of 7. Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it. This comment was generated by an automated workflow. |
|
Closing as superseded by #11774, which merged the shared AI-assisted — Tool: Codex; model: OpenAI/GPT-5.6 Sol; version: unavailable. |
|
Thanks @jdx |
What changed
version_sort = "semver", that orders matching releases by semantic versioning precedence.Why
mise latest tuistshould resolve to the highest stable Tuist version even when an older release line receives a newer backport.Root cause
The Aqua backend normally preserves the order returned by the upstream release source. When GitHub's marked latest release belongs to another package in the Tuist repository, mise falls back to release chronology. Tuist
4.197.3was published after4.202.6, so the chronological fallback selected the lower version.Approach
The new behavior is opt-in because Aqua packages do not all use semantic versioning. When enabled, mise skips the marked-latest shortcut, collects matching release candidates, and orders valid semantic versions by precedence. If any candidate is not a valid semantic version, mise preserves the upstream order.
Impact
Tuist now resolves
latestand version prefixes by semantic version precedence. Existing Aqua tools keep their current ordering unless they explicitly enable the option.Validation
/Users/pepicrft/.cargo/bin/cargo fmt --all -- --check/Users/pepicrft/.cargo/bin/cargo test backend::aqua::tests::with 52 tests passedgit diff --checkAI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable.
Summary by CodeRabbit
New Features
version_sort="semver"behavior for Aqua-managed tools, using semantic version precedence forlatestand version-prefix matching.Documentation
version_sortoption, including the semver-based resolution and fallback behavior.