Problem
In handle_worktree_cleanup, the dirty state check uses unwrap_or(false) on the status() call result. If status fails for a reason other than "not found" (e.g., corrupted git state), it silently treats the worktree as clean, potentially skipping the interactive confirmation prompt and deleting a worktree with uncommitted changes.
Solution
Solution
Distinguish between "not found" errors (treat as proceed) and other errors (propagate or warn). Consider matching on error variant to handle WorktreeNotFound specifically.
Created via Kata PR review backlog
Problem
In
handle_worktree_cleanup, the dirty state check usesunwrap_or(false)on thestatus()call result. If status fails for a reason other than "not found" (e.g., corrupted git state), it silently treats the worktree as clean, potentially skipping the interactive confirmation prompt and deleting a worktree with uncommitted changes.Solution
Solution
Distinguish between "not found" errors (treat as proceed) and other errors (propagate or warn). Consider matching on error variant to handle
WorktreeNotFoundspecifically.Created via Kata PR review backlog