fix: remove archive format bias from asset scoring#1
Draft
sgargel wants to merge 1 commit into
Draft
Conversation
The +2 score bonus for archive formats (.tar.gz, .zip, etc.) was intended to prefer "full releases" over raw binaries, but in practice it causes the wrong asset to be picked when a project publishes both a raw binary and an archive of the same binary. Example: if a release has both `tool_linux_amd64` and `tool_linux_amd64.tar.gz`, both score +10 (OS) +5 (arch) = 15, and the archive wins by +2. But the archive often contains exactly the same binary — the format preference adds no value and introduces unintended bias. OS+arch match is the correct signal for asset selection. Format should be irrelevant when both assets target the same platform. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
score_asset gives a +2 bonus to archive formats (.tar.gz, .zip, etc.) based on the assumption that "archives contain the full release".
Why this is wrong
The bonus introduces unjustified bias. Consider a project that publishes both:
tool_linux_amd64 → score: +10 (OS) +5 (arch) = 15
tool_linux_amd64.tar.gz → score: +10 (OS) +5 (arch) +2 (archive) = 17 ← wins
The archive wins not because it's a better match for the platform, but simply because it's an archive. In many cases both assets contain
exactly the same binary — the archive is just an alternative distribution format.
Cases where the bonus might seem useful:
find_binary only looks for the executable.
Cases where the bonus is harmful:
wins, adding unnecessary extraction complexity.
Fix
Remove the three lines. The correct signal for asset selection is OS + arch; format is irrelevant when both assets target the same platform.
Open for discussion — do not merge
Left as a draft until we decide whether there is a real use case that justifies the archive preference. If one exists, it should be an
explicit rule, not a silent +2 bias.