fix(sling): Format cross-rig beads as external refs in convoy tracking
When creating auto-convoys for cross-rig beads (e.g., gt-xxx or gu-xxx), the tracking relation was failing because bd couldn't resolve the bead ID from HQ context. Now formats non-HQ beads as external:prefix:id for proper resolution. Fixes convoy tracking for cross-rig sling operations.
This commit is contained in:
committed by
akatz-ai
parent
86c4ea2fa6
commit
e11bcb931e
@@ -1240,7 +1240,16 @@ func createAutoConvoy(beadID, beadTitle string) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add tracking relation: convoy tracks the issue
|
// Add tracking relation: convoy tracks the issue
|
||||||
depArgs := []string{"dep", "add", convoyID, beadID, "--type=tracks"}
|
// Format cross-prefix beads as external refs so bd can resolve them
|
||||||
|
trackBeadID := beadID
|
||||||
|
if !strings.HasPrefix(beadID, "hq-") {
|
||||||
|
parts := strings.SplitN(beadID, "-", 3)
|
||||||
|
if len(parts) >= 2 {
|
||||||
|
rigPrefix := parts[0] + "-" + parts[1]
|
||||||
|
trackBeadID = fmt.Sprintf("external:%s:%s", rigPrefix, beadID)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
depArgs := []string{"dep", "add", convoyID, trackBeadID, "--type=tracks"}
|
||||||
depCmd := exec.Command("bd", depArgs...)
|
depCmd := exec.Command("bd", depArgs...)
|
||||||
depCmd.Dir = townBeads
|
depCmd.Dir = townBeads
|
||||||
depCmd.Stderr = os.Stderr
|
depCmd.Stderr = os.Stderr
|
||||||
@@ -1278,10 +1287,10 @@ func runBatchSling(beadIDs []string, rigName string, townBeadsDir string) error
|
|||||||
|
|
||||||
// Track results for summary
|
// Track results for summary
|
||||||
type slingResult struct {
|
type slingResult struct {
|
||||||
beadID string
|
beadID string
|
||||||
polecat string
|
polecat string
|
||||||
success bool
|
success bool
|
||||||
errMsg string
|
errMsg string
|
||||||
}
|
}
|
||||||
results := make([]slingResult, 0, len(beadIDs))
|
results := make([]slingResult, 0, len(beadIDs))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user