fix(sync): Prune stale managed skills during sync#87
Merged
Conversation
Use the local lockfile during sync to distinguish truly local orphaned skills from managed skills that were removed from agents.toml. This prevents collaborators from re-adopting stale installs after pulling config changes, and it respects wildcard exclude changes during offline sync. Add regression coverage for the direct prune path, wildcard excludes, and a collaborator-style clone/pull/sync flow so the behavior is exercised closer to end to end. Fixes #86 Co-Authored-By: Codex <noreply@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Make the collaborator sync regression test clone the temp project remote with an explicit main branch. This avoids CI-only failures caused by relying on the bare remote HEAD when creating Alice and Bob clones. Refs #86 Co-Authored-By: Codex <noreply@openai.com>
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.
Prune previously managed skills during
dotagents syncinstead of re-adopting them as local orphans.The current sync path treats any undeclared directory under
.agents/skills/as an orphan to adopt. That breaks the collaborator flow from #86: one person removes a skill fromagents.toml, another person pulls the change, still has the old skill on disk plus a stale localagents.lock, andsyncadds the skill back instead of cleaning it up.This change uses the local lockfile to distinguish truly local in-place skills from stale managed installs. It also applies the same logic to wildcard entries so skills newly covered by
excludeget pruned during offline sync.I considered leaving this to
installonly, but that does not help the users relying onsyncfor offline reconciliation after a pull. The new behavior keeps local custom skills adoptable while making team-managed removals converge correctly.The test coverage includes direct sync regressions plus a collaborator-style clone/pull/sync flow in temp git repos, and the docs now describe that
syncadopts local orphans while pruning stale managed skills.Fixes #86