Skip to content

feat!: add partial version selector resolution - #200

Merged
chawyehsu merged 9 commits into
mainfrom
push-sxzqsmxmymzt
Aug 10, 2026
Merged

feat!: add partial version selector resolution#200
chawyehsu merged 9 commits into
mainfrom
push-sxzqsmxmymzt

Conversation

@chawyehsu

@chawyehsu chawyehsu commented Aug 10, 2026

Copy link
Copy Markdown
Owner

An improved design to address #189 , replace and close #190

This would be a BRAKING CHANGE, as it will surprise users that 0.10.0 can now be resolved to a concrete release.

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.01980% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.57%. Comparing base (4ff0da9) to head (a31eb5f).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/cli/install.rs 83.33% 1 Missing ⚠️
src/toolchain/index.rs 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #200      +/-   ##
==========================================
+ Coverage   87.11%   87.57%   +0.45%     
==========================================
  Files          25       26       +1     
  Lines        1677     1771      +94     
==========================================
+ Hits         1461     1551      +90     
- Misses        216      220       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
@chawyehsu chawyehsu changed the title feat: add partial version selector resolution feat!: add partial version selector resolution Aug 10, 2026
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
@chawyehsu
chawyehsu marked this pull request as ready for review August 10, 2026 10:35
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@chawyehsu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f6e20a3-47da-44b8-a7c7-977255f84897

📥 Commits

Reviewing files that changed from the base of the PR and between 667db91 and a31eb5f.

📒 Files selected for processing (6)
  • .agents/handoff/issue-189-incomplete-version-selector.md
  • src/cli/install.rs
  • src/cli/update.rs
  • src/toolchain/atomic.rs
  • src/toolchain/index.rs
  • tests/integration/atomic.rs

Summary by CodeRabbit

  • New Features

    • Incomplete stable version selectors now resolve to the newest compatible release.
    • Exact versions and build-qualified selectors continue to resolve precisely.
    • Installation records retain both the requested selector and the resolved release.
  • User Experience

    • Installation output displays the requested and resolved versions when they differ.
    • Invalid or unsupported selectors are rejected without altering existing nightly behavior.
  • Documentation

    • Added guidance describing selector resolution rules, installation identity, and deferred selector features.

Walkthrough

Changes

The install flow now resolves incomplete stable version selectors to concrete releases. InstallRecipe stores both the effective release specification and the original request. Installation output reports the resolution.

Stable selector installation

Layer / File(s) Summary
Selector contract and resolver
.agents/adr/..., .agents/handoff/..., CONTEXT.md, src/toolchain/version.rs, src/toolchain/mod.rs
Documents numeric selector formats and adds stable selector validation and release resolution. Tests cover prefix matching, exact precedence, build fallback, and invalid input.
Recipe identity and metadata
src/toolchain/index.rs, src/toolchain/atomic.rs, tests/integration/*
InstallRecipe.spec now contains the concrete installation version. requested_spec preserves the original request. Integration fixtures include the new field.
Install command output
src/cli/install.rs
The command logs changed stable selectors and reports the resolved recipe specification.

Possibly related PRs

  • chawyehsu/moonup#196: Directly related through InstallRecipe, StagedRelease::into_recipe, and resolved toolchain specifications in the install flow.

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e00ad02-8a29-42f0-8b64-70938a5c1c67

📥 Commits

Reviewing files that changed from the base of the PR and between 4ff0da9 and 667db91.

📒 Files selected for processing (10)
  • .agents/adr/0003-incomplete-stable-version-selectors.md
  • .agents/handoff/issue-189-incomplete-version-selector.md
  • CONTEXT.md
  • src/cli/install.rs
  • src/toolchain/atomic.rs
  • src/toolchain/index.rs
  • src/toolchain/mod.rs
  • src/toolchain/version.rs
  • tests/integration/atomic.rs
  • tests/integration/package.rs

Comment thread .agents/handoff/issue-189-incomplete-version-selector.md Outdated
Comment thread src/toolchain/atomic.rs Outdated
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>

Copilot AI 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.

Pull request overview

Adds support for resolving incomplete numeric stable-version inputs (e.g. 0, 0.10, 0.10.1) into a concrete stable release during moonup install, while retaining the original user input for diagnostics.

Changes:

  • Introduces a stable-selector resolver (src/toolchain/version.rs) and wires it into install-recipe construction.
  • Extends InstallRecipe to carry both the effective install identity (spec) and the original user request (requested_spec).
  • Updates install flow, atomic recovery recipe construction, tests, and glossary/agent docs to reflect the new selector semantics.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/integration/package.rs Updates recipe construction in integration tests to include requested_spec.
tests/integration/atomic.rs Adds coverage ensuring recovery recipes preserve requested_spec while using a concrete effective spec.
src/toolchain/version.rs New stable-selector detection + resolution logic with unit tests.
src/toolchain/mod.rs Exposes the new toolchain::version module.
src/toolchain/index.rs Adds requested_spec to InstallRecipe and resolves stable selectors during recipe building.
src/toolchain/atomic.rs Ensures recovery recipe construction uses a concrete spec when the request was a stable selector.
src/cli/install.rs Logs selector resolution and prints/install using the effective concrete spec.
CONTEXT.md Adds glossary entries for “Version selector” and “Resolved release” and updates examples.
.agents/handoff/issue-189-incomplete-version-selector.md Handoff documenting the agreed contract and implementation seams for issue #189.
.agents/adr/0003-incomplete-stable-version-selectors.md ADR capturing rationale/constraints for selector resolution and identity semantics.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/cli/install.rs
Comment thread src/toolchain/index.rs Outdated
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
@chawyehsu
chawyehsu merged commit 9ab4ef0 into main Aug 10, 2026
10 checks passed
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.

Make error and action clear when moonup install <specific-version> fails

2 participants