Skip to content

fix(v1.6): backport the bare-integer tag ranking fix from dev/v1.7 - #902

Merged
scttbnsn merged 1 commit into
dev/v1.6from
fix/v1.6-tag-ranking-downgrade
Aug 27, 2026
Merged

scttbnsn merged 1 commit into
dev/v1.6from
fix/v1.6-tag-ranking-downgrade

Conversation

@scttbnsn

@scttbnsn scttbnsn commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Backports ae77c069 (#871) from dev/v1.7, where it shipped in v1.7.0-rc.4.

Why this one

A bare integer tag like 168 coerces through semver.coerce() into a fake 168.0.0, which outranks a real dotted release like 1.43.3. On linuxserver/plex that meant the suggested-tag badge, and with a permissive dd.tag.include filter the actionable update candidate itself, could point at a destructive downgrade.

That is a user-harming bug, and v1.6 is where users sit until v1.7.0 GA, which is not imminent. Leaving it in a maintenance line we are about to GA is the wrong trade.

Why not #888 as well

757bfe18 (#888, prune store records for containers that leave watch scope) is the other fix that landed on dev/v1.7 after the backport branch was cut. It is deliberately not included: it is hygiene with no data loss and no wrong action taken, and it does not justify another RC on the v1.6.1 train. It ships in v1.7.0.

Contents

Cherry-pick applied clean to all six code files. The only conflict was CHANGELOG.md, where the entry had landed inside the already-shipped [1.6.1-rc.2] section. Resolved by restoring rc.2 to its released content and placing the new entry under [Unreleased], so no shipped section was rewritten.

Local: 303 tests pass across app/tag/ and the two watcher suites. Full pre-push gate green in 275s, coverage included.

Changelog

  • ✨ Added shared version-population utilities for safe stable-tag classification and selection.
  • ✨ Added regression coverage for bare integer tags, dotted releases, prereleases, CalVer tags, filtering, transformations, and tie-breaking.
  • 🔧 Changed tag suggestion and Docker candidate selection to use pickPreferredVersionTag.
  • 🐛 Fixed bare integer tags such as 168 incorrectly outranking releases such as 1.43.3.
  • 🐛 Fixed actionable candidates and digest comparisons that could suggest destructive downgrades.
  • 🗑️ Removed duplicated semver filtering and sorting logic.
  • 🔧 Preserved released 1.6.1-rc.2 changelog content and added the backport entry under [Unreleased].

Concerns

  • Confirm that all provider-specific tag-selection paths use the shared version-population utilities.
  • Verify pickPreferredVersionTag behavior for integer-only, prerelease-only, and transformed tag populations.
  • Confirm that the 303 targeted tests and full pre-push gate remain passing.

A bare integer tag (e.g. "168") coerces via semver.coerce() into a fake
"168.0.0", which could outrank a real dotted release like "1.43.3". For
linuxserver/plex that meant the suggested-tag badge and, with a permissive
dd.tag.include filter, the actionable update candidate itself could point
at a destructive downgrade.

Cherry-picked from ae77c06 (#871) on dev/v1.7, which shipped in
v1.7.0-rc.4. Backported because v1.6 is where users sit until v1.7.0 GA,
which is not imminent. The sibling post-backport-branch fix 757bfe1
(#888, store prune for out-of-scope containers) is deliberately NOT
backported: it is hygiene with no data loss or wrong action, and does not
justify another RC on the v1.6.1 train.

Fixes: #859
@scttbnsn

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@vercel

vercel Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drydock-website Ready Ready Preview Aug 27, 2026 12:54pm
drydockdemo-website Ready Ready Preview Aug 27, 2026 12:54pm

@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 002d9d3a-99d1-4b72-9ad5-b223e1771cec

📥 Commits

Reviewing files that changed from the base of the PR and between 494b826 and e0fa89b.

⛔ Files ignored due to path filters (1)
  • CHANGELOG.md is excluded by !CHANGELOG.md
📒 Files selected for processing (6)
  • app/tag/suggest.test.ts
  • app/tag/suggest.ts
  • app/tag/version-population.ts
  • app/watchers/providers/docker/image-comparison.test.ts
  • app/watchers/providers/docker/tag-candidates.test.ts
  • app/watchers/providers/docker/tag-candidates.ts

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

Added shared utilities to classify and rank version tags. Bare integer tags no longer outrank dotted versions when both exist. Tag suggestions and Docker fallback candidates use the shared selection rules. Ranking handles prereleases, coercion-lossy tags, build metadata, lexical ties, filtering, transformed tags, and integer-only pools. Added tests for tag suggestions, Docker candidate selection, and image comparison behavior.

Merge Risk: ⚪ Minimal · up to e0fa8

This change prevents bare integer tags from outranking dotted releases and producing downgrade recommendations while preserving existing filtering and fallback behavior. No actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/v1.6-tag-ranking-downgrade

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.

@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttbnsn

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@biggest-littlest biggest-littlest left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the backport is content-identical to ae77c06 on dev/v1.7 and that the CHANGELOG entry was moved out of the shipped 1.6.1-rc.2 section into Unreleased. Tag ranking tests pass. Approving.

@ALARGECOMPANY ALARGECOMPANY left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the backport is content-identical to ae77c06 on dev/v1.7 and that the CHANGELOG entry was moved out of the shipped 1.6.1-rc.2 section into Unreleased. Tag ranking tests pass. Approving.

@scttbnsn
scttbnsn merged commit 723a6e3 into dev/v1.6 Aug 27, 2026
33 checks passed
scttbnsn added a commit that referenced this pull request Aug 27, 2026
Promotes the Unreleased tag-ranking backport (#902) into a dated
1.6.1-rc.4 section, adds its compare link, and moves Unreleased to
compare against rc.4.

Bumps the candidate identity across the demo fixtures, website config,
quickstart, and the three API docs. Adds the rc.4 highlights block to the
README and the docs updates page, demoting rc.3 to a collapsed section.

Rolls RC_VERSION in release-identity, RC_VERSION/PREV_RC_VERSION in
release-docs-identity, and the changelog compare-link expectations.
RC_DATE is unchanged: rc.3 and rc.4 both cut on 2026-08-27.
@scttbnsn
scttbnsn deleted the fix/v1.6-tag-ranking-downgrade branch August 27, 2026 15:46

This branch was successfully deployed

2 active deployments
Preview – drydockdemo-website — e0fa89bd Deployed Aug 27, 2026 by vercel[bot]
Preview – drydock-website — e0fa89bd Deployed Aug 27, 2026 by vercel[bot]
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