You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sort installed skill files by their relative POSIX paths before hashing.
Add a regression for a sibling file and directory that share a prefix.
Why
Path object ordering is component-aware, while bundle hashing sorts path strings. A bundle containing references/styles.md and references/styles/minimal.md therefore received different disk and bundle hashes even when every byte matched. Hermes then reported the skill as update_available after each successful update.
Duplicate of #53448 — both change tools/skills_guard.py to sort the digest inputs by relative POSIX path, restoring disk/bundle hash symmetry. The test layouts differ, but the production mechanism is the same.
Thanks for the focused regression. The premise is confirmed on the canonical checkout: tools/skills_guard.py:695 sorts Path objects, while tools/skills_hub.py:3694 sorts the relative-path strings used in the in-memory hash. tools/skills_hub.py:3645 stores the disk hash and tools/skills_hub.py:3755-3757 compares it with the bundle hash during update checks, so this can produce a false update_available result.
The PR updates the live shared helper, _content_digest() (tools/skills_guard.py:691), which also keeps content_hash() (tools/skills_guard.py:857) and full_content_hash() (tools/skills_guard.py:705) internally canonical. Its sibling-prefix regression extends the existing symmetry contract at tests/tools/test_skills_hub.py:1150 without introducing a snapshot-style test. No additional sibling disk/bundle comparison path was found; tools/skills_sync.py:269-275 delegates to content_hash() when available.
Confirmed. #53448 now applies the same relative-POSIX ordering change in _content_digest() and includes an equivalent regression that proves disk and bundle hash symmetry. The production fix is the same, so I am closing this PR to avoid duplicate review. This cleanly attributed branch remains available as a fallback if #53448 cannot clear its current contributor-attribution gate.
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
duplicateThis issue or pull request already existsP3Low — cosmetic, nice to havesweeper:blast-moderateSweeper blast radius: moderate — a subsystem or single platformsweeper:risk-compatibilitySweeper risk: may break existing users, config, migrations, defaults, or upgradestool/skillsSkills system (list, view, manage)type/bugSomething isn't working
3 participants
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.
What
Why
Path object ordering is component-aware, while bundle hashing sorts path strings. A bundle containing references/styles.md and references/styles/minimal.md therefore received different disk and bundle hashes even when every byte matched. Hermes then reported the skill as update_available after each successful update.
Verification
Tested on macOS 26.5.1 with Python 3.11.13.