Commit Graph
2 Commits
Author SHA1 Message Date
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