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:
@@ -9,7 +9,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/steveyegge/gastown/internal/session"
|
||||
"github.com/steveyegge/gastown/internal/workspace"
|
||||
)
|
||||
|
||||
// LifecycleHygieneCheck detects and cleans up stale lifecycle state.
|
||||
@@ -243,12 +242,7 @@ func (c *LifecycleHygieneCheck) isSessionHealthy(identity, townRoot string) bool
|
||||
func identityToSessionName(identity, townRoot string) string {
|
||||
switch identity {
|
||||
case "mayor":
|
||||
if townRoot != "" {
|
||||
if townName, err := workspace.GetTownName(townRoot); err == nil {
|
||||
return session.MayorSessionName(townName)
|
||||
}
|
||||
}
|
||||
return "" // Cannot generate session name without town root
|
||||
return session.MayorSessionName()
|
||||
default:
|
||||
if strings.HasSuffix(identity, "-witness") ||
|
||||
strings.HasSuffix(identity, "-refinery") ||
|
||||
|
||||
@@ -10,7 +10,6 @@ import (
|
||||
|
||||
"github.com/steveyegge/gastown/internal/session"
|
||||
"github.com/steveyegge/gastown/internal/tmux"
|
||||
"github.com/steveyegge/gastown/internal/workspace"
|
||||
)
|
||||
|
||||
// OrphanSessionCheck detects orphaned tmux sessions that don't match
|
||||
@@ -57,12 +56,9 @@ func (c *OrphanSessionCheck) Run(ctx *CheckContext) *CheckResult {
|
||||
// Get list of valid rigs
|
||||
validRigs := c.getValidRigs(ctx.TownRoot)
|
||||
|
||||
// Get dynamic session names for mayor/deacon
|
||||
var mayorSession, deaconSession string
|
||||
if townName, err := workspace.GetTownName(ctx.TownRoot); err == nil {
|
||||
mayorSession = session.MayorSessionName(townName)
|
||||
deaconSession = session.DeaconSessionName(townName)
|
||||
}
|
||||
// Get session names for mayor/deacon
|
||||
mayorSession := session.MayorSessionName()
|
||||
deaconSession := session.DeaconSessionName()
|
||||
|
||||
// Check each session
|
||||
var orphans []string
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
"github.com/steveyegge/gastown/internal/session"
|
||||
"github.com/steveyegge/gastown/internal/tmux"
|
||||
"github.com/steveyegge/gastown/internal/workspace"
|
||||
)
|
||||
|
||||
// LinkedPaneCheck detects tmux sessions that share panes,
|
||||
@@ -86,11 +85,7 @@ func (c *LinkedPaneCheck) Run(ctx *CheckContext) *CheckResult {
|
||||
}
|
||||
|
||||
// Cache for Fix (exclude mayor session since we don't want to kill it)
|
||||
// Get dynamic mayor session name
|
||||
var mayorSession string
|
||||
if townName, err := workspace.GetTownName(ctx.TownRoot); err == nil {
|
||||
mayorSession = session.MayorSessionName(townName)
|
||||
}
|
||||
mayorSession := session.MayorSessionName()
|
||||
|
||||
c.linkedSessions = nil
|
||||
for sess := range linkedSessionSet {
|
||||
|
||||
Reference in New Issue
Block a user