refactor(types): remove Gas Town type constants from beads core (bd-w2zz4)
Remove Gas Town-specific type constants (TypeMolecule, TypeGate, TypeConvoy, TypeMergeRequest, TypeSlot, TypeAgent, TypeRole, TypeRig, TypeEvent, TypeMessage) from internal/types/types.go. Beads now only has core work types built-in: - bug, feature, task, epic, chore All Gas Town types are now purely custom types with no special handling in beads. Use string literals like "gate" or "molecule" when needed, and configure types.custom in config.yaml for validation. Changes: - Remove Gas Town type constants from types.go - Remove mr/mol aliases from Normalize() - Update bd types command to only show core types - Replace all constant usages with string literals throughout codebase - Update tests to use string literals This decouples beads from Gas Town, making it a generic issue tracker. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -51,7 +51,7 @@ func TestClient_GateLifecycleAndShutdown(t *testing.T) {
|
||||
if err := json.Unmarshal(showResp.Data, &gate); err != nil {
|
||||
t.Fatalf("unmarshal GateShow: %v", err)
|
||||
}
|
||||
if gate.ID != created.ID || gate.IssueType != types.TypeGate {
|
||||
if gate.ID != created.ID || gate.IssueType != "gate" {
|
||||
t.Fatalf("unexpected gate: %+v", gate)
|
||||
}
|
||||
|
||||
|
||||
@@ -2053,7 +2053,7 @@ func (s *Server) handleGateCreate(req *Request) Response {
|
||||
// Create gate issue
|
||||
gate := &types.Issue{
|
||||
Title: args.Title,
|
||||
IssueType: types.TypeGate,
|
||||
IssueType: "gate",
|
||||
Status: types.StatusOpen,
|
||||
Priority: 1, // Gates are typically high priority
|
||||
Assignee: "deacon/",
|
||||
@@ -2104,7 +2104,7 @@ func (s *Server) handleGateList(req *Request) Response {
|
||||
ctx := s.reqCtx(req)
|
||||
|
||||
// Build filter for gates
|
||||
gateType := types.TypeGate
|
||||
gateType := types.IssueType("gate")
|
||||
filter := types.IssueFilter{
|
||||
IssueType: &gateType,
|
||||
}
|
||||
@@ -2169,7 +2169,7 @@ func (s *Server) handleGateShow(req *Request) Response {
|
||||
Error: fmt.Sprintf("gate %s not found", gateID),
|
||||
}
|
||||
}
|
||||
if gate.IssueType != types.TypeGate {
|
||||
if gate.IssueType != "gate" {
|
||||
return Response{
|
||||
Success: false,
|
||||
Error: fmt.Sprintf("%s is not a gate (type: %s)", gateID, gate.IssueType),
|
||||
@@ -2225,7 +2225,7 @@ func (s *Server) handleGateClose(req *Request) Response {
|
||||
Error: fmt.Sprintf("gate %s not found", gateID),
|
||||
}
|
||||
}
|
||||
if gate.IssueType != types.TypeGate {
|
||||
if gate.IssueType != "gate" {
|
||||
return Response{
|
||||
Success: false,
|
||||
Error: fmt.Sprintf("%s is not a gate (type: %s)", gateID, gate.IssueType),
|
||||
@@ -2304,7 +2304,7 @@ func (s *Server) handleGateWait(req *Request) Response {
|
||||
Error: fmt.Sprintf("gate %s not found", gateID),
|
||||
}
|
||||
}
|
||||
if gate.IssueType != types.TypeGate {
|
||||
if gate.IssueType != "gate" {
|
||||
return Response{
|
||||
Success: false,
|
||||
Error: fmt.Sprintf("%s is not a gate (type: %s)", gateID, gate.IssueType),
|
||||
|
||||
Reference in New Issue
Block a user