Harden worker federation and operator UI
This commit is contained in:
@@ -178,6 +178,26 @@ func TestCodexActivityMarksScriptErrorAsFailure(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCodexActivityPreservesAllCommandsInAScript(t *testing.T) {
|
||||
path := writeJSONL(t, []string{
|
||||
codexExecCallLine(t, "c1", `const test = await tools.exec_command({cmd:"go test ./..."}); const commit = await tools.exec_command({cmd:"git commit -am done"}); text(test.output); text(commit.output)`),
|
||||
codexExecOutputLine(t, "c1", "Script completed"),
|
||||
})
|
||||
calls, err := CodexActivity(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(calls) != 2 {
|
||||
t.Fatalf("calls=%+v, want both commands", calls)
|
||||
}
|
||||
if calls[0].Key != "go test ./..." || calls[1].Key != "git commit -am done" || !calls[0].Success || !calls[1].Success {
|
||||
t.Fatalf("calls=%+v, want successful commands in source order", calls)
|
||||
}
|
||||
if !DetectMilestone(calls) {
|
||||
t.Fatalf("want the later successful git commit to be a milestone")
|
||||
}
|
||||
}
|
||||
|
||||
func TestDetectThrashConsecutiveTestFailures(t *testing.T) {
|
||||
calls := []ToolCall{
|
||||
{Name: "Bash", Kind: "command", Key: "go test ./...", Success: false, IsTest: true},
|
||||
|
||||
Reference in New Issue
Block a user