diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-05-02 21:55:49 -1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-02 21:55:49 -1000 |
| commit | 1ec3f87c392145580a62858110d9fd10638203db (patch) | |
| tree | 2ffbc4fcf585aef8091f02b3315a3234267c5618 /internal/executor/claude.go | |
| parent | 99115d8158137083239c45e5a860b718ff4cefa1 (diff) | |
| parent | 85c3bf4d28b0903a2005356339e6ea56855b8c80 (diff) | |
Merge pull request #2 from thepeterstone/claude/post-epic-cleanup
Post-epic cleanup — green test suite, no skips
Diffstat (limited to 'internal/executor/claude.go')
| -rw-r--r-- | internal/executor/claude.go | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/internal/executor/claude.go b/internal/executor/claude.go index e3f8e1c..fa68382 100644 --- a/internal/executor/claude.go +++ b/internal/executor/claude.go @@ -117,7 +117,7 @@ func (r *ClaudeRunner) Run(ctx context.Context, t *task.Task, e *storage.Executi e.SandboxDir = "" if projectDir != "" { var err error - sandboxDir, err := setupSandbox(t.Agent.ProjectDir, r.Logger) + sandboxDir, err = setupSandbox(t.Agent.ProjectDir, r.Logger) if err != nil { return fmt.Errorf("setting up sandbox: %w", err) } @@ -129,7 +129,7 @@ func (r *ClaudeRunner) Run(ctx context.Context, t *task.Task, e *storage.Executi } } else if projectDir != "" { var err error - sandboxDir, err := setupSandbox(t.Agent.ProjectDir, r.Logger) + sandboxDir, err = setupSandbox(t.Agent.ProjectDir, r.Logger) if err != nil { return fmt.Errorf("setting up sandbox: %w", err) } @@ -226,11 +226,22 @@ func extractQuestionText(questionJSON string) string { return strings.TrimSpace(q.Text) } -// gitSafe returns git arguments that prepend "-c safe.directory=*" so that -// commands succeed regardless of the repository owner. This is needed when -// claudomator operates on project directories owned by a different OS user. +// gitSafe returns git arguments that prepend safety overrides so that +// commands succeed regardless of the repository owner or the host's global +// git configuration. Specifically: +// +// - "-c safe.directory=*" lets us operate on directories owned by a +// different OS user. +// - "-c commit.gpgsign=false" / "-c tag.gpgsign=false" stop git from +// trying to sign commits via the host's signing tooling. Sandbox commits +// are internal and don't need to be signed; an unconfigured or broken +// signing setup on the host should never block a sandbox merge. func gitSafe(args ...string) []string { - return append([]string{"-c", "safe.directory=*"}, args...) + return append([]string{ + "-c", "safe.directory=*", + "-c", "commit.gpgsign=false", + "-c", "tag.gpgsign=false", + }, args...) } // sandboxCloneSource returns the URL to clone the sandbox from. It prefers a |
