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:
beads/refinery
2026-01-10 22:00:32 -08:00
committed by Steve Yegge
parent d74a14d92a
commit 50a079d3b7
2 changed files with 13 additions and 4 deletions

View File

@@ -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])
}
}
})

View File

@@ -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 {