Repository navigation
fix(sync): recognize a copy made under ignore: negations as unedited - #993
Merged
Merged
Conversation
When a target switches from copy to merge, merge sync replaces a copy that copy mode made and nobody edited with a link, and diff and the dashboard say so. It decided "unedited" by hashing the copy with the default ignore patterns only, while the recorded checksum used the effective patterns. With `ignore: ["!.DS_Store"]` the copy holds the .DS_Store, the hashes never matched, and an unedited copy was kept as a local copy until `sync --force`. The copy is now hashed with the defaults plus the `!` rules from `ignore:`, so it counts every file sync copied. The other `ignore:` rules stay out on purpose: a file the user added to the copy is their edit even when `ignore:` names it, and the copy must be kept.
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. |
6 of 9 tasks
runkids
added a commit
that referenced
this pull request
Nov 23, 2026
…#994) Three gaps left after the ignore: fixes in #986-#993: - `disable` kept the line it wrote when a "!" rule kept the skill enabled, so the ignore file gained a rule that did nothing. The line is now removed again when it disables none of the skills it names. - `skillshare disable inner` writes the folder name, but the list TUI and the dashboard removed only the skill's path line on enable, so the skill stayed disabled with no way to turn it back on there. They now also remove the folder-name line, unless it disables a skill or agent that is not being enabled. - `diff` counted files that ignore: keeps out of the copy in the "source changed" time of a copy-mode target. It now counts only what sync copies.
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
No issue. Follow-up to #992, which listed this under "Not covered".
What was wrong
When a target switches from copy to merge, merge sync replaces each copy that copy mode made and nobody edited with a link.
diffand the dashboard report it ascopy mode copy (sync replaces with link).OwnsCopydecides "unedited" by hashing the copy and comparing it with the checksum copy mode recorded. It hashed the copy with the default ignore patterns only, but the recorded checksum used the effective patterns (defaults plusignore:).With
ignore: ["!.DS_Store"], sync copies.DS_Store, and the recorded checksum includes it.OwnsCopyleft it out, so the hashes never matched. Merge sync then kept the unedited copy as a local copy untilsync --force, anddiffand the dashboard said the same.Fix
OwnsCopytakes the effective patterns. It hashes the copy with the defaults plus only the!rules fromignore:.ignore:rules stay out on purpose. Supposeignore:namesnotes.mdand the user adds anotes.mdto the copy. That is their edit, so the copy must still count as edited and be kept. Hashing with the full patterns would hide the file and replace the copy.SyncTargetMergeWithSkillsOptionsthat mirrors the copy side's...Optionsvariant;diff;Tests
TestSyncTargetMerge_ReplacesCopyWithReincludedDefaultcopies a skill under!.DS_Store, then merge-syncs it. It fails onmain.TestSyncTargetMerge_KeepsCopyWithAddedIgnoredFileadds anotes.mdthatignore:names to the copy and checks that merge sync keeps it. It passes onmainand guards the case above.TestDiffMergeModeCopyWithReincludedDefaultIsReplacedWithLinkandTestComputeTargetDiff_MergeModeCopyWithReincludedDefaultIsReplacedWithLinkcover the CLI and dashboard diff wiring. Both fail whenOwnsCopyignores the patterns.Checks
make checkpasses in the devcontainer. The raw-write ratchet entry for merge sync'sos.Removemoves to the new function name.sync-modes.mdalready says unedited copies are replaced, and this makes it true for!rules.Checklist
make check) — for code changes