Repository navigation
fix: make blob project-lock hashes comparable during updates - #1867
AndreaCovelli wants to merge 1 commit into
Conversation
Upstream skills update never compares computedHash, so it reinstalls every project skill on every run. Alias runs the local build carrying vercel-labs/skills#1867 (fork: tenequm/vercel-skills).
|
Ran this patch locally across 9 projects / 30 lock entries. It does what it says: a 10-skill project went from 10 reinstalls per run to 0, and a 3-skill project from 3 to 0. Type-check and the update suites pass. One defect that affects this PR, though, and the current tests can't catch it.
const computedHash =
blobResult && 'snapshotHash' in skill
? (skill as BlobSkill).snapshotHash
: await computeSkillFolderHash(skill.path);When Reproduced with Note that The regression tests here mock This isn't a blocker: blob-sourced skills just keep today's |
|
Thanks @tenequm — excellent catch, and especially helpful reproduction details. I pushed
I also reproduced your exact Thanks again for testing this so thoroughly. |
|
@quuu When you have a chance, could you take a look at this follow-up to #1865? It refreshes #1371 against current The field test caught a blob-install hash-basis gap; that is addressed in |
2dab585 to
7f82fca
Compare
|
@quuu I rebased this onto current I also checked the other open update PRs. #1371 is the exact older duplicate, but it is currently conflicting and does not include the blob hash-basis fix, relocation handling, or regression coverage here. #565 is an older broader project-lock design and is also conflicting; #544 covers local filesystem sources; #958 explicitly defers project-scope hash checks. Current The rebased branch keeps moved-skill migration and fail-closed ambiguity handling, skips unchanged exact-path skills, and conservatively reinstalls only the affected skill when hashing alone fails. Validation: focused suite 126/126, type-check, formatting, and build pass. After making the rebased assertions platform-aware and repairing the stale private-repo test mock from current |
dc6e691 to
b7a0143
Compare
|
@quuu I rebased this onto current The remaining fix covers blob installs: nested snapshots now compute their hash locally, and root-level snapshots record the The PR is now one commit ( Could you take another look when you have a chance? |
skills update -pcan still reinstall unchanged skills installed through the GitHub blob fast path. Nested snapshots can record a server hash that differs from the cloned folder hash; root snapshots install onlySKILL.md, while updates hash the entire repository.This change computes blob snapshot hashes locally from downloaded relative paths and contents, records
computedHashScope: 'skill-file'for root snapshots, and makes the existing update hash check honor that scope. BothrunAddandinstallFromSourcerecord it through the shared project lock writer introduced in #2401.Rebased onto current
main(48dc9e8). Commit4843f2falready implements project update skipping, so this PR is now narrowed to the remaining blob hash compatibility fixes. It addresses the hash mismatch reproduced in @tenequm's field-test report.Locks without
computedHashScopecontinue to use folder hashes. Existing blob entries acquire the corrected hash and scope when reinstalled. Relocation and failure handling continue through the existing update flow.Validation:
addandinstallFromSource; unchanged content skips reinstalling, and changed content triggers an update.