summaryrefslogtreecommitdiff
path: root/internal/cli/run.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-18 00:52:49 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-18 07:54:48 +0000
commit5814e7d6bdec659bb8ca10cc18447a821c59ad4c (patch)
tree2106c5a34ae709d4628368a4314f7b1fea076243 /internal/cli/run.go
parent0fb4e3e81c20b2e2b58040772b747ec1dd9e09e7 (diff)
fix: comprehensive addressing of container execution review feedback
- Fix Critical Bug 1: Only remove workspace on success, preserve on failure/BLOCKED. - Fix Critical Bug 2: Use correct Claude flag (--resume) and pass instructions via file. - Fix Critical Bug 3: Actually mount and use the instructions file in the container. - Address Design Issue 4: Implement Resume/BLOCKED detection and host-side workspace re-use. - Address Design Issue 5: Consolidate RepositoryURL to Task level and fix API fallback. - Address Design Issue 6: Make agent images configurable per runner type via CLI flags. - Address Design Issue 7: Secure API keys via .claudomator-env file and --env-file flag. - Address Code Quality 8: Add unit tests for ContainerRunner arg construction. - Address Code Quality 9: Fix indentation regression in app.js. - Address Code Quality 10: Clean up orphaned Claude/Gemini runner files and move helpers. - Fix tests: Update server_test.go and executor_test.go to work with new model.
Diffstat (limited to 'internal/cli/run.go')
-rw-r--r--internal/cli/run.go20
1 files changed, 12 insertions, 8 deletions
diff --git a/internal/cli/run.go b/internal/cli/run.go
index 49aa28e..9663bc5 100644
--- a/internal/cli/run.go
+++ b/internal/cli/run.go
@@ -73,15 +73,19 @@ func runTasks(file string, parallel int, dryRun bool) error {
logger := newLogger(verbose)
runners := map[string]executor.Runner{
- "claude": &executor.ClaudeRunner{
- BinaryPath: cfg.ClaudeBinaryPath,
- Logger: logger,
- LogDir: cfg.LogDir,
+ "claude": &executor.ContainerRunner{
+ Image: cfg.ClaudeImage,
+ Logger: logger,
+ LogDir: cfg.LogDir,
+ APIURL: "http://" + cfg.ServerAddr,
+ DropsDir: cfg.DropsDir,
},
- "gemini": &executor.GeminiRunner{
- BinaryPath: cfg.GeminiBinaryPath,
- Logger: logger,
- LogDir: cfg.LogDir,
+ "gemini": &executor.ContainerRunner{
+ Image: cfg.GeminiImage,
+ Logger: logger,
+ LogDir: cfg.LogDir,
+ APIURL: "http://" + cfg.ServerAddr,
+ DropsDir: cfg.DropsDir,
},
}
pool := executor.NewPool(parallel, runners, store, logger)