fix(dog): spawn session and set BD_ACTOR for dog dispatch
Recovered from reflog - these commits were lost during a rebase/force-push. Dogs are directories with state files but no sessions. When `gt dog dispatch` assigned work and sent mail, nothing executed because no session existed. Changes: 1. Spawn tmux session after dispatch (gt-<town>-deacon-<dogname>) 2. Set BD_ACTOR=deacon/dogs/<name> so dogs can find their mail 3. Add dog case to AgentEnv for proper identity Session spawn is non-blocking - if it fails, mail was sent and human can manually start the session. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -125,6 +125,23 @@ func TestAgentEnv_Boot(t *testing.T) {
|
||||
assertNotSet(t, env, "BEADS_NO_DAEMON")
|
||||
}
|
||||
|
||||
func TestAgentEnv_Dog(t *testing.T) {
|
||||
t.Parallel()
|
||||
env := AgentEnv(AgentEnvConfig{
|
||||
Role: "dog",
|
||||
AgentName: "alpha",
|
||||
TownRoot: "/town",
|
||||
})
|
||||
|
||||
assertEnv(t, env, "GT_ROLE", "dog")
|
||||
assertEnv(t, env, "BD_ACTOR", "deacon/dogs/alpha")
|
||||
assertEnv(t, env, "GIT_AUTHOR_NAME", "dog-alpha")
|
||||
assertEnv(t, env, "GIT_AUTHOR_EMAIL", "dog-alpha@gastown.local")
|
||||
assertEnv(t, env, "GT_ROOT", "/town")
|
||||
assertNotSet(t, env, "GT_RIG")
|
||||
assertNotSet(t, env, "BEADS_NO_DAEMON")
|
||||
}
|
||||
|
||||
func TestAgentEnv_WithRuntimeConfigDir(t *testing.T) {
|
||||
t.Parallel()
|
||||
env := AgentEnv(AgentEnvConfig{
|
||||
|
||||
Reference in New Issue
Block a user