Skip to content

fix: treat v-prefixed tags as numeric in digest dedup specificity#82

Open
Abhineshhh wants to merge 1 commit into
microsoft:mainfrom
Abhineshhh:fix/tag-specificity-vprefix
Open

fix: treat v-prefixed tags as numeric in digest dedup specificity#82
Abhineshhh wants to merge 1 commit into
microsoft:mainfrom
Abhineshhh:fix/tag-specificity-vprefix

Conversation

@Abhineshhh

@Abhineshhh Abhineshhh commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description tagSpecificity (used by digest dedup) only awarded a numeric bonus when the tag started with a digit, so 9.0 outranked v10.0 as the primary recommendation. Align with version-aware tag sorting (#68). ## Related Issue Fixes #75 ## Changes - Skip optional v/V prefix when followed by a digit before scoring - Regression tests for specificity and DeduplicateByDigest ## Checklist - [x] task lint passes locally - [x] task test passes locally - [x] Documentation updated (if applicable)


Stacking

Independent of the Trivy/registry stacks — can merge in any order relative to them.

tagSpecificity only awarded a numeric bonus when the tag started with a
digit, so 9.0 outranked v10.0 when choosing a primary digest tag.
Skip an optional v/V prefix (when followed by a digit), matching
version-aware tag sorting.

Fixes microsoft#75
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.

[Bug]: tagSpecificity ignores v-prefix so digest dedup can prefer older tags

1 participant