fix: Use BeadsPath() for swarm status to read from git-synced beads (gt-1rxz5)

The swarm status was stale because bd commands were running from the rig
root path instead of the mayor/rig clone which has proper beads sync config.

Changes:
- Add Rig.BeadsPath() method to return mayor/rig path when available
- Update all bd commands in swarm.go to use BeadsPath()
- Update swarm manager to use separate beadsDir and gitDir paths
- beadsDir for bd commands (git-synced location)
- gitDir for git operations and mail (rig root)

This ensures swarm status reflects the latest beads data from the
git-synced beads-sync branch instead of stale local daemon data.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-29 23:43:22 -08:00
parent deb58838ad
commit e362be3c41
5 changed files with 47 additions and 28 deletions

View File

@@ -65,3 +65,14 @@ func (r *Rig) Summary() RigSummary {
HasRefinery: r.HasRefinery,
}
}
// BeadsPath returns the path to use for beads operations.
// Returns the mayor/rig clone path if available (has proper sync-branch config),
// otherwise falls back to the rig root path.
// This ensures beads commands read from a location with git-synced beads data.
func (r *Rig) BeadsPath() string {
if r.HasMayor {
return r.Path + "/mayor/rig"
}
return r.Path
}