From 8eec694dd065f95afebd1991bcdbfc0a1375ac45 Mon Sep 17 00:00:00 2001 From: Stefan Haubold Date: Fri, 6 Mar 2026 15:00:58 +0100 Subject: [PATCH 1/2] make the E2E test more explicit so agents decide not to do just 2 instead of 3 commits Entire-Checkpoint: 3d240d908ecb --- e2e/tests/edge_cases_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/e2e/tests/edge_cases_test.go b/e2e/tests/edge_cases_test.go index 5ea601ba1a..6fa0418653 100644 --- a/e2e/tests/edge_cases_test.go +++ b/e2e/tests/edge_cases_test.go @@ -129,7 +129,11 @@ func TestDirtyWorkingTree(t *testing.T) { func TestRapidSequentialCommits(t *testing.T) { testutil.ForEachAgent(t, 4*time.Minute, func(t *testing.T, s *testutil.RepoState, ctx context.Context) { _, err := s.RunPrompt(t, ctx, - "create three separate markdown files: docs/red.md about red, docs/blue.md about blue, docs/green.md about green. Commit each file separately right after creating it — three separate git commits. Do not ask for confirmation, just make the changes.", + "Do these steps in exact order: "+ + "(1) Create docs/red.md with a paragraph about the colour red. Run: git add docs/red.md && git commit -m 'Add red.md'. "+ + "(2) Create docs/blue.md with a paragraph about the colour blue. Run: git add docs/blue.md && git commit -m 'Add blue.md'. "+ + "(3) Create docs/green.md with a paragraph about the colour green. Run: git add docs/green.md && git commit -m 'Add green.md'. "+ + "Do not ask for confirmation, just execute each step.", agents.WithPromptTimeout(120*time.Second)) if err != nil { t.Fatalf("agent failed: %v", err) From e6abfda699e01d5cbbdd46cb8450f4f30ddc3f5c Mon Sep 17 00:00:00 2001 From: Stefan Haubold Date: Fri, 6 Mar 2026 15:30:39 +0100 Subject: [PATCH 2/2] Vogon agent commit Entire-Checkpoint: 521936526b23 --- CLAUDE.md | 1 + e2e/vogon/main.go | 39 +++++++++++++++++++++++++++++++++------ 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index b011c07530..e3ccfd519f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -62,6 +62,7 @@ mise run test:e2e:canary TestFoo # Run a specific test - **If a canary test fails, the bug is in the CLI or test infrastructure**, not in an agent - Located in `e2e/vogon/` (binary) and `cmd/entire/cli/agent/vogon/` (Agent interface) - The binary parses prompts via regex, creates/modifies/deletes files, and fires lifecycle hooks +- **IMPORTANT: When changing E2E test prompt wording**, the Vogon binary (`e2e/vogon/main.go`) parses prompts with hardcoded regexes. New phrasing may not match existing patterns — always run `mise run test:e2e:canary` after changing prompt text and fix Vogon's parsing if tests fail. ### Running E2E Tests (Only When Explicitly Requested) diff --git a/e2e/vogon/main.go b/e2e/vogon/main.go index 54d8e03af2..759e55845d 100644 --- a/e2e/vogon/main.go +++ b/e2e/vogon/main.go @@ -290,31 +290,58 @@ func parseNumberedSteps(prompt string) []action { var actions []action for _, step := range steps { - // Explicit git command: "Run: git add ... && git commit ..." - if explicitGitRe.MatchString(step) { - actions = append(actions, action{kind: "commit"}) - continue - } + hasExplicitGit := explicitGitRe.MatchString(step) - // Create file with optional inline content + // Create file with optional inline content. + // Try the full "create ... file ... " regex first, then fall back + // to "Create " (any file path after a Create verb). if m := createFileRe.FindStringSubmatch(step); m != nil { content := fmt.Sprintf("# %s\n\nGenerated content.\n", m[1]) if ic := inlineContentRe.FindStringSubmatch(step); ic != nil { content = ic[1] + "\n" } actions = append(actions, action{kind: "create", path: m[1], content: content}) + if hasExplicitGit { + actions = append(actions, action{kind: "commit"}) + } continue } + if strings.HasPrefix(strings.ToLower(strings.TrimSpace(step)), "create") { + if m := anyFileRe.FindStringSubmatch(step); m != nil { + topic := extractTopic(step) + content := fmt.Sprintf("# %s\n\nA paragraph about %s.\n", topic, topic) + if ic := inlineContentRe.FindStringSubmatch(step); ic != nil { + content = ic[1] + "\n" + } + actions = append(actions, action{kind: "create", path: m[1], content: content}) + if hasExplicitGit { + actions = append(actions, action{kind: "commit"}) + } + continue + } + } // Modify file if m := modifyFileRe.FindStringSubmatch(step); m != nil { actions = append(actions, action{kind: "modify", path: m[1], content: "// Modified by vogon agent\n"}) + if hasExplicitGit { + actions = append(actions, action{kind: "commit"}) + } continue } // Delete file if m := deleteFileRe.FindStringSubmatch(step); m != nil { actions = append(actions, action{kind: "delete", path: m[1]}) + if hasExplicitGit { + actions = append(actions, action{kind: "commit"}) + } + continue + } + + // Explicit git command without a file operation in this step + if hasExplicitGit { + actions = append(actions, action{kind: "commit"}) continue }