Repository navigation
fix(diff): list only what sync prunes, and have doctor follow it - #942
Merged
Merged
Conversation
Three previews disagreed with what sync does to a link no skill or agent maps to. The agent diff, in the CLI and the dashboard, listed every orphan link as a removal. Agent sync prunes a link only in merge mode, and only when it is broken or points into the source, so a live link to another location was listed forever. Both diffs now ask the function prune uses. The CLI diff listed no orphan links at all for merge-mode skills, so a skill removed from the source showed nothing until sync pruned its link. It now lists the links sync.OrphanLink says prune removes. doctor called a broken link "did not create, kept" whenever OwnsLink was false. Prune also removes a broken link under a name the manifest records in any form once no skill maps to it, so doctor told the user to delete by hand a link that sync removes. It now reports those as broken and suggests sync. An empty source counts as "every entry is an orphan"; only a failed discovery turns the check off. Closes #939 Closes #940 Closes #941
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
5 of 9 tasks
runkids
added a commit
that referenced
this pull request
Nov 17, 2026
…944) Without file-link privilege (Windows without Developer Mode) merge mode copies agents and tracks the copies it wrote. A file a tool already had with the same bytes as the source was not tracked, so it was kept, and --force kept it too: the identical-content check ran before the force check. init's "kept local agents: X (sync agents --force replaces them)" then named a file --force could never take over, on every run. With --force the file is now recorded as skillshare's, so later syncs update it. Without --force nothing changes. Also: the five-name cap written twice is one helper, sync.ListNames, and doctor.md says when a recorded broken link is reported as a broken symlink (the behavior from #942).
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.
Type
proposals/only — see CONTRIBUTING.md)approvedlabel)Linked Issue
Closes #939
Closes #940
Closes #941
Summary
Three previews disagreed with what sync does to a link that no skill or agent maps to. Each now asks the function prune itself uses.
diff, merge-mode skills (#940)sync.OrphanLinksays prune removes, asOrphandoctorbroken links (#941)OwnsLinkskillshare syncwhen sync would prune itprunableLinkis exported assync.PrunableLink;sync.PrunesAgentLinkadds the mode check. Both agent diffs now receive the agents source.doctortreats an empty source as "every entry is an orphan". Only a failed discovery or an invalid filter turns the new check off.diff.mdand its four translations describe the merge-mode orphan links.Checks
make checkin a devcontainer: exit 0.HOME:difflistedOrphan alpha, brk.md, old.mdand not the live external agent link;sync --allpruned exactly those three;diffthen reported in sync.doctorreported1 broken symlink: alphafor the removed skill anddid not create, kept: gammafor the current one, in copy and merge mode;syncprunedalphaand keptgamma.TestComputeAgentDiff_ListsOnlyOrphanLinksSyncPrunes(includes a relative link and copy mode),TestComputeAgentTargetDiff_KeepsLiveLinkToAnotherLocation,TestDiffListsOrphanLinkThatSyncPrunes,TestCheckBrokenSymlinksFollowsWhatSyncPrunes(merge and copy).Not run: website build, UI tests, the Windows runbook.
Not covered:
doctorfollow prune; tightening prune is a separate decision.doctor.mddoes not mention that the name must no longer be in the source.Checklist
make check) — for code changes