Set GIT_AUTHOR_NAME per agent session (gt-6r18e.1)
Export GIT_AUTHOR_NAME alongside BD_ACTOR in all agent session startup locations. This enables git log --author queries for agent work while keeping GIT_AUTHOR_EMAIL as the workspace owner. Files updated: - internal/session/manager.go (polecat sessions) - internal/daemon/daemon.go (deacon, witness, polecat via daemon) - internal/daemon/lifecycle.go (polecat lifecycle) - internal/cmd/*.go (crew, mayor, deacon, witness, refinery, up, handoff) - internal/session/manager_test.go (updated test expectations) - docs/federation.md (marked feature as implemented) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -178,8 +178,8 @@ func (m *Manager) Start(polecat string, opts StartOptions) error {
|
||||
// Polecats run with full permissions - Gas Town is for grownups
|
||||
// Export env vars inline so Claude's role detection works
|
||||
bdActor := fmt.Sprintf("%s/polecats/%s", m.rig.Name, polecat)
|
||||
command = fmt.Sprintf("export GT_ROLE=polecat GT_RIG=%s GT_POLECAT=%s BD_ACTOR=%s && claude --dangerously-skip-permissions",
|
||||
m.rig.Name, polecat, bdActor)
|
||||
command = fmt.Sprintf("export GT_ROLE=polecat GT_RIG=%s GT_POLECAT=%s BD_ACTOR=%s GIT_AUTHOR_NAME=%s && claude --dangerously-skip-permissions",
|
||||
m.rig.Name, polecat, bdActor, bdActor)
|
||||
}
|
||||
if err := m.tmux.SendKeys(sessionID, command); err != nil {
|
||||
return fmt.Errorf("sending command: %w", err)
|
||||
|
||||
@@ -163,7 +163,7 @@ func TestPolecatCommandFormat(t *testing.T) {
|
||||
expectedBdActor := "gastown/polecats/Toast"
|
||||
|
||||
// Build the expected command format (mirrors Start() logic)
|
||||
expectedPrefix := "export GT_ROLE=polecat GT_RIG=" + rigName + " GT_POLECAT=" + polecatName + " BD_ACTOR=" + expectedBdActor
|
||||
expectedPrefix := "export GT_ROLE=polecat GT_RIG=" + rigName + " GT_POLECAT=" + polecatName + " BD_ACTOR=" + expectedBdActor + " GIT_AUTHOR_NAME=" + expectedBdActor
|
||||
expectedSuffix := "&& claude --dangerously-skip-permissions"
|
||||
|
||||
// The command must contain all required env exports
|
||||
@@ -173,6 +173,7 @@ func TestPolecatCommandFormat(t *testing.T) {
|
||||
"GT_RIG=" + rigName,
|
||||
"GT_POLECAT=" + polecatName,
|
||||
"BD_ACTOR=" + expectedBdActor,
|
||||
"GIT_AUTHOR_NAME=" + expectedBdActor,
|
||||
"claude --dangerously-skip-permissions",
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user