feat: worktree registry prune command - clean dead/corrupted entries (t197)#833
feat: worktree registry prune command - clean dead/corrupted entries (t197)#833marcusquinn wants to merge 1 commit intomainfrom
Conversation
…s (t197) Enhanced prune_worktree_registry() in shared-constants.sh: - Iterate by rowid to handle entries with embedded newlines/ANSI codes - Detect corrupted paths (control characters, empty paths, missing PIDs) - Detect missing directories and dead owner PIDs - Support --dry-run, --verbose, --all flags - --all flag detects orphaned entries not in git worktree list - Set PRUNE_COUNT global for callers to report results - Delete by rowid for safe handling of corrupted paths Enhanced cmd_registry in worktree-helper.sh: - prune subcommand: --dry-run/-n, --all/-a, --quiet/-q flags - list subcommand: rowid-based iteration (fixes count with corrupted entries) - list subcommand: summary line with alive/dead counts - Sanitize paths for display (strip control chars, truncate) - Help text for registry subcommands with examples
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Caution Review failedThe pull request is closed. WalkthroughTwo shell scripts enhanced to support robust worktree registry pruning with dry-run capability, comprehensive validation (corrupted paths, dead PIDs, missing directories), and verbose reporting with entry counts. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Mon Feb 9 23:55:07 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|



Summary
worktree-helper.sh registry pruneto detect and clean dead/corrupted registry entries--dry-run,--all,--quietflags for safe, flexible pruningChanges
shared-constants.sh - prune_worktree_registry()
worktree-helper.sh - cmd_registry
Testing
Summary by CodeRabbit
New Features
--dry-runflag to preview pruning without making changes--allflag to include orphaned entries in pruning operations--verboseflag for detailed per-entry information during pruningBug Fixes