mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-23 09:07:46 +02:00
The policy job already regenerates pnpm-lock.yaml in memory when a PR changes any manifest (package.json, pnpm-workspace.yaml, .npmrc, pnpmfile.*) but throws it away. Manifest-only PRs from non-dependabot, non-chore/refresh-lockfile branches can't commit the lockfile (policy blocks it) and can't satisfy --frozen-lockfile downstream, so every test/build job fails with ERR_PNPM_OUTDATED_LOCKFILE until the post-merge refresh-lockfile workflow runs on master. This commit closes that gap by uploading the regenerated lockfile as a workflow artifact (pr-lockfile) from policy and restoring it via actions/download-artifact in each downstream job before pnpm install --frozen-lockfile runs. The download step is best-effort (continue-on-error: true) so PRs that did not change manifests are unaffected — the artifact simply does not exist and downstream jobs proceed with the committed lockfile as before. canary_dry_run's pre-existing 'git checkout -- pnpm-lock.yaml' is guarded so it no longer clobbers an artifact-restored lockfile.