#3942·nanoclaw

Skill refresh during `/update-nanoclaw validate` rewrites pnpm-lock.yaml and drops the `integrity` hash of git-hosted dependencies

Author: bmultiniCreated Sep 26, 2026Updated Sep 26, 2026

Version

NanoClaw 2.4.0, main at d4ff64f4, channels at 224827b9 (re-checked 2026-09-26). pnpm 10.34.5.

Steps to reproduce

  1. Install with /add-whatsapp (pins @whiskeysockets/[email protected], which depends on the git-hosted libsignal-node tarball from codeload.github.com). The committed lockfile contains:
    yaml
    resolution: {gitHosted: true, integrity: sha512-KmRMuAYS…PgWQ55g==, tarball: https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/bcea72df9ec34d9d9140ab30619cf479c7c144c7}
  2. Run /update-nanoclaw through validate. The installed-skill refresh executes the skill's dep directive (scripts/skill-apply.ts:709-721), i.e. pnpm add @whiskeysockets/[email protected] [email protected] @types/[email protected] [email protected], and commits the result as chore: refresh installed skill payloads.
  3. 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:

diff
-    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 dep directive, skip pnpm add when every requested name@version is already an exact match in package.json and satisfied by the lockfile (a no-op refresh shouldn't touch the lock).
  • Add a validate guard that fails (or at least warns) when the staged lockfile loses an integrity: field compared to originalHead.
  • For WhatsApp specifically, Baileys ≥ 7.0.0-rc11 resolves libsignal from npm instead of git, which removes the git-hosted dependency (see #3941).