Conversation
- carson housekeep --dry-run shows what would be reaped/deleted without making any changes. Each worktree and branch is listed with its status reason (merged PR, absorbed, held by current shell, open PR, etc.) and the action that would be taken (would reap / would delete / skip). Works with --all and --target too. - Fix held_by_other_process? safety check: lsof exits non-zero on macOS when SIP blocks access to system processes, even though user-process output is valid. The previous `return false unless status.success?` guard caused the check to silently skip all results, allowing housekeep to remove worktrees that were held by another Terminal session. Now we parse whatever stdout lsof produces regardless of its exit code. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request introduces a --dry-run option for the housekeep command, which is a valuable addition for previewing changes. The implementation is largely solid, adding planning logic and a new output formatter. My review includes a fix for a bug in the dry-run report's output formatting.
| would_skip = all_items.count { |i| i[ :action ] == :skip } | ||
|
|
||
| # Column widths for aligned output. | ||
| name_width = [ ( worktree_plan + stale + orphan + absorbed ).map { |i| i[ :name ].to_s.length + i[ :branch ].to_s.length }.max || 0, 28 ].min + 2 |
There was a problem hiding this comment.
The calculation for name_width is incorrect and will lead to misaligned output in the dry-run report.
- For worktree items, the label is
"#{item[:name]} (#{item[:branch]})", but the width is calculated based onitem[:name].length + item[:branch].length, which is off by 3 characters (()). - For branch items (stale, orphan, absorbed), the label is just
item[:branch], but the width is calculated usingitem[:name].length + item[:branch].length. Sincenameis the same asbranchfor these items, this incorrectly results in2 * item[:branch].length.
I've suggested a fix that correctly calculates the label lengths.
name_width = [ (worktree_plan.map { |i| "#{i[:name]} (#{i[:branch]})".length } + (stale + orphan + absorbed).map { |i| i[:branch].to_s.length }).max || 0, 28 ].min + 2The Carson template sync wiped the IndentationWidth and file exclusions that PR #266 added. Re-apply them so CI passes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The cop triggers a tab-width calculation bug for these files — the expected correction would require mixed tabs+spaces, which is unfixable with pure-tab indentation. Use inline rubocop:disable directives instead of rubocop.yml Exclude entries so that Carson's managed-template sync cannot silently remove them. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
No description provided.