3 Commits
Author SHA1 Message Date
Willie 366fb236c1 fix(sync): flag shared skills folders whose mode or naming differ
Two targets writing one skills folder with different target_naming or
mode undo each other on every sync (flat links vs standard names, merge
vs copy), but only include/exclude were compared, so sync and doctor
fell back to the generic shared-path hint.

Compare the effective mode and target naming too, so an unset value
equals the default it resolves to. The global default mode is not
carried on the target, so SkillsFolderConflicts takes it from its three
callers. The warning now says "different settings" instead of "different
filters".

Fixes #498
2026-10-09 00:28:34 +08:00
Willie e48784f16b feat(sync): name targets that sync one folder with different filters
When two targets sync skills into the same folder with different include
or exclude filters, each sync adds what one wants and prunes what the
other filters out, so the folder never settles and sync keeps showing the
same changes. The only hint was a vague overlap count.

sync, doctor and the dashboard's Sync page now name the targets and the
folder, and suggest turning skills off for all but one (universal when it
is among them) instead of removing a target. The Sync page offers the
existing stop-syncing dialog in place. Targets with identical filters are
not reported.
2026-09-29 11:45:48 +08:00
Willie 0afab5cb7b fix(sync): resolve race condition for targets sharing the same path
Multiple targets (e.g. universal/amp/kimi/replit) share ~/.config/agents/skills.
Parallel sync caused concurrent goroutines to race on os.Symlink for the same
destination, producing "file exists" errors.

Fix: group entries by resolved target path so same-path targets run sequentially
within one goroutine. Different-path targets remain fully parallel.

Also addresses PR #52 review feedback:
- audit: replace O(N²) findElapsed with O(1) index-aligned elapsed slice
- test-brew-upgrade: explicit go check + mktemp -d (replaces || true and /tmp)

Add 6 integration tests covering shared-path race condition, idempotency,
--force mode, mixed paths, filters, and output verification.
2026-02-26 22:27:23 +08:00