fix(polecat): ignore .beads/ files when detecting uncommitted work

Add CleanExcludingBeads() method that returns true if the only uncommitted
changes are .beads/ database files. These files are synced across worktrees
and shouldn't block polecat cleanup.

Fixes #516

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gastown/crew/dennis
2026-01-16 15:26:22 -08:00
committed by Steve Yegge
parent f89ac47ff9
commit c7e1451ce6
2 changed files with 33 additions and 2 deletions

View File

@@ -1021,9 +1021,9 @@ func (m *Manager) DetectStalePolecats(threshold int) ([]*StalenessInfo, error) {
polecatGit := git.NewGit(p.ClonePath)
info.CommitsBehind = countCommitsBehind(polecatGit, defaultBranch)
// Check for uncommitted work
// Check for uncommitted work (excluding .beads/ files which are synced across worktrees)
status, err := polecatGit.CheckUncommittedWork()
if err == nil && !status.Clean() {
if err == nil && !status.CleanExcludingBeads() {
info.HasUncommittedWork = true
}