fix(worktree): recurse into tasks/ when syncing slice artifacts back to project root (#1678) (#1681)

syncWorktreeStateBack() only processed files directly in each slice
directory, silently skipping the tasks/ subdirectory. Task-level
summaries (T01-SUMMARY.md, T02-SUMMARY.md, etc.) were therefore never
copied from the worktree back to the project root before teardown,
causing data loss when the worktree was removed on milestone completion.

Fix: detect the tasks/ directory entry in the inner loop and recurse
into it, copying all .md files and appending them to the synced list.
Consistent with how syncStateToProjectRoot() already uses recursive
copy via safeCopyRecursive().

Adds regression test (case 8 in worktree-sync-milestones.test.ts)
covering slice-level and task-level summary sync.
This commit is contained in:
Jeremy McSpadden 2026-03-21 09:33:24 -05:00 committed by GitHub
parent ea2118d794
commit ee7c6b5c2b

Diff content is not available