Skip to content

fix(core): skill hash mismatch causes false update detection - #3

Merged
daisaru11 merged 1 commit into
mainfrom
fix/skill-hash-mismatch
May 4, 2026
Merged

daisaru11 merged 1 commit into
mainfrom
fix/skill-hash-mismatch

Conversation

@daisaru11

Copy link
Copy Markdown
Member

Summary

  • Applier was using computeHash(params) for skill resources, while the planner uses computeSkillHash(display_title, files). This caused two issues:
    • update: SkillUpdateParams has only files (no display_title), so the stored hash always differed from the planner's hash
    • create: computeHash doesn't sort files by path or normalize to {path, content} like computeSkillHash does
  • Switched both skill create and update paths in the applier to use computeSkillHash, ensuring the stored hash matches the planner's computation
  • Added regression tests (S-7, S-8) verifying that the hash stored after create/update matches computeSkillHash

Test plan

  • All existing tests pass (91 tests, 0 failures)
  • New tests S-7 and S-8 verify hash consistency between applier and planner
  • Run plan twice against an existing deployment to confirm no spurious diffs

🤖 Generated with Claude Code

The applier was using computeHash(params) for skill resources while the
planner uses computeSkillHash(display_title, files). This mismatch caused
skills to always appear as changed on subsequent plans because the stored
hash never matched the planner's computed hash.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@daisaru11
daisaru11 merged commit 272482d into main May 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant