Repository navigation
fix(sync): copy files that a negation re-includes under an ignored folder - #986
Merged
Merged
Conversation
…lder The config `ignore:` list uses .skillignore matching, where a later "!" rule re-includes a path inside an ignored folder. The copy, mtime and checksum walks skipped every ignored folder, so a rule such as `!docs/keep.md` after `docs/` never took effect and diff still reported the target in sync. The walks now skip a folder only when CanSkipDir says no negation can reach inside it. The copy walk creates an entered ignored folder only when something kept needs it, so targets gain no empty folders. Below a symlinked folder the copy walk matches rules from the skill root, as the checksum walk does, so the two walks pick the same files.
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. Found while reviewing #980.
What was wrong
The
ignore:list in the config decides which files copy-mode targets receive. Its rules use.skillignorematching, where a later!rule re-includes a path even inside an ignored folder. The copy, mtime and checksum walks skipped every ignored folder, so the negation never ran:syncnever copieddocs/keep.md, anddiffstill reported the target in sync.Fix
CanSkipDirsays no negation can reach inside it. Files are still matched one by one.difforsyncnoticing.The docs gain one paragraph on
!rules, and the default list now matches the code (.DS_Store,.git/,__pycache__/). Translations are updated.Upgrade effect:
!*.md, now re-includes matching files inside every ignored folder,node_modules/included, and sync walks those folders.!rule. A link nameddocsunder the ruledocs/used to be copied in full and now is not. An anchored rule such as/build/no longer matches abuild/folder inside the link target.sync --forceruns. The manifest's fast paths do not know the ignore rules, so if no file the walk compares changed, nothing looks changed. Changingignore:already behaves this way today.Tests
All fail on
mainand pass with the fix, except the guard noted below:internal/sync/file_ignore_test.go:docs/plus!docs/api/) is copied;main, which never entered the folder. It fails if the copy walk creates folders as it enters them.internal/sync/checksum_test.go: the checksum and mtime walks include the re-included file and still leave out ignored ones.internal/sync/symlinked_dir_test.go: through a symlinked folder, a file changes the checksum exactly when it was copied. There are two cases. The link nameddocsfails onmain. The link abovedocs/passes onmain, where both walks skipped the folder, and fails with only theCanSkipDirchange.Checks
make checkpasses in the devcontainer.synccopies only the kept file anddiffreports in sync.diffreport it, and the nextsynccopies it.diffin sync.Not in this PR
ignore:list. Its sync and diff use only the defaults.Manifest.OwnsCopyhashes the target with the default patterns only. A user rule that re-includes a default pattern makes an unchanged copy look locally modified when switching to merge mode.diff --filesdoes not applyignore:at all.Checklist
make check) — for code changes