Repository navigation
chore: keep the pnpm integrity hash when the dependency update bumps pnpm - #164
Merged
Patrick Lafrance (patricklafrance) merged 2 commits intoNov 26, 2026
Merged
Conversation
commit: |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the pnpm hash-preservation and branch-prefix PR-matching changes.
No open issues 🎉
What changed in this PR
This PR preserves the root pnpm integrity hash during dependency updates in @workleap/logging and narrows how the weekly workflow identifies superseded pull requests.
Changes:
- Adds a lockfile-based hash restoration step for automated and local updates, and restores the current root pin.
- Adds nine unit tests and includes them in CI’s agent-tooling tests.
- Replaces title-based PR matching with branch-prefix matching and updates contributor and skill documentation.
| File | Description |
|---|---|
package.json |
Adds the hash-restoration command and restores the pnpm integrity hash. |
CONTRIBUTING.md |
Documents hash restoration during dependency updates. |
.github/workflows/ci.yml |
Includes the new script’s tests in CI. |
.github/scripts/pinPackageManagerHash.ts |
Restores missing pnpm hashes from lockfile integrity data. |
.github/scripts/pinPackageManagerHash.test.ts |
Tests integrity lookup, hash insertion, no-op cases, and missing-integrity errors. |
.github/prompts/update-dependencies.md |
Selects superseded PRs by the agent/update-deps- branch prefix instead of title. |
.claude/skills/_update-skills/SKILL.md |
Corrects the pnpm version-gate documentation to account for the hash suffix. |
Review effort: Balanced
…pnpm pnpm update also bumps the root packageManager field and writes it without its +sha512 hash. A new update-outdated-deps step copies the hash back from pnpm-lock.yaml. The weekly workflow also closes only the pull requests on an agent/update-deps-* branch instead of every pull request matching a title search. The Nov 17 update left the field as pnpm@12.19.0, so the hash is also restored here. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Patrick Lafrance (patricklafrance)
force-pushed
the
fix/pin-package-manager-hash
branch
from
November 25, 2026 22:43
869d094 to
395f4e2
Compare
Patrick Lafrance (patricklafrance)
deleted the
fix/pin-package-manager-hash
branch
November 26, 2026 15:58
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.
Summary
The weekly dependency update drops the integrity hash of the root
packageManagerfield.pnpm update -r --latestalso bumps that field and writes it bare:pnpm@12.21.0. Nothing puts the hash back, so it only survives when the agent restores it by hand. The last two updates (#158 and #163) merged the field without it, so this pull request also restores the hash onmain.This pull request also removes the tests of the agent tooling scripts and the CI step that ran them.
Same changes as workleap/wl-squide#813.
Changes
.github/scripts/pinPackageManagerHash.ts: copies the hash pnpm recorded inpnpm-lock.yamlfor the new pnpm version into thepackageManagerfield. A field that already carries a hash is left alone. It fails when the lockfile has no integrity for that version.package.json: aupdate-outdated-deps:pin-package-managerscript, right after the lastpnpm updatestep. It runs for the weekly workflow and for a local update alike. The field gets its hash back:pnpm@12.21.0+sha512.66fd8278…6ef0, written by the new script.ci.yml: the "Test agent tooling" step is removed. There is no CI check on the field itself.listSkillPins.test.tsandlistUpdateDependenciesPrs.test.ts, which both predate this pull request._update-skills/DESIGN.mdno longer points at the first one._update-skills/SKILL.md: thepnpmrow no longer saysupdate-outdated-depsnever bumps pnpm.CONTRIBUTING.md: what the new script does.The change to how the workflow finds its earlier pull requests is no longer part of this pull request: #166 replaced it on
main.Verification
In a worktree of this branch, before #163 was merged:
pnpm update-outdated-deps, thenpnpm install --no-frozen-lockfile: the field went frompnpm@12.19.0+sha512.…topnpm@12.21.0+sha512.66fd8278…6ef0, and the install, which ran with pnpm 12.21.0, left it unchanged. That hash is the registry's integrity forpnpm@12.21.0and the sha512 of its tarball.oxlintandoxfmt --checkpass on the changed files.🤖 Generated with Claude Code