fix: restore Gas Town types (agent, role, rig, convoy, slot) (GH#941)
v0.46.0 removed these types breaking gt install/doctor/sling/convoy commands. This restores them as built-in types so `bd create --type=agent` works again. Fixes GH#941 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
336eaa74e3
commit
4009fc6709
@@ -442,9 +442,6 @@ func (s Status) IsValidWithCustom(customStatuses []string) bool {
|
|||||||
type IssueType string
|
type IssueType string
|
||||||
|
|
||||||
// Issue type constants
|
// Issue type constants
|
||||||
// Note: Gas Town-specific types (agent, role, rig, convoy, slot) have been removed.
|
|
||||||
// Use custom types via `bd config set types.custom "agent,role,..."` if needed.
|
|
||||||
// These types are now identified by labels (gt:agent, gt:role, etc.) instead.
|
|
||||||
const (
|
const (
|
||||||
TypeBug IssueType = "bug"
|
TypeBug IssueType = "bug"
|
||||||
TypeFeature IssueType = "feature"
|
TypeFeature IssueType = "feature"
|
||||||
@@ -455,13 +452,18 @@ const (
|
|||||||
TypeMergeRequest IssueType = "merge-request" // Merge queue entry for refinery processing
|
TypeMergeRequest IssueType = "merge-request" // Merge queue entry for refinery processing
|
||||||
TypeMolecule IssueType = "molecule" // Template molecule for issue hierarchies
|
TypeMolecule IssueType = "molecule" // Template molecule for issue hierarchies
|
||||||
TypeGate IssueType = "gate" // Async coordination gate
|
TypeGate IssueType = "gate" // Async coordination gate
|
||||||
|
TypeAgent IssueType = "agent" // Agent identity bead
|
||||||
|
TypeRole IssueType = "role" // Agent role definition
|
||||||
|
TypeRig IssueType = "rig" // Rig identity bead (project container)
|
||||||
|
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)
|
||||||
)
|
)
|
||||||
|
|
||||||
// IsValid checks if the issue type value is valid (built-in types only)
|
// IsValid checks if the issue type value is valid (built-in types only)
|
||||||
func (t IssueType) IsValid() bool {
|
func (t IssueType) IsValid() bool {
|
||||||
switch t {
|
switch t {
|
||||||
case TypeBug, TypeFeature, TypeTask, TypeEpic, TypeChore, TypeMessage, TypeMergeRequest, TypeMolecule, TypeGate, TypeEvent:
|
case TypeBug, TypeFeature, TypeTask, TypeEpic, TypeChore, TypeMessage, TypeMergeRequest, TypeMolecule, TypeGate, TypeAgent, TypeRole, TypeRig, TypeConvoy, TypeEvent, TypeSlot:
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -442,14 +442,14 @@ func TestValidateForImport(t *testing.T) {
|
|||||||
wantErr: false, // Should pass - federation trust model
|
wantErr: false, // Should pass - federation trust model
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "custom type agent is trusted",
|
name: "built-in type agent passes",
|
||||||
issue: Issue{
|
issue: Issue{
|
||||||
Title: "Test Issue",
|
Title: "Test Issue",
|
||||||
Status: StatusOpen,
|
Status: StatusOpen,
|
||||||
Priority: 1,
|
Priority: 1,
|
||||||
IssueType: IssueType("agent"), // Gas Town custom type
|
IssueType: TypeAgent, // Gas Town built-in type
|
||||||
},
|
},
|
||||||
wantErr: false, // Should pass - federation trust model
|
wantErr: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "empty type defaults to task (handled by SetDefaults)",
|
name: "empty type defaults to task (handled by SetDefaults)",
|
||||||
@@ -548,11 +548,12 @@ func TestIssueTypeIsValid(t *testing.T) {
|
|||||||
{TypeMergeRequest, true},
|
{TypeMergeRequest, true},
|
||||||
{TypeMolecule, true},
|
{TypeMolecule, true},
|
||||||
{TypeGate, true},
|
{TypeGate, true},
|
||||||
|
{TypeAgent, true},
|
||||||
|
{TypeRole, true},
|
||||||
|
{TypeRig, true},
|
||||||
|
{TypeConvoy, true},
|
||||||
{TypeEvent, true},
|
{TypeEvent, true},
|
||||||
// Gas Town types (agent, role, rig, convoy, slot) have been removed
|
{TypeSlot, true},
|
||||||
// They are now identified by labels (gt:agent, etc.) instead
|
|
||||||
{IssueType("agent"), false}, // Now requires custom type config
|
|
||||||
{IssueType("convoy"), false}, // Now requires custom type config
|
|
||||||
{IssueType("invalid"), false},
|
{IssueType("invalid"), false},
|
||||||
{IssueType(""), false},
|
{IssueType(""), false},
|
||||||
}
|
}
|
||||||
@@ -585,13 +586,16 @@ func TestIssueTypeIsBuiltIn(t *testing.T) {
|
|||||||
{TypeMergeRequest, true},
|
{TypeMergeRequest, true},
|
||||||
{TypeMolecule, true},
|
{TypeMolecule, true},
|
||||||
{TypeGate, true},
|
{TypeGate, true},
|
||||||
|
{TypeAgent, true},
|
||||||
|
{TypeRole, true},
|
||||||
|
{TypeRig, true},
|
||||||
|
{TypeConvoy, true},
|
||||||
{TypeEvent, true},
|
{TypeEvent, true},
|
||||||
|
{TypeSlot, true},
|
||||||
// Custom types (not built-in)
|
// Custom types (not built-in)
|
||||||
{IssueType("pm"), false}, // Custom type from child repo
|
{IssueType("pm"), false}, // Custom type from child repo
|
||||||
{IssueType("llm"), false}, // Custom type from child repo
|
{IssueType("llm"), false}, // Custom type from child repo
|
||||||
{IssueType("agent"), false}, // Gas Town custom type
|
{IssueType(""), false}, // Empty is not built-in
|
||||||
{IssueType("convoy"), false}, // Gas Town custom type
|
|
||||||
{IssueType(""), false}, // Empty is not built-in
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|||||||
Reference in New Issue
Block a user