Skip to content

fix: compute latest from stable releases only - #8

Merged
oglassdev merged 2 commits into
mainfrom
fix/latest-stable-only
Oct 5, 2026
Merged

oglassdev merged 2 commits into
mainfrom
fix/latest-stable-only

Conversation

@oglassdev

@oglassdev oglassdev commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

index.json sets window's latest to the nightly 0.1.0-nightly.20261003.g9872875840f7, so rpp search advertises a prerelease as the version to use. rpp add <name> never reads latest and never picks prereleases, so the two disagree.

Fix

  • scripts/registry.py index now sets latest to the newest non-yanked stable version, meaning one with no - prerelease suffix.
  • A plugin with no stable version is left out of index.json, the same way a fully yanked plugin already is. The shipped rpp CLI deserializes index.json as Vec<SearchHit> with latest: semver::Version (crates/rpp-fetch/src/registry/index.rs). A null or missing latest would fail to parse the whole file and break rpp search for every plugin. A prerelease latest would contradict rpp add <name>, which selects with VersionReq::STAR, and that never matches prereleases. Omitting the plugin works with the current CLI.
  • index.json is regenerated. window only has prereleases (0.1.0-alpha.0 and two nightlies), so it drops out of index.json until its first stable release. plugins/window.json is unchanged, and rpp add window@<prerelease> still works.
  • Tests cover stable-only latest, prerelease-only plugins, and semver ordering across -alpha, -beta, old -nightly.YYYYMMDD.g<sha12> nightlies, new -nightly.YYYYMMDDHHMMSS.g<sha12> nightlies, -rc, and the release. They also check that a new-format nightly can be appended after old-format ones. The existing validation already accepts both nightly formats, so no validation change was needed.
  • New versions may be added anywhere in semver order instead of only appended. Under the shared release scheme a 0.1.0-beta.1 sorts below already-registered 0.1.0-nightly… versions, so append-only registration would have rejected it. Published versions remain immutable: they can't be removed, edited, reordered or un-yanked.
  • The README documents the latest rule and the prerelease version formats.

🤖 Generated with Claude Code

oglassdev

This comment was marked as low quality.

@oglassdev
oglassdev merged commit 0884c90 into main Oct 5, 2026
1 check passed
@oglassdev
oglassdev deleted the fix/latest-stable-only branch October 5, 2026 04:00
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.

1 participant