fix(release): keep npm channels monotonic - #3201
Conversation
Stable publication advances latest but cannot update next through trusted publishing. Require next to remain at or ahead of latest, and document the interactive owner step without adding a registry token to Actions. Use the full JSON representation for single-version registry metadata so Finalize does not fail with npm's 406 response to the abbreviated packument media type. Generated-by: Codex
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
PR Summary by QodoKeep npm release channels monotonic and fix metadata fetches
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
1. Missing next tag omitted
|
| echo "- version: \`$RELEASE_VERSION\`" | ||
| if [[ "$RELEASE_DIST_TAG" == "latest" ]]; then | ||
| echo | ||
| echo "Before finalizing this stable release, inspect npm dist-tags. If \`next\` is older than \`latest\`, authenticate interactively with npm and run:" |
There was a problem hiding this comment.
1. Missing next tag omitted 🐞 Bug ≡ Correctness
Fix-now: The Stage summary tells maintainers to advance next only when it is older than latest, omitting the absent-tag case that deterministically causes Finalize to fail. This contradicts both the validator and the newly added runbook instructions.
Agent Prompt
## Issue description
The generated stable-release guidance only instructs maintainers to update `next` when it is older than `latest`. Finalize also rejects a missing `next` tag, so the workflow summary must cover both conditions.
## Issue Context
The English and Chinese runbooks already use the correct “absent or older” wording. Reuse that wording rather than introducing new behavior, state, or configuration.
## Fix Focus Areas
- .github/workflows/release-cli-stage.yml[112-116]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
English
Summary
nextchannel to remain at or ahead oflatest, while preserving a newer prerelease when one already exists.Verification
npm run check:release— 28 tests passed.go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.7 .github/workflows/release-cli-stage.yml .github/workflows/release-cli-finalize.ymlgit diff --checkpassed.32123297725was fetched from the public registry and retained SHA-2569daa78ced074d00a32fad4d179cb0aa37d6c431bf4b53e188446c14cf29a6ae2.AI use
Select exactly one:
Tool(s) and scope: Codex implemented the release-channel validation, registry media-type fix, tests, and documentation under human direction and review.
Checklist
Does this PR entail a change in behavior?
简体中文
摘要
next不得落后于latest;如果next已指向更新的预发布版本,则保持不变。next时,由维护者进行交互式 dist-tag 操作,不向 Actions 添加长期 npm token。验证
npm run check:release:28 项测试通过。git diff --check通过。32123297725的原始 artifact 完成真实公共 registry 校验,SHA-256 仍为9daa78ced074d00a32fad4d179cb0aa37d6c431bf4b53e188446c14cf29a6ae2。AI 使用