Skip to content

fix(aqua): apply explicit package type overrides - #11901

Merged
jdx merged 1 commit into
jdx:mainfrom
Marukome0743:pr11901
Aug 11, 2026
Merged

jdx merged 1 commit into
jdx:mainfrom
Marukome0743:pr11901

Conversation

@Marukome0743

@Marukome0743 Marukome0743 commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Preserve whether an Aqua package type was omitted or explicitly set.
  • Apply explicit github_release values from version and platform overrides.
  • Keep omitted top-level types defaulting to github_release at runtime.

Root cause

Aqua registry #58400 changed newer Claude Code releases from the top-level http package definition to an explicit github_release version override. mise deserialized both an omitted type and an explicit github_release as the same default enum value, then deliberately skipped that value while merging overrides. As a result, PR #11898 retained the parent HTTP behavior and failed with:

Failed to install aqua:anthropics/claude-code@latest: builder error: relative URL without a base

Changes

  • Store Aqua package types as optional so inheritance and explicit overrides remain distinguishable.
  • Route download, format, asset, validation, and version resolution decisions through one effective package-type accessor.
  • Apply the same inheritance rule to version and platform overrides.
  • Bump the compiled Aqua registry cache format from v7 to v8 so old archives are not reused.
  • Add regression coverage for omitted and explicit types, both override forms, the reverse github_release to http transition, Claude Code-like assets, and compiled-cache round trips.

Verification

  • mise exec -- cargo test -p aqua-registry (128 passed)
  • mise exec -- cargo test --all-features --bin mise backend::aqua (74 passed)
  • mise exec -- cargo check --all-features
  • mise exec -- cargo clippy --workspace --all-features --all-targets -- -D warnings
  • mise exec -- cargo fmt --all -- --check
  • Installed claude@2.1.226 from the current Aqua registry in an isolated data directory and verified claude --version returned 2.1.226 (Claude Code).

mise run lint could not start locally because its hk wrapper requires a Git metadata directory while this working copy is Sapling-native; the underlying Rust formatting and Clippy checks above passed.

AI-assisted — Tool: Codex; model: OpenAI/GPT-5; version: unavailable.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Aqua package types are now optional. Omitted types resolve to GithubRelease. Override merging, compiled registry caches, installation logic, URL resolution, extraction, validation, and tests use the resolved package type.

Changes

Aqua package type fallback

Layer / File(s) Summary
Package type contract and overrides
crates/aqua-registry/src/types.rs
AquaPackage::type is optional. package_type() defaults omitted values to GithubRelease. Package logic and override merging use the resolved type. Tests cover HTTP, GitHub Release, platform overrides, and Windows extensions.
Compiled cache compatibility
crates/aqua-registry/src/cache.rs, crates/aqua-registry/src/compiled.rs
The compiled registry cache version changes from v7 to v8. Tests verify round-trip preservation of omitted and explicit package types.
Aqua backend integration
src/backend/aqua.rs
Backend operations use package_type() for URL selection, lock resolution, extraction, installation, validation, and operation counting. Test fixtures use optional package types.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • jdx/mise#11499: Both changes update Aqua installation and package resolution logic, but address different package metadata concerns.

Suggested reviewers: risu729, jambalaya56562, jdx

Poem

I’m a rabbit with packages neat,
Optional types now find their feet.
Omit the type? Release appears.
Caches and installers persevere.
Tests hop through each path with cheer.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 summarizes the main change: applying explicit Aqua package type overrides.

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.

@Marukome0743
Marukome0743 marked this pull request as ready for review August 11, 2026 16:27
@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR preserves the distinction between omitted and explicit Aqua package types so version and platform overrides can correctly switch download strategies.

  • Makes AquaPackage::type optional while retaining github_release as the effective runtime default.
  • Applies explicit package types during override merging and routes backend decisions through package_type().
  • Bumps the compiled registry cache version and adds regression coverage for parsing, overrides, and compiled-cache round trips.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or non-blocking defects identified.

The optional representation, override merge behavior, effective-type accessor usage, and cache-format bump remain consistent across the changed parsing, compiled-registry, and Aqua backend paths.

Important Files Changed

Filename Overview
crates/aqua-registry/src/types.rs Preserves omitted-versus-explicit package types, centralizes effective defaulting, and correctly applies explicit version and platform override values.
src/backend/aqua.rs Updates download, validation, extraction, checksum, and installation branches to consistently use the effective package type.
crates/aqua-registry/src/cache.rs Advances the compiled cache namespace to prevent reuse of archives created with the old AquaPackage layout.
crates/aqua-registry/src/compiled.rs Adds round-trip coverage proving compiled archives preserve omitted and explicit package-type states.

Reviews (1): Last reviewed commit: "fix(aqua): apply explicit package type o..." | Re-trigger Greptile

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