diff --git a/internal/storage/sqlite/validators_test.go b/internal/storage/sqlite/validators_test.go index 7d092f8f..6b371e13 100644 --- a/internal/storage/sqlite/validators_test.go +++ b/internal/storage/sqlite/validators_test.go @@ -205,14 +205,14 @@ func TestParseCustomStatuses(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := parseCommaSeparated(tt.value) + got := parseCommaSeparatedList(tt.value) if len(got) != len(tt.want) { - t.Errorf("parseCommaSeparated() = %v, want %v", got, tt.want) + t.Errorf("parseCommaSeparatedList() = %v, want %v", got, tt.want) return } for i := range got { if got[i] != tt.want[i] { - t.Errorf("parseCommaSeparated()[%d] = %v, want %v", i, got[i], tt.want[i]) + t.Errorf("parseCommaSeparatedList()[%d] = %v, want %v", i, got[i], tt.want[i]) } } }) diff --git a/internal/types/types.go b/internal/types/types.go index 856eb2dd..61a48d54 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -474,6 +474,7 @@ const ( TypeGate IssueType = "gate" // Async coordination gate TypeAgent IssueType = "agent" // Agent identity bead TypeRole IssueType = "role" // Agent role definition + TypeRig IssueType = "rig" // Rig identity bead TypeConvoy IssueType = "convoy" // Cross-project tracking with reactive completion TypeEvent IssueType = "event" // Operational state change record TypeSlot IssueType = "slot" // Exclusive access slot (merge-slot gate) @@ -482,12 +483,20 @@ const ( // IsValid checks if the issue type value is valid func (t IssueType) IsValid() bool { switch t { - case TypeBug, TypeFeature, TypeTask, TypeEpic, TypeChore, TypeMessage, TypeMergeRequest, TypeMolecule, TypeGate, TypeAgent, TypeRole, TypeConvoy, TypeEvent, TypeSlot: + case TypeBug, TypeFeature, TypeTask, TypeEpic, TypeChore, TypeMessage, TypeMergeRequest, TypeMolecule, TypeGate, TypeAgent, TypeRole, TypeRig, TypeConvoy, TypeEvent, TypeSlot: return true } return false } +// IsBuiltIn returns true if the type is a built-in type (same as IsValid). +// Used during multi-repo hydration to determine trust: +// - Built-in types: validate (catch typos) +// - Custom types (!IsBuiltIn): trust from source repo +func (t IssueType) IsBuiltIn() bool { + return t.IsValid() +} + // IsValidWithCustom checks if the issue type is valid, including custom types. // Custom types are user-defined via bd config set types.custom "type1,type2,..." func (t IssueType) IsValidWithCustom(customTypes []string) bool {