Skip to content

fix(deps): lockfile violates minimumReleaseAge policy; add CI check - #244

Merged
nikcio merged 5 commits into
mainfrom
fix/pnpm-minimum-release-age
Nov 3, 2026
Merged

nikcio merged 5 commits into
mainfrom
fix/pnpm-minimum-release-age

Conversation

@nikcio

@nikcio nikcio commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Fixes the Deploy Docs failure on main and adds CI coverage so this class of failure is caught before merge.

Root cause

pnpm-lock.yaml contained rolldown@1.2.16 (plus its 15 platform bindings), published 2026-10-29 — inside the repo's 7-day minimumReleaseAge: 10080 window. CI's pnpm install (via withastro/action) re-verifies every lockfile entry against the policy on a fresh runner and failed with ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION.

How it slipped through: the local lockfile regeneration ran with a PNPM_CONFIG_MINIMUM_RELEASE_AGE environment override active, which silently replaced the workspace's 7-day policy with 1 day — so the too-new entry passed locally. And no CI job runs pnpm install on pull requests (the Build workflow only does dotnet restore/build/test), so the first place the lockfile was ever verified was the post-merge docs deployment on main.

Fix

  • Regenerated pnpm-lock.yaml with the real policy active (env override unset). Resolution naturally converges on rolldown@1.2.15 (published 2026-10-21) and also dedupes the stale 1.2.13 entries from astro. No overrides needed.
  • Pinned packageManager: pnpm@12.15.0 in package.json and pnpm@12.15.0 in the docs workflow, so local installs and CI resolve with the same pnpm instead of whatever pnpm@latest ships that day.
  • New npm job in the Build workflow that runs pnpm install --frozen-lockfile from docs/ (exactly what the deploy does) on every pull request. A lockfile entry younger than the policy now fails the PR check before merge.
  • Scoped the Build workflow's path triggers to npm manifests/lockfile so the job actually runs when deps change.

Verification

  • Reproduced the CI failure locally with PNPM_CONFIG_MINIMUM_RELEASE_AGE unset: original lockfile fails with the identical error, fixed lockfile passes the supply-chain verification.
  • pnpm install --frozen-lockfile, pnpm docs:build (10 pages), dotnet build — all clean.
  • actionlint on both modified workflows: OK.

Once this merges, the Deploy Docs run on main should go green again.

The Deploy Docs workflow failed its supply-chain check because the
lockfile contained rolldown@1.2.16 and its platform bindings, published
five days earlier — inside the repo's 7-day minimumReleaseAge window.
The local lockfile regeneration that introduced it ran with a
PNPM_CONFIG_MINIMUM_RELEASE_AGE environment override, which masked the
workspace policy, so the violation was never seen before pushing.

- Regenerate pnpm-lock.yaml with the real policy active; resolution
  naturally converges on rolldown@1.2.15 (published 2026-10-21)
- Pin pnpm@12.15.0 via the packageManager field so local installs,
  the docs workflow, and CI all resolve with the same pnpm version
  instead of whatever pnpm@latest ships
- Add an npm job to the Build workflow that runs the same frozen-lockfile
  install on pull requests, so a lockfile violating the policy fails the
  PR check instead of the post-merge docs deployment
- Scope the Build workflow's paths triggers to npm manifests and the
  lockfile so the new job runs when it can catch this
@nikcio
nikcio merged commit d89ad37 into main Nov 3, 2026
7 checks passed
@nikcio
nikcio deleted the fix/pnpm-minimum-release-age branch November 3, 2026 18:17
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