fix(convoy): ensure custom types registered before creating convoy
Call beads.EnsureCustomTypes before attempting to create a convoy. This fixes invalid issue type: convoy errors that occur when town beads do not have custom types configured (e.g., incomplete install or manually initialized beads). The EnsureCustomTypes function uses caching (in-memory + sentinel file) so this adds negligible overhead to convoy create. Fixes: gt-1b8eg9 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -309,6 +309,12 @@ func runConvoyCreate(cmd *cobra.Command, args []string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Ensure custom types (including 'convoy') are registered in town beads.
|
||||
// This handles cases where install didn't complete or beads was initialized manually.
|
||||
if err := beads.EnsureCustomTypes(townBeads); err != nil {
|
||||
return fmt.Errorf("ensuring custom types: %w", err)
|
||||
}
|
||||
|
||||
// Create convoy issue in town beads
|
||||
description := fmt.Sprintf("Convoy tracking %d issues", len(trackedIssues))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user