fix(sling): use correct beads database for rig-level beads (gt-n5gga)

When slinging rig-level beads (gt-*, bd-*, etc.), the BEADS_DIR was
unconditionally set to town beads, which could bypass the redirect-based
routing needed for these beads. This caused assignee updates to potentially
fail silently or target the wrong database.

Changes:
- sling.go: Only set BEADS_DIR for town-level (hq-*) beads; rig-level
  beads now use redirect from polecat worktree for proper routing
- convoy.go: Add --no-daemon to bd show calls to ensure fresh 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:
shiny
2026-01-05 00:21:42 -08:00
committed by Steve Yegge
parent 18578b3030
commit a5ff31428b
2 changed files with 20 additions and 9 deletions

View File

@@ -1130,8 +1130,9 @@ func getIssueDetailsBatch(issueIDs []string) map[string]*issueDetails {
return result
}
// Build args: bd show id1 id2 id3 ... --json
args := append([]string{"show"}, issueIDs...)
// Build args: bd --no-daemon show id1 id2 id3 ... --json
// Use --no-daemon to ensure fresh data (avoid stale cache from daemon)
args := append([]string{"--no-daemon", "show"}, issueIDs...)
args = append(args, "--json")
showCmd := exec.Command("bd", args...)
@@ -1177,7 +1178,8 @@ func getIssueDetailsBatch(issueIDs []string) map[string]*issueDetails {
// Prefer getIssueDetailsBatch for multiple issues to avoid N+1 subprocess calls.
func getIssueDetails(issueID string) *issueDetails {
// Use bd show with routing - it should find the issue in the right rig
showCmd := exec.Command("bd", "show", issueID, "--json")
// Use --no-daemon to ensure fresh data (avoid stale cache)
showCmd := exec.Command("bd", "--no-daemon", "show", issueID, "--json")
var stdout bytes.Buffer
showCmd.Stdout = &stdout