Repository navigation
fix(sync): remove undeclared Skills that sync installed - #241
Merged
Merged
Conversation
A Skill dropped from a declaration stayed in the store lockfile and stayed linked into every Agent target. Renamed Skills in the harlan-agent-kit store stayed visible to Agents for six weeks, and `skilld remove -g` cannot reach a store chosen with SKILLD_DATA_DIR. Sync now removes each lockfile entry that no declaration in the store names, in the same transaction as the install. It removes Agent target links that point into this store and copies whose files match it, and leaves every other path in place. `--check` names each such Skill.
Contributor
🤖 MERGED
GitHub merged this pull request.
10cb7e45-eb0a-4bd7-b8a9-84597ea6f05d Selected findings run after merge and open separate pull requests. |
Contributor
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: READY.
Removing every undeclared lockfile entry also removed Skills that `skilld install` put in the same store. Sync now records `installedBy: sync` on each entry it writes, and removes an undeclared entry only when it carries that record. Entries without the record come from `skilld install` or an older sync. Sync keeps them and prints the `skilld remove` command that removes them; they alone do not fail `--check`. The next sync records the installer on declared entries that an older sync wrote.
Contributor
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: READY.
1 of 6 tasks
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.
🔗 Linked issue
No linked issue.
❓ Type of change
📚 Description
When a declaration dropped a Skill,
skilld synckept its lockfile entry, its store directory, and its Agent target links. Agents kept loading the dropped Skill until someone removed it by hand. In harlan-agent-kit, renamed Skills stayed linked into every Agent target for six weeks.Sync now records
"installedBy": "sync"on each lockfile entry it writes. When no declaration in the store names an entry with that record, sync removes it. The removal runs in the same transaction as the install, so a failed sync restores the store directory, the links, and the lockfile entry.skilld sync --checkexits1and printsSkill NAME is no longer declared.After a sync, the output printsRemoved Skill NAME. It is no longer declared.skilld installor an older sync. It printsSkill NAME is not declared. Sync did not install it, so sync keeps it.and theskilld removecommand that removes it. These entries alone do not make--checkexit1.undeclaredarray ofRemovableandKeptitems. AKeptitem carriesremoveCommand.A CLI without this change rejects a lockfile that contains
installedBy.