fix(skills): preserve local lock during sync

Closed
SH
3mo ago
+136-6

Summary

  • run deployment syncs against a temporary copy of the committed skills lock
  • keep user-modified skills-lock.json content untouched on success and failure
  • cover command propagation, Make variable inheritance, cleanup, and failure behavior

Validation

  • bun run check
  • shellcheck scripts/with-committed-skills-lock.sh tests/with-committed-skills-lock.sh
  • bash -n scripts/with-committed-skills-lock.sh tests/with-committed-skills-lock.sh
  • jq -e . package.json
  • git diff --check

Refs shunkakinokisoftware-hnnt


Summary by cubic

Prevent deployment sync from overwriting a user-modified skills-lock.json by running sync against a temporary copy of the committed lock. Adds a wrapper script, updates make sync, and includes tests to ensure the working lock is preserved.

  • Bug Fixes
    • Added scripts/with-committed-skills-lock.sh to run sync with a temp lock from HEAD:skills-lock.json (falls back to the current lock if git metadata is missing).
    • Updated Makefile: sync wraps a new sync-internal; SKILLS_LOCK_FILE is now ?= so the temp lock override is respected.
    • Added tests/with-committed-skills-lock.sh and wired it into bun run check; clarified README. Ensures the working lock is untouched on success or failure, cleans up temp files, and propagates exit codes.