Migrate startup paths from SessionBeacon to StartupNudge (gt-7pp3l)
All 12 startup paths now use session.StartupNudge instead of the older SessionBeacon pattern. The key difference is that StartupNudge includes sender information, enabling better predecessor discovery via gt seance. Files updated: - crew_lifecycle.go: 3 locations (refresh, restart) - start.go: 2 locations (crew start) - deacon.go: 1 location (deacon start) - witness.go: 1 location (witness start) - up.go: 4 locations (mayor, witness, crew, polecat) - mayor.go: 1 location (mayor start) - session/manager.go: 1 location (polecat spawn) Format change: Old: [GAS TOWN] address • molID • timestamp New: [GAS TOWN] recipient <- sender • timestamp • topic[:mol-id] This completes the Agent Startup Consolidation epic (gt-85whr). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
6f1b6269b1
commit
b7c26d52e1
@@ -283,9 +283,12 @@ func ensureSession(t *tmux.Tmux, sessionName, workDir, role string) error {
|
||||
}
|
||||
time.Sleep(constants.ShutdownNotifyDelay)
|
||||
|
||||
// Inject session beacon for predecessor discovery via /resume
|
||||
beacon := session.SessionBeacon(role, "")
|
||||
_ = t.NudgeSession(sessionName, beacon) // Non-fatal
|
||||
// Inject startup nudge for predecessor discovery via /resume
|
||||
_ = session.StartupNudge(t, sessionName, session.StartupNudgeConfig{
|
||||
Recipient: role,
|
||||
Sender: "human",
|
||||
Topic: "cold-start",
|
||||
}) // Non-fatal
|
||||
}
|
||||
|
||||
return nil
|
||||
@@ -329,10 +332,13 @@ func ensureWitness(t *tmux.Tmux, sessionName, rigPath, rigName string) error {
|
||||
}
|
||||
time.Sleep(constants.ShutdownNotifyDelay)
|
||||
|
||||
// Inject session beacon for predecessor discovery via /resume
|
||||
// Inject startup nudge for predecessor discovery via /resume
|
||||
address := fmt.Sprintf("%s/witness", rigName)
|
||||
beacon := session.SessionBeacon(address, "patrol")
|
||||
_ = t.NudgeSession(sessionName, beacon) // Non-fatal
|
||||
_ = session.StartupNudge(t, sessionName, session.StartupNudgeConfig{
|
||||
Recipient: address,
|
||||
Sender: "deacon",
|
||||
Topic: "patrol",
|
||||
}) // Non-fatal
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -553,10 +559,13 @@ func ensureCrewSession(t *tmux.Tmux, sessionName, crewPath, rigName, crewName st
|
||||
}
|
||||
time.Sleep(constants.ShutdownNotifyDelay)
|
||||
|
||||
// Inject session beacon for predecessor discovery via /resume
|
||||
// Inject startup nudge for predecessor discovery via /resume
|
||||
address := fmt.Sprintf("%s/crew/%s", rigName, crewName)
|
||||
beacon := session.SessionBeacon(address, "")
|
||||
_ = t.NudgeSession(sessionName, beacon) // Non-fatal
|
||||
_ = session.StartupNudge(t, sessionName, session.StartupNudgeConfig{
|
||||
Recipient: address,
|
||||
Sender: "human",
|
||||
Topic: "cold-start",
|
||||
}) // Non-fatal
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -654,10 +663,13 @@ func ensurePolecatSession(t *tmux.Tmux, sessionName, polecatPath, rigName, polec
|
||||
}
|
||||
time.Sleep(constants.ShutdownNotifyDelay)
|
||||
|
||||
// Inject session beacon for predecessor discovery via /resume
|
||||
// Inject startup nudge for predecessor discovery via /resume
|
||||
address := fmt.Sprintf("%s/polecats/%s", rigName, polecatName)
|
||||
beacon := session.SessionBeacon(address, "")
|
||||
_ = t.NudgeSession(sessionName, beacon) // Non-fatal
|
||||
_ = session.StartupNudge(t, sessionName, session.StartupNudgeConfig{
|
||||
Recipient: address,
|
||||
Sender: "witness",
|
||||
Topic: "dispatch",
|
||||
}) // Non-fatal
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user