Skip to content

refactor(lock): skip aqua prefix ambiguity pass without override prefixes - #14232

Merged
jdx merged 6 commits into
mainfrom
claude/aqua-lock-prefix-followup
Oct 9, 2026
Merged

jdx merged 6 commits into
mainfrom
claude/aqua-lock-prefix-followup

Conversation

@jdx

@jdx jdx commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

https://entire.io/gh/jdx/mise/trails/615

Follow-up to #14218, stacked on it (base is a copy of that PR's head, since its branch does not allow maintainer edits). Retarget to main once #14218 merges.

mise lock no longer clones the aqua package once per version candidate for packages whose version overrides have no version_prefix, which is nearly every package. In that case every candidate resolves to the root prefix, so there is nothing to disambiguate and the ambiguity pass is skipped.

Also:

  • the ambiguous-prefix error now ends "no exact release tag matched", which is accurate for HTTP packages that never have a tag
  • the ambiguity unit test is split from the known-tag test so each name describes what it asserts
  • the e2e ambiguity case runs mise lock directly through assert_contains instead of echo '$output' with || true

Behavior is otherwise unchanged. Validated with the 123 aqua backend unit tests and test_lockfile_aqua_version_prefix_override.

🤖 Generated with Claude Code

AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: unavailable.


Note

Low Risk
Targeted lock-path optimization and clearer errors; ambiguity rejection is unchanged for packages that actually use override prefixes.

Overview
lock_package_for_version now runs the multi-prefix ambiguity check only when there is no release tag and at least one version_override defines a version_prefix. Packages without override prefixes skip the per-candidate pkg.clone() pass because every candidate shares the same root prefix—behavior stays the same, with less work on the common path.

The ambiguous-prefix error text now says "no exact release tag matched" (better for HTTP packages with no tags). Unit coverage splits the “known tag resolves” case from reject ambiguous prefixes without a tag; the lockfile e2e asserts the ambiguity message by running mise lock directly and notes that an unresolvable platform is reported while mise lock still exits 0.

Reviewed by Cursor Bugbot for commit 28adc57. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • Version-prefix ambiguity is now reported only when no exact release match is found, avoiding ambiguity reports when an exact version is available.
    • Locking now completes successfully when a platform cannot be resolved; that platform is reported and skipped.

nettlesh and others added 3 commits October 9, 2026 01:45
Avoid cloning the package per candidate when no version override sets a
version_prefix, split the ambiguity unit test from the known-tag test,
tighten the error text, and simplify the e2e ambiguity assertion.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Entire-Checkpoint: 01M4G6X1ZQAGAFT759VTJYFF4T
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d8abd8ab-bd6c-4a91-87f2-dd42dd676d40

📥 Commits

Reviewing files that changed from the base of the PR and between 1e8000f and 28adc57.


You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3b6de473-8b33-46e6-9b5e-c56cff9190bf

📥 Commits

Reviewing files that changed from the base of the PR and between 60a22f7 and 1e8000f.


📒 Files selected for processing (2)
  • e2e/lockfile/test_lockfile_aqua_version_prefix_override
  • src/backend/aqua.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.



📝 Walkthrough

Walkthrough

Aqua lockfile resolution now checks version-prefix ambiguity only when a version override defines a prefix and no exact release tag is resolved. Unit and end-to-end tests cover the resolution behavior.

Changes

Aqua lockfile resolution

Layer / File(s) Summary
Version-prefix ambiguity detection
src/backend/aqua.rs
The resolver checks for ambiguous prefixes only when no exact release tag is resolved and a version override defines a prefix. The ambiguity error wording also changes.
Resolution test coverage
src/backend/aqua.rs, e2e/lockfile/test_lockfile_aqua_version_prefix_override
Unit tests separate known-tag resolution from no-tag ambiguity checks. The end-to-end test invokes mise lock directly and checks the reported output.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: nettlesh, jambalaya56562


Merge Risk: ⚪ Minimal · up to 1e800

No actionable merge-blocking risk is identified. Run the e2e test as part of normal validation.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (1 skipped: 1 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: skipping the Aqua prefix ambiguity check when no override prefixes exist.


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 134c2c9. Configure here.

Comment thread e2e/lockfile/test_lockfile_aqua_version_prefix_override
jdx and others added 2 commits October 9, 2026 11:41
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Entire-Checkpoint: 01M4G7FSS9W3EFPFAH6WAM7ESE
# Conflicts:
#	e2e/lockfile/test_lockfile_aqua_version_prefix_override
#	src/backend/aqua.rs
@jdx
jdx changed the base branch from pr-14218-head to main October 9, 2026 11:47
@jdx
jdx enabled auto-merge (squash) October 9, 2026 11:54
@jdx
jdx merged commit aa9a27e into main Oct 9, 2026
46 of 47 checks passed
@jdx
jdx deleted the claude/aqua-lock-prefix-followup branch October 9, 2026 12:45
jdx pushed a commit that referenced this pull request Oct 9, 2026
<!-- entire-trail-link-start -->
https://entire.io/gh/jdx/mise/trails/613
<!-- entire-trail-link-end -->

### 🚀 Features

- **(upgrade)** add tool_update.global_auto to update every global tool
by @jdx in [#14237](#14237)
- reuse downloads the server confirms are unchanged by @jdx in
[#14222](#14222)

### 🐛 Bug Fixes

- **(backend)** stop list() and get() panicking while the tool map
reloads by @jdx in [#14240](#14240)
- **(bootstrap)** stop reporting freshly cloned repos as dirty with
core.autocrlf by @jdx in
[#14225](#14225)
- **(cargo)** lock the same rust homes the rust plugin resolves by
@wislertt in [#14219](#14219)
- **(doctor)** show dotfiles repo and origin when history is disabled by
@jdx in [#14244](#14244)
- **(dotfiles)** replace a junction target when a symlink source changes
by @jdx in [#14226](#14226)
- **(env)** keep backslashes literal in single-quoted dotenv values by
@jdx in [#14228](#14228)
- **(env)** join adjacent quoted and unquoted dotenv value parts again
by @jdx in [#14231](#14231)
- **(history)** describe tracked variant changes by @oppegard in
[#14194](#14194)
- **(lock)** apply aqua version prefixes before selecting overrides by
@nettlesh in [#14218](#14218)
- **(rust)** treat rustup profile aliases like their full names by
@JamBalaya56562 in [#14220](#14220)
- **(schema)** accept task references in a task array by @JamBalaya56562
in [#14229](#14229)
- **(self-update)** keep showing the auto-update hint until it is
disabled by @jdx in [#14233](#14233)

### 🚜 Refactor

- **(lock)** skip aqua prefix ambiguity pass without override prefixes
by @jdx in [#14232](#14232)

### 📚 Documentation

- explain auto_update's release delay and prefer mise settings KEY=VALUE
by @jdx in [#14235](#14235)

### New Contributors

- @wislertt made their first contribution in
[#14219](#14219)
- @oppegard made their first contribution in
[#14194](#14194)
@github-actions

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▄▄▅▄▁▄▅▅█ 27,935,022 → 27,991,109 +0.20% 19.19 → 19.08ms -0.61%
hook-env ▇▇▇▇▁▇▇█▇ 30,034,510 → 30,009,956 -0.08% 20.80 → 20.58ms -1.05%
ls ▅▃▆▆▁▄▅▅█ 32,136,304 → 32,209,358 +0.23% 21.13 → 21.61ms +2.28%
registry ▂▃▃▃▁▃▃▂█ 40,219,296 → 40,306,132 +0.22% 17.70 → 17.98ms +1.63%
startup ▅█▇▄▁▅▄▄▆ 11,076,662 → 11,091,647 +0.14% 12.37 → 12.30ms -0.55%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

28adc57e0328 vs 2ee2128c304a · measured on the runner, not pushed to the history.

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.

2 participants