fix: repair test build failures in types and sqlite packages
- Add TypeRig constant to IssueType enum - Add IsBuiltIn() method to IssueType for multi-repo hydration trust logic - Fix parseCommaSeparated -> parseCommaSeparatedList function name in test Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
d74a14d92a
commit
50a079d3b7
@@ -205,14 +205,14 @@ func TestParseCustomStatuses(t *testing.T) {
|
|||||||
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
got := parseCommaSeparated(tt.value)
|
got := parseCommaSeparatedList(tt.value)
|
||||||
if len(got) != len(tt.want) {
|
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
|
return
|
||||||
}
|
}
|
||||||
for i := range got {
|
for i := range got {
|
||||||
if got[i] != tt.want[i] {
|
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])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -474,6 +474,7 @@ const (
|
|||||||
TypeGate IssueType = "gate" // Async coordination gate
|
TypeGate IssueType = "gate" // Async coordination gate
|
||||||
TypeAgent IssueType = "agent" // Agent identity bead
|
TypeAgent IssueType = "agent" // Agent identity bead
|
||||||
TypeRole IssueType = "role" // Agent role definition
|
TypeRole IssueType = "role" // Agent role definition
|
||||||
|
TypeRig IssueType = "rig" // Rig identity bead
|
||||||
TypeConvoy IssueType = "convoy" // Cross-project tracking with reactive completion
|
TypeConvoy IssueType = "convoy" // Cross-project tracking with reactive completion
|
||||||
TypeEvent IssueType = "event" // Operational state change record
|
TypeEvent IssueType = "event" // Operational state change record
|
||||||
TypeSlot IssueType = "slot" // Exclusive access slot (merge-slot gate)
|
TypeSlot IssueType = "slot" // Exclusive access slot (merge-slot gate)
|
||||||
@@ -482,12 +483,20 @@ const (
|
|||||||
// IsValid checks if the issue type value is valid
|
// IsValid checks if the issue type value is valid
|
||||||
func (t IssueType) IsValid() bool {
|
func (t IssueType) IsValid() bool {
|
||||||
switch t {
|
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 true
|
||||||
}
|
}
|
||||||
return false
|
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.
|
// IsValidWithCustom checks if the issue type is valid, including custom types.
|
||||||
// Custom types are user-defined via bd config set types.custom "type1,type2,..."
|
// Custom types are user-defined via bd config set types.custom "type1,type2,..."
|
||||||
func (t IssueType) IsValidWithCustom(customTypes []string) bool {
|
func (t IssueType) IsValidWithCustom(customTypes []string) bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user