diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-15 03:39:49 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-15 03:39:49 +0000 |
| commit | 6ff67a57d72317360cacd4b41560395ded117d20 (patch) | |
| tree | 39fdc413f3c985dcf13424bbca01eb152d80e3c5 /internal/executor/gemini.go | |
| parent | 43440200facf9f7c51ba4f4638e69e7d651dd50d (diff) | |
feat: fix task failures via sandbox improvements and display commits in Web UI
- Fix ephemeral sandbox deletion issue by passing $CLAUDOMATOR_PROJECT_DIR to agents and using it for subtask project_dir.
- Implement sandbox autocommit in teardown to prevent task failures from uncommitted work.
- Track git commits created during executions and persist them in the DB.
- Display git commits and changestats badges in the Web UI execution history.
- Add badge counts to Web UI tabs for Interrupted, Ready, and Running states.
- Improve scripts/next-task to handle QUEUED tasks and configurable DB path.
Diffstat (limited to 'internal/executor/gemini.go')
| -rw-r--r-- | internal/executor/gemini.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/executor/gemini.go b/internal/executor/gemini.go index 2db3218..67ea7dd 100644 --- a/internal/executor/gemini.go +++ b/internal/executor/gemini.go @@ -68,7 +68,7 @@ func (r *GeminiRunner) Run(ctx context.Context, t *task.Task, e *storage.Executi // Gemini CLI doesn't necessarily have the same rate limiting behavior as Claude, // but we'll use a similar execution pattern. - err := r.execOnce(ctx, args, t.Agent.ProjectDir, e) + err := r.execOnce(ctx, args, t.Agent.ProjectDir, t.Agent.ProjectDir, e) if err != nil { return err } @@ -82,11 +82,12 @@ func (r *GeminiRunner) Run(ctx context.Context, t *task.Task, e *storage.Executi return nil } -func (r *GeminiRunner) execOnce(ctx context.Context, args []string, workingDir string, e *storage.Execution) error { +func (r *GeminiRunner) execOnce(ctx context.Context, args []string, workingDir, projectDir string, e *storage.Execution) error { cmd := exec.CommandContext(ctx, r.binaryPath(), args...) cmd.Env = append(os.Environ(), "CLAUDOMATOR_API_URL="+r.APIURL, "CLAUDOMATOR_TASK_ID="+e.TaskID, + "CLAUDOMATOR_PROJECT_DIR="+projectDir, "CLAUDOMATOR_QUESTION_FILE="+filepath.Join(e.ArtifactDir, "question.json"), ) cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} |
