fix: interrupted runs no longer report as passed#42
Conversation
Ctrl+C during a run would falsely report "Run PASSED" because all_passed only checked collected outcomes (which were all passing since remaining steps were skipped). Now checks the interrupted flag in both the outcome computation and the summary display. Also removes hardcoded --no-session-persistence from the Claude Code adapter, allowing it to be configured via agent_args instead.
There was a problem hiding this comment.
Interrupted-run reporting and Claude args were updated; Claude met the goal but committed an unrelated file deletion
@codesoda you can check your private coaching feedback here.
If this review was useful, please react with 👍 below. Otherwise, react with 👎.
There was a problem hiding this comment.
Pull request overview
Fixes the CLI’s handling of Ctrl+C interruptions so interrupted runs no longer report as passed, and adjusts provider argument defaults.
Changes:
- Make interrupted runs report
INTERRUPTED(notPASSED) and return exit code5. - Update executor pass/fail aggregation to treat interrupted runs as non-passing.
- Remove hardcoded
--no-session-persistencefrom the Claude Code adapter and document changes in the changelog.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.rs | Uses EXIT_INTERRUPTED when the global Ctrl+C flag is set. |
| src/executor.rs | Forces all_passed = false when interrupted and prints Run INTERRUPTED in the run summary. |
| src/claude_code.rs | Drops the hardcoded --no-session-persistence CLI argument. |
| scripts/ralph/progress.txt | Removes/adjusts tracked Ralph progress log content. |
| CHANGELOG.md | Updates v0.4.1 entry with interruption behavior and adapter arg change. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Load interrupted flag once into local to avoid TOCTOU race - Use is_interrupted() helper in main.rs for consistency - Assert outcome.all_passed == false in interrupt test
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Moves the interrupted-exit-code decision into a pure, testable helper in exit_code.rs. Adds tests covering both interrupted and non-interrupted paths.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
--no-session-persistencefrom the Claude Code adapter — can still be passed viaagent_argsin configRoot cause
When interrupted, the step loop breaks early so only completed (passing) steps are in the outcomes list.
all_passedused.all()on this partial list, which returnstruefor an empty or all-passing subset.Fix
executor.rs:all_passednow checks!interruptedbefore evaluating step resultsexecutor.rs:print_run_summaryprints "Run INTERRUPTED" instead of "Run PASSED"main.rs: Exit code returnsEXIT_INTERRUPTED(5) when the flag is setTest plan
execute_steps_interrupted_between_stepstest still passesbugatti test, Ctrl+C mid-run, verify "Run INTERRUPTED" and exit code 5