fix(sling): allow auto-attach mol-polecat-work on open polecat beads

This commit is contained in:
benzene
2026-01-20 14:00:13 +13:00
committed by Steve Yegge
parent 5218102f49
commit 195ecf7578
2 changed files with 9 additions and 3 deletions

View File

@@ -158,8 +158,12 @@ func (b *Beads) AttachMolecule(pinnedBeadID, moleculeID string) (*Issue, error)
return nil, fmt.Errorf("fetching pinned bead: %w", err)
}
// Allow pinned beads OR open polecat agent beads (polecats have a lifecycle, not permanent)
if issue.Status != StatusPinned {
return nil, fmt.Errorf("issue %s is not pinned (status: %s)", pinnedBeadID, issue.Status)
_, role, _, ok := ParseAgentBeadID(pinnedBeadID)
if !(issue.Status == "open" && ok && role == "polecat") {
return nil, fmt.Errorf("issue %s is not pinned or open polecat (status: %s)", pinnedBeadID, issue.Status)
}
}
// Build attachment fields with current timestamp