[HIGH] Fix worktree cleanup error swallowing #268
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Priority: HIGH
Problem:
WorktreeManagerService.cleanupWorktree() catches all errors and only logs warnings. Callers assume cleanup succeeded when it may have completely failed.
File:
apps/orchestrator/src/git/worktree-manager.service.ts:231-236Hidden Errors:
Impact:
Failed worktree cleanup leaves orphaned directories consuming disk space. Multiple failures can exhaust disk, causing subsequent operations to fail mysteriously.
Acceptance Criteria:
Recommended Fix:
Code Review Confidence: 85%
Found by: pr-review-toolkit:silent-failure-hunter
✅ Fixed: Added WorktreeCleanupResult interface with structured results. Errors are now properly tracked and reported.