fix: auto mode gets stuck in validation loop on pre-existing test failures#245
fix: auto mode gets stuck in validation loop on pre-existing test failures#245rubenmarcus merged 2 commits intomainfrom
Conversation
…lures (#209) Three targeted fixes for the validation loop issue: 1. Skip test commands in auto mode validation — only run build/lint to avoid infinite loops on pre-existing test failures the agent can't fix. Tests remain opt-in via --validate in non-auto mode. 2. Clean .ralph/ directory between batch tasks — prevents stale iteration logs and activity data from previous tasks bleeding into the next one. 3. Set skipPlanInstructions in auto mode — avoids conflicting instructions where context-builder says "study IMPLEMENTATION_PLAN.md" but task-executor says "do NOT implement items from IMPLEMENTATION_PLAN.md". Closes #209 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✔️ Bundle Size Analysis
Bundle breakdown |
Greptile SummaryThis PR addresses the auto mode validation loop issue with three targeted fixes. The changes skip test commands during auto mode validation (keeping only build/lint checks), clean the Key Changes:
The implementation is clean, focused, and directly addresses the root cause without over-engineering. Confidence Score: 5/5
Important Files Changed
Last reviewed commit: 5707243 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5707243592
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Address reviewer feedback: - Codex P1: only skip test validation in batch-auto mode (not fix command) - Codex P2: clean only transient .ralph files, preserve config.yaml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77040cbfc1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Three targeted fixes for the auto mode validation loop issue:
Skip test commands in auto mode — only run build/lint validation. Pre-existing test failures (e.g., missing
jsdomdep) would cause infinite loops where the agent keeps trying to fix unrelated tests. Tests remain available via--validatein non-auto mode.Clean
.ralph/between batch tasks — prevents stale iteration logs and activity data from previous tasks contaminating the next task's context.Set
skipPlanInstructionsin auto mode — resolves conflicting instructions where context-builder says "study IMPLEMENTATION_PLAN.md" but task-executor says "do NOT implement items from IMPLEMENTATION_PLAN.md".Root Cause
When auto mode runs
npm testand tests fail due to pre-existing structural issues (missing dependencies, wrong test environments), the agent enters an infinite loop trying to fix unfixable tests instead of moving on after completing the implementation.Test plan
ralph-starter autoon a project with pre-existing test failures — should complete tasks without looping.ralph/is clean at the start of each taskCloses #209
🤖 Generated with Claude Code