Repository navigation
Conversation
|
@quuu — bug-fix candidate.
|
antfu
approved these changes
Oct 9, 2026
antfu
reviewed
Oct 9, 2026
antfu
left a comment
Collaborator
There was a problem hiding this comment.
The only concern is that this would change all the hashes for existing locks, but I think this is a necessary fix.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #2427.
computeSkillFolderHashcurrently concatenates each filename and its bytes without a boundary. A skill with fileacontainingbctherefore hashes identically to one with fileabcontainingc, even when the rest of the skill is unchanged. Projectskills updatecan treat the changed skill as current.Frame each file as its relative path, a NUL separator, its byte length, another NUL separator, then its contents. Filesystem paths cannot contain NUL, and the byte length makes content boundaries unambiguous. No lockfile schema or install behavior changes.
Verification
SKILL.mdfiles and thea/bcversusab/cpair. It failed on current main with equal hashes and passes after the change.vitest run: 941 passed (69 files), using an isolated HOME.pnpm type-check,pnpm format:check, andpnpm buildpassed.Compatibility
Existing 64-character project
computedHashvalues remain readable but will differ under the new framing. The next project update may reinstall a skill once and then record the new hash. GitHub tree SHA tracking in the global lock is unchanged.