blob: 5c31b4ff29c8f2af23c0120f7b049a65b3e8a126 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
package executor
import (
"strings"
"testing"
)
func TestPlanningPreamble_ContainsFinalSummarySection(t *testing.T) {
if !strings.Contains(planningPreamble, "## Final Summary (mandatory)") {
t.Error("planningPreamble missing '## Final Summary (mandatory)' heading")
}
}
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_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")
}
}
func TestPlanningPreamble_GitDiscipline_ForbidsAbsolutePaths(t *testing.T) {
// Agents must not bypass the sandbox by using absolute project paths in git commands.
if !strings.Contains(planningPreamble, "do NOT use absolute paths") {
t.Error("planningPreamble should warn agents not to use absolute paths in git commands")
}
}
|