From 58ae799dbd3571b1a6caa5eb4bb24ccc898d3706 Mon Sep 17 00:00:00 2001 From: Nicky Leach Date: Thu, 23 Jul 2026 15:14:52 -0700 Subject: [PATCH] fix(ci): regenerate lockfile for patch changes (#10132) ## Thinking Path > - Paperclip uses GitHub Actions to keep generated lockfile changes deterministic in CI > - The workflow decides when to regenerate the lockfile based on file/path changes > - Patch changes can live under a top-level `patches/` directory, and those changes also affect dependency resolution > - If the workflow misses that path, CI can skip lockfile regeneration when it should run > - This pull request adds top-level `patches/` to the trigger so patch updates participate in the existing lockfile regeneration flow > - The benefit is that patch-related dependency changes continue to get the same CI protection as the other manifest and workspace triggers ## Linked Issues or Issue Description No public GitHub issue is linked here. The underlying problem is that top-level `patches/` files are part of pnpm's dependency graph, but the PR workflow's lockfile-regeneration gate only looked at package manifests, workspace config, `.npmrc`, and `pnpmfile.*` changes. That meant patch-only edits could skip `pnpm install --lockfile-only` and leave downstream frozen-install jobs on a stale lockfile. This PR keeps the existing manual lockfile edit guard in place. The intended behavior is still: CI owns lockfile regeneration, and patch changes are allowed to trigger that regeneration without letting contributors commit `pnpm-lock.yaml` directly. ## What Changed - Added top-level `patches/` to the PR workflow's dependency-resolution trigger. - Left the manual `pnpm-lock.yaml` edit blocker unchanged so CI still owns lockfile regeneration. ## Verification - `git diff --check .github/workflows/pr.yml` - Verified the workflow path predicate matches `patches/acpx@0.12.0.patch`, `package.json`, `packages/shared/package.json`, `pnpm-workspace.yaml`, `.npmrc`, `pnpmfile.cjs`, `pnpmfile.js`, and `pnpmfile.mjs`, while excluding nested patch paths and unrelated files. ## Risks - Low risk: this only broadens the workflow trigger set for lockfile regeneration. - The main behavioral change is that patch updates at the repository root now participate in the same CI path as manifest and workspace changes. ## Model Used OpenAI Codex, GPT-5-based tool-using agent. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge Co-authored-by: Paperclip --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a9c33a8da3..b3fbdaffc4 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -80,7 +80,7 @@ jobs: id: regen_lockfile run: | changed="$(git diff --name-only "${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }}")" - manifest_pattern='(^|/)package\.json$|^pnpm-workspace\.yaml$|^\.npmrc$|^pnpmfile\.(cjs|js|mjs)$' + manifest_pattern='(^|/)package\.json$|^pnpm-workspace\.yaml$|^\.npmrc$|^pnpmfile\.(cjs|js|mjs)$|^patches/' if printf '%s\n' "$changed" | grep -Eq "$manifest_pattern"; then pnpm install --lockfile-only --ignore-scripts --no-frozen-lockfile echo "regenerated=1" >> "$GITHUB_OUTPUT"