Skip to content

test(cargo): align binstall fallback coverage - #10980

Merged
jdx merged 1 commit into
jdx:mainfrom
risu729:codex-20260714-213831-3a219d
Jul 14, 2026
Merged

jdx merged 1 commit into
jdx:mainfrom
risu729:codex-20260714-213831-3a219d

Conversation

@risu729

@risu729 risu729 commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • exercise cargo.binstall_only with eza, which has a prebuilt artifact
  • let cargo-show cover mise's exit-94 cargo install fallback
  • keep the custom registry integration coverage aligned with the new fallback ownership

Root cause

test_cargo_binstall_slow exported MISE_CARGO_BINSTALL_ONLY=1 for cargo-show. Since cargo-show has no prebuilt artifact and binstall-only now intentionally prohibits mise's compile fallback, the test asserted behavior that no longer matches the setting.

Validation

  • mise run test:e2e e2e/backend/test_cargo_binstall_slow
  • mise run lint-fix

Summary by CodeRabbit

  • Tests
    • Updated end-to-end coverage for installing and running the specified Cargo tool with MISE_CARGO_BINSTALL_ONLY=1.
    • The test continues to verify successful command output using the targeted eza version.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The cargo-binstall end-to-end test now sets MISE_CARGO_BINSTALL_ONLY=1 inline when invoking mise x cargo:eza@0.18.24, while continuing to verify the command output.

Changes

Cargo binstall verification

Layer / File(s) Summary
Inline binstall-only assertion
e2e/backend/test_cargo_binstall_slow
The test replaces the standalone environment export with an inline variable assignment for the mise x cargo:eza@0.18.24 -- eza -v invocation and retains the expected output check.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • jdx/mise#10926: Updates cargo-binstall fallback/“only” behavior and related end-to-end assertions.

Poem

A bunny sets the flag just so,
Then asks the cargo tool to go.
Eza speaks its version bright,
With binstall-only tucked in tight.
Hop, test, and all is right!

🚥 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 accurately reflects the test coverage adjustment around Cargo binstall fallback behavior.

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.

@risu729
risu729 marked this pull request as ready for review July 14, 2026 12:53
@greptile-apps

greptile-apps Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a test alignment issue where MISE_CARGO_BINSTALL_ONLY=1 was previously exported globally before the cargo-show section, but cargo-show has no prebuilt artifact, making it incompatible with binstall-only mode. The fix scopes MISE_CARGO_BINSTALL_ONLY=1 as an inline env var to the eza assertion (which does have a prebuilt artifact), and lets cargo-show exercise the binstall-exit-94 → cargo install fallback path instead.

  • eza@0.18.24 now runs under MISE_CARGO_BINSTALL_ONLY=1 inline, correctly verifying that tools with prebuilt artifacts are fetched without compilation.
  • cargo-show is installed under the global MISE_CARGO_BINSTALL=1 (no ONLY), so a missing binstall artifact will trigger mise's cargo install fallback — the behavior this section was already meant to cover.
  • The custom-registry block at the end is unaffected since MISE_CARGO_BINSTALL_ONLY is no longer leaked into that scope.

Confidence Score: 5/5

Single-file test change that correctly scopes an env var to the right assertion; no production code is affected.

The change is a small, well-reasoned test fix. Scoping MISE_CARGO_BINSTALL_ONLY=1 inline to the eza assert (a tool with prebuilt artifacts) and removing the global export prevents the env var from leaking into the cargo-show install, which has no prebuilt artifact and would have failed under binstall-only mode.

No files require special attention.

Important Files Changed

Filename Overview
e2e/backend/test_cargo_binstall_slow Moves MISE_CARGO_BINSTALL_ONLY=1 from an exported global to an inline env var on the eza assert, leaving cargo-show to exercise the binstall→cargo-install fallback path instead.

Reviews (1): Last reviewed commit: "test(cargo): align binstall fallback cov..." | Re-trigger Greptile

@jdx
jdx merged commit b6f1211 into jdx:main Jul 14, 2026
33 checks passed
@risu729
risu729 deleted the codex-20260714-213831-3a219d branch July 14, 2026 20:15
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