summaryrefslogtreecommitdiff
path: root/internal/executor/preamble_test.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-13 05:24:20 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-13 05:24:20 +0000
commitfb0e4b44393bae3c54f099bea87dfea19854d058 (patch)
tree4c3112f2a05ee91773c5d045207a11a85c72f8e2 /internal/executor/preamble_test.go
parentfe414fac958330c2302d9175d66e1b338e5b1864 (diff)
fix: enable Gemini file writing by passing --yolo and -p flags
GeminiRunner.buildArgs was missing --yolo (auto-approve all tools) so the gemini CLI only registered 3 tools (read_file, write_todos, cli_help) and write_file was not available. Agents that needed to create files silently failed (exit 0, no files written). Also switch instructions from bare positional arg to -p flag, which is required for non-interactive headless mode. Update preamble tests to match file-based summary approach (CLAUDOMATOR_SUMMARY_FILE) kept from the merge conflict resolution. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/executor/preamble_test.go')
-rw-r--r--internal/executor/preamble_test.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/internal/executor/preamble_test.go b/internal/executor/preamble_test.go
index 448ad3a..984f786 100644
--- a/internal/executor/preamble_test.go
+++ b/internal/executor/preamble_test.go
@@ -11,16 +11,14 @@ func TestPlanningPreamble_ContainsFinalSummarySection(t *testing.T) {
}
}
-func TestPlanningPreamble_SummaryRequiresMarkdownHeader(t *testing.T) {
- if !strings.Contains(planningPreamble, `Start it with "## Summary"`) {
- t.Error("planningPreamble does not instruct agent to start summary with '## Summary'")
+func TestPlanningPreamble_SummaryUsesFileEnvVar(t *testing.T) {
+ if !strings.Contains(planningPreamble, "CLAUDOMATOR_SUMMARY_FILE") {
+ t.Error("planningPreamble should instruct agent to write summary to $CLAUDOMATOR_SUMMARY_FILE")
}
}
-func TestPlanningPreamble_SummaryDescribesRequiredContent(t *testing.T) {
- for _, phrase := range []string{"What was accomplished", "Key decisions made", "Any issues or follow-ups"} {
- if !strings.Contains(planningPreamble, phrase) {
- t.Errorf("planningPreamble missing required summary content description: %q", phrase)
- }
+func TestPlanningPreamble_SummaryInstructsEchoToFile(t *testing.T) {
+ if !strings.Contains(planningPreamble, `"$CLAUDOMATOR_SUMMARY_FILE"`) {
+ t.Error("planningPreamble should show example of writing to $CLAUDOMATOR_SUMMARY_FILE via echo")
}
}