Address publish workflow review feedback#25
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bad57bf9ac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if npm view "${package_name}@${package_version}" version --json >/dev/null 2>&1; then | ||
| echo "exists=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "exists=false" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
Distinguish npm lookup failures from missing versions
The check npm package version step treats any npm view failure as exists=false, but non-zero exits can also come from transient/auth/registry errors (not only “version does not exist”). In those cases, the workflow will incorrectly proceed as if the version is unpublished, run pack/attest/upload, and then fail at publish (or lose rerun idempotency), which defeats the safety goal introduced by this change. Please only set exists=false for explicit not-found responses and fail the job for other npm view errors.
Useful? React with 👍 / 👎.
Summary
Verification