Revert to simple gt-mayor/gt-deacon session names
Reverts the session naming changes from PR #70. Multi-town support on a single machine is not a real use case - rigs provide project isolation, and true isolation should use containers/VMs. Changes: - MayorSessionName() and DeaconSessionName() no longer take townName parameter - ParseSessionName() handles simple gt-mayor and gt-deacon formats - Removed Town field from AgentIdentity and AgentSession structs - Updated all callers and tests Generated with Claude Code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,42 +8,20 @@ import (
|
||||
)
|
||||
|
||||
func TestMayorSessionName(t *testing.T) {
|
||||
tests := []struct {
|
||||
townName string
|
||||
want string
|
||||
}{
|
||||
{"ai", "gt-ai-mayor"},
|
||||
{"alpha", "gt-alpha-mayor"},
|
||||
{"gastown", "gt-gastown-mayor"},
|
||||
{"", "gt--mayor"}, // empty town name
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.townName, func(t *testing.T) {
|
||||
got := MayorSessionName(tt.townName)
|
||||
if got != tt.want {
|
||||
t.Errorf("MayorSessionName(%q) = %q, want %q", tt.townName, got, tt.want)
|
||||
}
|
||||
})
|
||||
// Mayor session name is now fixed (one per machine)
|
||||
want := "gt-mayor"
|
||||
got := MayorSessionName()
|
||||
if got != want {
|
||||
t.Errorf("MayorSessionName() = %q, want %q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDeaconSessionName(t *testing.T) {
|
||||
tests := []struct {
|
||||
townName string
|
||||
want string
|
||||
}{
|
||||
{"ai", "gt-ai-deacon"},
|
||||
{"alpha", "gt-alpha-deacon"},
|
||||
{"gastown", "gt-gastown-deacon"},
|
||||
{"", "gt--deacon"}, // empty town name
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.townName, func(t *testing.T) {
|
||||
got := DeaconSessionName(tt.townName)
|
||||
if got != tt.want {
|
||||
t.Errorf("DeaconSessionName(%q) = %q, want %q", tt.townName, got, tt.want)
|
||||
}
|
||||
})
|
||||
// Deacon session name is now fixed (one per machine)
|
||||
want := "gt-deacon"
|
||||
got := DeaconSessionName()
|
||||
if got != want {
|
||||
t.Errorf("DeaconSessionName() = %q, want %q", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user