Skip to content

Centralize latest version selection - #69

Merged
andrew merged 2 commits into
mainfrom
codex/yul-dedup
Aug 17, 2026
Merged

Centralize latest version selection#69
andrew merged 2 commits into
mainfrom
codex/yul-dedup

Conversation

@andrew

@andrew andrew commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Adds a shared latest-version selector used by the single and bulk helpers. Registry-advertised versions take precedence; otherwise inactive releases are filtered and candidates are ordered by publication time with ecosystem version ordering as the fallback.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR centralizes “latest version” selection into a shared policy function so single-version and bulk helpers behave consistently across registries, prioritizing registry-advertised “latest” when available and otherwise choosing the most recent active release.

Changes:

  • Implement shared SelectLatestVersion policy and route FetchLatestVersion through it (including advertised-latest precedence and timestamp/version-order fallback).
  • Add unit tests covering advertised-latest behavior, active filtering, timestamp ordering, and ecosystem version ordering.
  • Update public API wrappers and README usage examples to reflect the new policy.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
registries.go Updates exported wrapper docs and adds an exported SelectLatestVersion wrapper.
internal/core/helpers.go Introduces shared latest-version selection logic and updates FetchLatestVersion to use advertised-latest + fallback policy.
internal/core/helpers_test.go Adds focused tests for the new selection policy and FetchLatestVersion behavior.
README.md Updates examples to describe/use the shared latest-version policy.
go.mod Promotes github.com/git-pkgs/vers to a direct dependency.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread README.md Outdated
Comment thread internal/core/helpers.go
@andrew
andrew merged commit 3339542 into main Aug 17, 2026
5 checks passed
@andrew
andrew deleted the codex/yul-dedup branch August 17, 2026 10:25
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