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:
joe
2026-01-03 14:33:24 -08:00
committed by Steve Yegge
parent d3e47221ac
commit 4bcf50bf1c
23 changed files with 117 additions and 267 deletions

View File

@@ -5,10 +5,10 @@ import (
)
func TestResolveNudgePattern(t *testing.T) {
// Create test agent sessions
// Create test agent sessions (no Town field for mayor/deacon anymore)
agents := []*AgentSession{
{Name: "gt-ai-mayor", Type: AgentMayor, Town: "ai"},
{Name: "gt-ai-deacon", Type: AgentDeacon, Town: "ai"},
{Name: "gt-mayor", Type: AgentMayor},
{Name: "gt-deacon", Type: AgentDeacon},
{Name: "gt-gastown-witness", Type: AgentWitness, Rig: "gastown"},
{Name: "gt-gastown-refinery", Type: AgentRefinery, Rig: "gastown"},
{Name: "gt-gastown-crew-max", Type: AgentCrew, Rig: "gastown", AgentName: "max"},
@@ -27,12 +27,12 @@ func TestResolveNudgePattern(t *testing.T) {
{
name: "mayor special case",
pattern: "mayor",
expected: []string{"gt-ai-mayor"},
expected: []string{"gt-mayor"},
},
{
name: "deacon special case",
pattern: "deacon",
expected: []string{"gt-ai-deacon"},
expected: []string{"gt-deacon"},
},
{
name: "specific witness",
@@ -86,10 +86,9 @@ func TestResolveNudgePattern(t *testing.T) {
},
}
townName := "ai"
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := resolveNudgePattern(tt.pattern, agents, townName)
got := resolveNudgePattern(tt.pattern, agents)
if len(got) != len(tt.expected) {
t.Errorf("resolveNudgePattern(%q) returned %d results, want %d: got %v, want %v",