[CRITICAL] Fix silent cleanup failures - return structured results #262
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: CRITICAL - Silent failures
Problem:
CleanupService catches all errors and only logs them, never notifying callers of partial failures. Users see "Agent killed successfully" even when cleanup failed, leaving orphaned resources.
File:
apps/orchestrator/src/killswitch/cleanup.service.ts:62-133Hidden Errors:
Impact:
Acceptance Criteria:
CleanupResulttypeRecommended Approach:
Return typed result instead of void:
Code Review Confidence: 90%
Found by: pr-review-toolkit:silent-failure-hunter
✅ Fixed: Added CleanupResult interface with structured results for each cleanup step (docker, worktree, state). File: apps/orchestrator/src/killswitch/cleanup.service.ts