ci: harden trusted npm publication - #2
Conversation
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe CI and publishing workflows pin npm 11.17.0, disable package-manager caching, tighten preflight integrity handling, verify registry checksums after publishing, and smoke-test the exact published package. Changesnpm publishing controls
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant PublishWorkflow
participant NpmRegistry
participant SmokeEnvironment
PublishWorkflow->>NpmRegistry: Fetch published dist metadata with retries
NpmRegistry-->>PublishWorkflow: Return shasum and integrity
PublishWorkflow->>PublishWorkflow: Compare registry values with local tarball values
PublishWorkflow->>SmokeEnvironment: Install mattermost-cli at the published version
SmokeEnvironment->>SmokeEnvironment: Run mm --version and mm --help
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/publish.yml:
- Around line 129-133: Update the npm view invocation in the publish retry loop
to include the --prefer-online option, ensuring each attempt fetches the package
state from the registry instead of using cached responses. Preserve the existing
retry, error suppression, and sleep behavior in the loop.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: f4a9ca86-88a1-4f76-9a2e-972c19924f10
📒 Files selected for processing (2)
.github/workflows/ci.yml.github/workflows/publish.yml
Summary\n\n- pin npm 11.17.0 for deterministic trusted publishing\n- correctly distinguish absent npm versions during immutable-version preflight\n- verify published SHA-1 and SHA-512 registry digests\n- smoke the exact launcher and native package from the public registry\n\n## Verification\n\n-
actionlint .github/workflows/*.yml\n-git diff --check\n- exercised the absent-version branch against npm\nSummary by CodeRabbit
Bug Fixes
Chores