[AAASM-3840] 🐛 (release): Fix npm latest dist-tag policy#207
Conversation
Pre-releases publish to channel dist-tags (alpha/beta/rc) and never advance `latest`, so a bare `npm install @agent-assembly/sdk` resolved to an ancient alpha. Add a publish step that re-points `latest` at the highest SemVer version on npm after every real publish, in both publish modes. Refs AAASM-3840 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WbVLjc1fAoDEFuVWDRsPts
Refs AAASM-3840 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WbVLjc1fAoDEFuVWDRsPts
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
✅ Review — AAASM-3840 (Claude Code)1. CI: green — 18 pass, 0 fail (build, test 18/20/22/24, napi-build, module-smoke, CodeQL, audit); actionlint clean. Verdict: approve & merge (then do the one-time manual dist-tag move). 🤖 Generated with Claude Code |
✅ Re-review confirmed (Claude Code)1. CI: re-verified green — 18 pass, 0 fail. 2. Scope (AAASM-3840): complete — 🤖 Generated with Claude Code |



Target
Task summary:
Fix the stale npm
latestdist-tag for@agent-assembly/sdk. Pre-releases publish only to channel dist-tags (alpha/beta/rc) and never advancelatest, solatestwas frozen at an ancient0.0.1-alpha.3and a barenpm install @agent-assembly/sdkresolved to it instead of the newest pre-release.Task tickets:
.claude/skills+ existing release runbooks (kept out of scope here).Key point change (optional):
release-node.ymlgains alatest-management step that runs after the main SDK publish (bothallandmain-onlymodes, gated ondry_run). It re-pointslatestat the highest SemVer version currently on npm across all channels (alpha < beta < rc < GA), so the rule is self-correcting and monotonic — it tracks the newest GA once one exists, tracks the newest pre-release until then, and never regresses to an older build.One-time manual ops still required (owner action — needs an npm token, NOT done in this PR): the workflow only advances
lateston the next publish, so the currently-stale tag must be corrected once by hand:Effecting Scope
No source/runtime code,
package.json, or lockfile touched — strictly the release workflow plus one new doc.Description
.github/workflows/release-node.yml: add "Updatelatestdist-tag to newest published version" step after the main SDK publish; documented policy in a comment block.docs/release/npm-dist-tags.md(new): channel-tag table, thelatestpolicy, and the one-time manual correction command.How to verify: review the new step's SemVer-max logic; on the next real (non-dry-run) publish it will move
latestto the highest version on npm.actionlint 1.7.12passes clean on the workflow.Closes AAASM-3840
🤖 Generated with Claude Code