chore(gha): gate dependency upgrades on release age - #418
Open
jsteinich wants to merge 1 commit into
Open
Conversation
pnpm applies a 24h minimumReleaseAge by default, but without minimumReleaseAgeStrict it does not block: it records the exception in minimumReleaseAgeExclude and installs the fresh version anyway. The weekly upgrade run hit this with knip@6.35.1, published ~6h earlier, and silently waived the delay the policy exists to enforce. Pair two changes so the policy actually holds: - ncu gains --cooldown 25h on all seven invocations, so it never proposes a version inside pnpm's window and falls back to the newest version that clears it. - pnpm-workspace.yaml pins minimumReleaseAge to pnpm's current 24h default and sets minimumReleaseAgeStrict, turning the policy into a backstop that should never fire. Enabling strict alone would break the upgrade job the way strictDepBuilds did (open-constructs#399); the cooldown is what makes strict safe. The window is pinned rather than inherited so the one-hour buffer stays meaningful if pnpm changes its default. Verified: ncu --cooldown 25h holds knip at 6.35.0 with "[cooldown] 6.35.1" while the same command without it proposes 6.35.1; a planted knip@6.35.1 fails `pnpm ci` with ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION; and main's current lockfile passes the strict check unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
jsteinich
marked this pull request as ready for review
September 10, 2026 01:19
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
pnpm applies a 24h
minimumReleaseAgeby default. WithoutminimumReleaseAgeStrictit doesn't block — it records the exception inminimumReleaseAgeExcludeand installs the fresh version anyway.The weekly upgrade run hit this with
knip@6.35.1, published ~6h earlier. pnpm waived its own delay and wrote the bypass intopnpm-workspace.yaml, where it would have merged unnoticed had it not been spotted in review on #326. The delay exists precisely so a compromised publish has time to be caught; auto-waiving it defeats the mechanism.Change
Two halves that only work together:
ncu --cooldown 25h(all 7 invocations)minimumReleaseAge: 1440+minimumReleaseAgeStrict: trueEnabling strict alone would break the upgrade job the way
strictDepBuildsdid in #399: the bot would die instead of producing a PR. The cooldown is what makes strict safe to turn on.The window is pinned rather than inherited so the one-hour buffer stays meaningful if pnpm changes its default. Note that explicitly setting
minimumReleaseAgeauto-enables strict on its own; both are set explicitly so the intent is readable.Why 25h and not 24h: just enough margin that a version sitting exactly on the boundary at
ncutime is still clear when pnpm re-verifies minutes later, without adding a full day of lag.Verification
knip@6.35.1failspnpm ciwithERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION, confirming the gate is live frompnpm-workspace.yamland not a silent no-op.prettier --checkclean; both YAML files parse with all 7 cooldown flags in place.Trade-off
Upgrades lag up to ~25h. A version published the morning of the Monday run gets picked up the following week instead. That is the intended cost.
Not included
Pruning the existing
minimumReleaseAgeExcludeentry — that was already handled on #326 by rolling knip back to main's 6.16.1 and removing the bypass.🤖 Generated with Claude Code