Skill refresh during `/update-nanoclaw validate` rewrites pnpm-lock.yaml and drops the `integrity` hash of git-hosted dependencies
Version
NanoClaw 2.4.0, main at d4ff64f4, channels at 224827b9 (re-checked 2026-09-26). pnpm 10.34.5.
Steps to reproduce
- Install with
/add-whatsapp(pins@whiskeysockets/[email protected], which depends on the git-hostedlibsignal-nodetarball from codeload.github.com). The committed lockfile contains:resolution: {gitHosted: true, integrity: sha512-KmRMuAYS…PgWQ55g==, tarball: https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/bcea72df9ec34d9d9140ab30619cf479c7c144c7} - Run
/update-nanoclawthroughvalidate. The installed-skill refresh executes the skill'sdepdirective (scripts/skill-apply.ts:709-721), i.e.pnpm add @whiskeysockets/[email protected] [email protected] @types/[email protected] [email protected], and commits the result aschore: refresh installed skill payloads. - Inspect that commit's lockfile diff.
Expected
Re-adding already-pinned, already-locked versions leaves pnpm-lock.yaml unchanged (or at least keeps every integrity hash).
Observed
The only lockfile change in the refresh commit is:
- resolution: {gitHosted: true, integrity: sha512-KmRMuAYS…PgWQ55g==, tarball: https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/bcea72df…}
+ resolution: {gitHosted: true, tarball: https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/bcea72df…}From then on, pnpm fetches that tarball without verifying its content, and pnpm install --frozen-lockfile does not complain, so validate passes. The change is silent unless someone reads the lock diff. Reproducible: re-running the same pnpm add after restoring the line strips it again every time, so the fix cannot be made in staging before validate (a re-validate strips it again).
(I verified the original hash matches the codeload tarball, restored the line after cutover, and pnpm install --frozen-lockfile accepts it.)
Suggested fix
- In the
depdirective, skippnpm addwhen every requestedname@versionis already an exact match inpackage.jsonand satisfied by the lockfile (a no-op refresh shouldn't touch the lock). - Add a
validateguard that fails (or at least warns) when the staged lockfile loses anintegrity:field compared tooriginalHead. - For WhatsApp specifically, Baileys ≥ 7.0.0-rc11 resolves
libsignalfrom npm instead of git, which removes the git-hosted dependency (see #3941).
Source: nanocoai/nanoclaw