Skip to content

fix(cli): use next dist-tag for self-update when on a prerelease version#1215

Merged
christso merged 2 commits intomainfrom
fix/self-update-next-channel
May 5, 2026
Merged

fix(cli): use next dist-tag for self-update when on a prerelease version#1215
christso merged 2 commits intomainfrom
fix/self-update-next-channel

Conversation

@christso
Copy link
Copy Markdown
Collaborator

@christso christso commented May 5, 2026

Summary

  • When the installed version has a prerelease identifier (e.g. 4.25.3-next.1), agentv self update now queries the next npm dist-tag instead of latest
  • The background update-check notice (getUpdateNotice) uses the same dist-tag logic so it never suggests a downgrade in the startup banner
  • performSelfUpdate() auto-detects the correct dist-tag from currentVersion when no explicit versionRange is passed

Root cause

NPM_REGISTRY_URL was hardcoded to .../agentv/latest in both self-update.ts and update-check.ts. On a next prerelease, fetching latest returns an older stable release, which the command then offered to install as an "update".

Test plan

  • All 2321 existing unit tests pass
  • getDistTagForVersion('4.25.3-next.1')'next'
  • getDistTagForVersion('4.25.1')'latest'
  • Pre-push hook (build, typecheck, lint, validate:examples) passes

🤖 Generated with Claude Code

christso and others added 2 commits May 5, 2026 02:33
When the installed version has a prerelease identifier (e.g. 4.25.3-next.1),
the update check and self-update command now query the `next` npm dist-tag
instead of `latest`. This prevents suggesting or applying a downgrade to the
older stable release.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: dc4e055
Status: ✅  Deploy successful!
Preview URL: https://fafe8e02.agentv.pages.dev
Branch Preview URL: https://fix-self-update-next-channel.agentv.pages.dev

View logs

@christso christso merged commit 9aa0194 into main May 5, 2026
4 checks passed
@christso christso deleted the fix/self-update-next-channel branch May 5, 2026 01:07
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