Skip to content

fix(backend): preserve Windows ZIP preference - #12200

Merged
jdx merged 1 commit into
jdx:mainfrom
risu729:cursor/windows-zip-archive-score-3015
Aug 20, 2026
Merged

jdx merged 1 commit into
jdx:mainfrom
risu729:cursor/windows-zip-archive-score-3015

Conversation

@risu729

@risu729 risu729 commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep Windows ZIP's score strictly above every tar archive format
  • retain tar.zst > tar.xz > other tarball ordering below ZIP
  • test both the raw score relationship and final asset selection

What was wrong in #12156

#12156 raised TarZst to score 15, equal to the existing Windows ZIP score. ZIP then won only incidentally through the shortest-name tiebreak, so the change did not actually retain the documented Windows ZIP preference.

This restores a strict ordering: Windows ZIP at 15, then tar.zst / tar.xz / other tarballs at 12 / 11 / 10. The regression test checks the scores directly and verifies ZIP is selected over both tar.zst and tar.xz.

The companion draft #12199 handles the residual bzip shorthand and checksum-stem gaps in #12156 and adds the missing Elide-style preferred-name integration coverage.

Tests

  • cargo test --bin mise backend::asset_matcher
  • cargo clippy --bin mise --all-features --tests -- -D warnings

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

jdx#12156 scored TarZst at 15, tying Windows ZIP, so zip only won through the
shortest-name tiebreak. Rank tar.zst > tar.xz > other tarballs below ZIP.

Co-authored-by: Taku Kodama <risu729@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

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: Pro Plus

Run ID: 6c1b4bde-afc7-4ab9-9f9f-627fc2b832cf

📥 Commits

Reviewing files that changed from the base of the PR and between 8c19a41 and 0538062.

📒 Files selected for processing (1)
  • src/backend/asset_matcher.rs

Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

The archive matcher now ranks Windows ZIP files above tar.zst and tar.xz files. Tests verify the score ordering and selection behavior when all three formats are available.

Changes

Archive scoring

Layer / File(s) Summary
Update archive scores and validation
src/backend/asset_matcher.rs
Windows ZIP retains a score of 15. tar.zst and tar.xz scores change to 12 and 11. Tests verify the ranking and selection order.

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

Merge Risk: ⚪ Minimal · up to 05380

This localized change preserves Windows ZIP preference and adds regression coverage; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: jdx

Poem

I’m a rabbit with archives to sort,
ZIP hops first in the scoring court.
tar.zst follows, tar.xz near,
Tests make the ranking clear.
One neat burrow, no confusion here.

🚥 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 identifies the backend fix that preserves Windows ZIP as the preferred archive format.

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.

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR restores a strict Windows ZIP preference while retaining the intended ordering among tar archive formats.

  • Keeps Windows ZIP at score 15.
  • Adjusts tar.zst, tar.xz, and other tarball scores to 12, 11, and 10.
  • Adds regression coverage for both score relationships and final asset selection.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The revised scores preserve existing archive-format ordering outside Windows, make the Windows ZIP preference strict rather than dependent on a tiebreaker, and add coverage for both scoring and final selection.

Important Files Changed

Filename Overview
src/backend/asset_matcher.rs Correctly establishes Windows ZIP above all tar formats while preserving tar.zst > tar.xz > other tarballs, with focused regression tests.

Reviews (1): Last reviewed commit: "fix(backend): keep windows zip strictly ..." | Re-trigger Greptile

@risu729
risu729 marked this pull request as ready for review August 20, 2026 10:07
@jdx
jdx merged commit 36b3125 into jdx:main Aug 20, 2026
30 checks passed
@risu729
risu729 deleted the cursor/windows-zip-archive-score-3015 branch August 21, 2026 16:17
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.

3 participants