Conversation
| git commit -m "chore: compact trajectories for v${{ needs.build.outputs.new_version }}" | ||
| fi | ||
| # Discard any other unstaged changes (e.g. package-lock.json modified by npx) | ||
| git checkout -- . 2>/dev/null || true |
There was a problem hiding this comment.
🔴 git checkout -- package-lock.json discards version-bumped package-lock.json, not just npx side-effects
git checkout -- package-lock.json restores the file to the HEAD (committed) version, but package-lock.json in the working tree was overwritten by the build artifact download (.github/workflows/publish.yml:906-910) which contains the version-bumped lockfile generated during the build step (.github/workflows/publish.yml:414-415). This means the command discards the legitimate version bump changes along with any npx side-effects. In the subsequent "Commit and tag" step (line 1187), git add package-lock.json will stage the old/un-bumped lockfile, causing the release commit to have a package.json with bumped versions but a package-lock.json that doesn't match.
Fix suggestion
Instead of reverting to HEAD, save the artifact version before npx runs and restore it after, or move the git checkout inside the if block and only restore if npx actually ran and modified it. A simpler approach: compare the lockfile before/after npx and only restore if npx changed it.
Was this helpful? React with 👍 or 👎 to provide feedback.
* fix compaction step * devin review
Summary
Test Plan
Screenshots