When the worktree-recycle pool reassigned a path to a new task, the old task's diff endpoints kept reading the new task's branch state — surfacing unrelated commits as the original task's "files changed" list. - Clear task.worktree/branch in the merger after the worktree is released to the pool or removed, so the path no longer points anywhere. - Validate the worktree's current branch matches task.branch in the three worktree-backed diff endpoints; on mismatch return empty rather than diffing against a foreign branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
48 KiB
48 KiB