build(deps): add Dependabot cooldown to clear the pnpm age gate#342
Merged
Conversation
Dependabot writes new versions into the lockfile without honoring .npmrc, so CI failed on `pnpm install --frozen-lockfile` with ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION whenever a release was less than 24h old. Add a 2-day cooldown to the npm ecosystem. Cooldown is day-granular, so it must be strictly greater than minimum-release-age (1440 min = 1 day). Uses the build type deliberately: this is CI config with no user-facing change, so it must not cut a release. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since the pnpm migration,
.npmrcsetsminimum-release-age=1440(24h). pnpm enforces this against lockfile entries at install time, not only at resolution. Dependabot writes the new version into the lockfile without honoring.npmrc, so any Dependabot PR for a package published less than 24h ago fails CI onpnpm install --frozen-lockfile:It fails on every OS/Node combination and blocks auto-merge. Live examples: #341, gethinode/mod-blocks#153.
Fix
Mirror the install policy in the Dependabot policy via
cooldown, rather than weakening either side.The invariant: Dependabot's cooldown must be strictly greater than pnpm's
minimum-release-age. Cooldown is day-granular and 1440 minutes is exactly 1 day, sodefault-days: 2is the smallest safe value.Mirrors this repo's install policy:
.npmrc#minimum-release-age=1440andpnpm-workspace.yaml#minimumReleaseAgeExclude.Config validated against the official Dependabot JSON schema.
Notes
buildtype deliberately, so semantic-release does not cut a release for a CI-config-only change.cooldownby design; those can still trip the gate and self-heal on re-run after 24h.Part of an org-wide sweep (25 repos). Reference: gethinode/hinode#2009.
🤖 Generated with Claude Code