Skip to content

fix(release): retry npm rate limits#44

Merged
CreatorGhost merged 1 commit into
devfrom
npm-publish-retry
Jul 14, 2026
Merged

fix(release): retry npm rate limits#44
CreatorGhost merged 1 commit into
devfrom
npm-publish-retry

Conversation

@CreatorGhost

@CreatorGhost CreatorGhost commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Adds bounded retry/backoff to npm package publishing when the registry returns E429. This lets the multi-platform release resume after npm throttles package creation.

  • Retries only E429 responses
  • Up to 5 attempts with 60s incremental backoff
  • Other errors fail immediately
  • Existing idempotent checks skip packages already published by partial runs

Verification

  • bun typecheck in packages/opencode
  • Full pre-commit workspace typecheck: 30/30 successful

Context

The v1.0.1 npm publish partially succeeded but npm rate-limited at dcode-ai-windows-x64. GitHub Release v1.0.1 succeeded and is already public.

Summary by CodeRabbit

  • Bug Fixes
    • Improved package publishing reliability by automatically retrying when npm rate limits are encountered.
    • Added increasing delays between retry attempts to help publishing complete successfully.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1a9995b1-0132-461d-8077-829208ff2799

📥 Commits

Reviewing files that changed from the base of the PR and between a9644a2 and fbd42d8.

📒 Files selected for processing (1)
  • packages/opencode/script/publish.ts

📝 Walkthrough

Walkthrough

The npm publishing helper now retries rate-limited npm publish commands up to five times, waits with attempt-based delays between retries, and immediately fails for non-rate-limit errors.

Changes

NPM publish retry handling

Layer / File(s) Summary
Publish retry loop
packages/opencode/script/publish.ts
publish() captures npm output, retries E429 failures up to five attempts with increasing delays, and throws on non-retryable or exhausted failures.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: opencode-agent[bot], thdxr

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description has summary and verification, but it omits the required issue, type-of-change, and checklist sections from the template. Add the missing template sections: Issue for this PR, Type of change, What does this PR do?, and the checklist; include screenshots if relevant.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding retry logic for npm publish rate limits.
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 npm-publish-retry

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

@CreatorGhost CreatorGhost merged commit f572c91 into dev Jul 14, 2026
7 of 11 checks passed
@CreatorGhost CreatorGhost deleted the npm-publish-retry branch July 14, 2026 04:04
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