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:
@@ -87,14 +87,13 @@ func TestIsTownLevelAddress(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAddressToSessionID(t *testing.T) {
|
||||
townName := "ai"
|
||||
tests := []struct {
|
||||
address string
|
||||
want string
|
||||
}{
|
||||
{"mayor", "gt-ai-mayor"},
|
||||
{"mayor/", "gt-ai-mayor"},
|
||||
{"deacon", "gt-ai-deacon"},
|
||||
{"mayor", "gt-mayor"},
|
||||
{"mayor/", "gt-mayor"},
|
||||
{"deacon", "gt-deacon"},
|
||||
{"gastown/refinery", "gt-gastown-refinery"},
|
||||
{"gastown/Toast", "gt-gastown-Toast"},
|
||||
{"beads/witness", "gt-beads-witness"},
|
||||
@@ -105,9 +104,9 @@ func TestAddressToSessionID(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.address, func(t *testing.T) {
|
||||
got := addressToSessionID(tt.address, townName)
|
||||
got := addressToSessionID(tt.address)
|
||||
if got != tt.want {
|
||||
t.Errorf("addressToSessionID(%q, %q) = %q, want %q", tt.address, townName, got, tt.want)
|
||||
t.Errorf("addressToSessionID(%q) = %q, want %q", tt.address, got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user