Skip to content

fix(release): point latest dist-tag at the newest published version - #28

Merged
aetosdios27 merged 2 commits into
mainfrom
fix/release-point-latest-at-newest
Aug 6, 2026
Merged

aetosdios27 merged 2 commits into
mainfrom
fix/release-point-latest-at-newest

Conversation

@aetosdios27

@aetosdios27 aetosdios27 commented Aug 6, 2026 •

Copy link
Copy Markdown
Owner

What

Changes the Release publisher so each publication repoints the latest dist-tag at the just-published 0.1.0-alpha.N version (and waits for it to converge), instead of the old behavior that failed if latest moved (keeping it pinned at a stale 0.1.0-alpha.4).

Why

The npm package pages and tagless installs were misleading: they showed latest = 0.1.0-alpha.4 while the newest published build was 0.1.0-alpha.9. Now latest always reflects the current build.

Changes

  • scripts/publish-alpha-packages.mjs: publish to alpha, wait for convergence, then npm dist-tag add <pkg>@<v> latest and wait for that to converge. Removed the assertPublishedAtAlpha 'latest must not move' guard.
  • scripts/publish-alpha-packages.d.mts: added setDistTag to PackageRegistry.
  • tests/release/publish-packages.test.ts: updated to assert latest is repointed and converges.
  • tests/release/package-manifests.test.ts, RELEASING.md, plan doc: wording updated.

Verification: bun run typecheck, bun run test (295 passed), bun run release:check all green.

Summary by CodeRabbit

  • Release Process

    • Publishing now updates the latest tag to the newest alpha version.
    • Releases verify that both alpha and latest tags point to the expected version.
    • Existing package versions still receive necessary tag updates without republishing their contents.
    • Publishing retries tag updates and stops subsequent releases if convergence fails.
  • Documentation

    • Updated release guidance and validation requirements to reflect the new latest tag behavior.

Replace the publisher's 'protect latest' behavior so each publish repoints
the latest dist-tag at the just-published version and waits for it to
converge. This keeps the npm package pages and tagless installs reflecting
the current 0.1.0-alpha.N build instead of a stale pinned alpha.
@coderabbitai

coderabbitai Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@aetosdios27, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 430d6075-e95e-459c-bfcb-9888c8c1c8ed

📥 Commits

Reviewing files that changed from the base of the PR and between f89b72a and c9eebe3.

📒 Files selected for processing (1)
  • RELEASING.md
📝 Walkthrough

Walkthrough

The alpha publisher now assigns latest to each published or existing alpha version. It waits for both alpha and latest tags to converge. Documentation, registry contracts, and release tests now describe and verify this behavior.

Changes

Alpha latest tag flow

Layer / File(s) Summary
Release contract and documentation
docs/superpowers/plans/..., RELEASING.md, scripts/publish-alpha-packages.d.mts
Release instructions require repointing latest. PackageRegistry now exposes setDistTag.
Publisher tag convergence
scripts/publish-alpha-packages.mjs
The publisher verifies alpha, assigns latest, and polls both tags until they match the expected version. Existing versions still receive tag updates without tarball publication.
Publisher behavior validation
tests/release/publish-packages.test.ts, tests/release/package-manifests.test.ts
Tests cover tag assignment, retries, existing versions, convergence failures, update ordering, registry mocks, and documentation wording.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant AlphaPublisher
  participant PackageRegistry
  participant NpmRegistry
  AlphaPublisher->>PackageRegistry: Publish missing alpha package version
  AlphaPublisher->>PackageRegistry: Wait for alpha tag convergence
  AlphaPublisher->>PackageRegistry: Set latest tag
  PackageRegistry->>NpmRegistry: Update latest tag
  AlphaPublisher->>PackageRegistry: Wait for latest tag convergence
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: repointing the npm latest dist-tag to the newest published version.
Description check ✅ Passed The description clearly covers the change, rationale, implementation, affected tests, documentation, and verification results.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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/release-point-latest-at-newest

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 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@RELEASING.md`:
- Line 193: Update the manual release fallback instructions in RELEASING.md to
include the complete alpha-then-latest sequence: publish with the alpha tag,
verify alpha convergence, explicitly repoint latest using npm dist-tag add for
the published package version, and wait until latest converges. Match the
existing publisher workflow’s verification behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a218445-ff10-4828-863c-a4fd167b973a

📥 Commits

Reviewing files that changed from the base of the PR and between 88cdd50 and f89b72a.

📒 Files selected for processing (6)
  • RELEASING.md
  • docs/superpowers/plans/2026-08-01-medium-import-alpha-release.md
  • scripts/publish-alpha-packages.d.mts
  • scripts/publish-alpha-packages.mjs
  • tests/release/package-manifests.test.ts
  • tests/release/publish-packages.test.ts

Comment thread RELEASING.md Resolved
@aetosdios27
aetosdios27 merged commit 02ce6f4 into main Aug 6, 2026
7 checks passed
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