fix: gt commands follow .beads/redirect for shared beads (gt-ln5af)
Added ResolveBeadsDir() helper that follows .beads/redirect files, enabling crew workers and polecats to properly access shared beads. Updated callers: - mailbox.go: NewMailboxFromAddress follows redirect - catalog.go: LoadCatalog follows redirect at all levels - doctor checks: beads_check, patrol_check, wisp_check follow redirect Also added comprehensive tests for the redirect resolution logic. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/steveyegge/gastown/internal/beads"
|
||||
"github.com/steveyegge/gastown/internal/config"
|
||||
)
|
||||
|
||||
@@ -262,7 +263,10 @@ func (c *PatrolNotStuckCheck) Run(ctx *CheckContext) *CheckResult {
|
||||
var stuckWisps []string
|
||||
for _, rigName := range rigs {
|
||||
// Check main beads database for wisps (issues with Wisp=true)
|
||||
beadsPath := filepath.Join(ctx.TownRoot, rigName, ".beads", "issues.jsonl")
|
||||
// Follows redirect if present (rig root may redirect to mayor/rig/.beads)
|
||||
rigPath := filepath.Join(ctx.TownRoot, rigName)
|
||||
beadsDir := beads.ResolveBeadsDir(rigPath)
|
||||
beadsPath := filepath.Join(beadsDir, "issues.jsonl")
|
||||
stuck := c.checkStuckWisps(beadsPath, rigName)
|
||||
stuckWisps = append(stuckWisps, stuck...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user