Skip to content

fix: interrupted runs no longer report as passed#42

Merged
codesoda merged 4 commits intomainfrom
fix/interrupt-reporting
Apr 14, 2026
Merged

fix: interrupted runs no longer report as passed#42
codesoda merged 4 commits intomainfrom
fix/interrupt-reporting

Conversation

@codesoda
Copy link
Copy Markdown
Owner

Summary

  • Ctrl+C during a run now correctly reports "Run INTERRUPTED" with exit code 5, instead of falsely reporting "Run PASSED" with exit code 0
  • Removed hardcoded --no-session-persistence from the Claude Code adapter — can still be passed via agent_args in config
  • Updated CHANGELOG for v0.4.1

Root cause

When interrupted, the step loop breaks early so only completed (passing) steps are in the outcomes list. all_passed used .all() on this partial list, which returns true for an empty or all-passing subset.

Fix

  • executor.rs: all_passed now checks !interrupted before evaluating step results
  • executor.rs: print_run_summary prints "Run INTERRUPTED" instead of "Run PASSED"
  • main.rs: Exit code returns EXIT_INTERRUPTED (5) when the flag is set

Test plan

  • All 205 existing tests pass
  • Existing execute_steps_interrupted_between_steps test still passes
  • Manual: run bugatti test, Ctrl+C mid-run, verify "Run INTERRUPTED" and exit code 5

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.
Copy link
Copy Markdown
Owner Author

@codesoda codesoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Copy Markdown

@cadence cadence bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️Caution: core fix shipped with stray deletion

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 👎.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (not PASSED) and return exit code 5.
  • Update executor pass/fail aggregation to treat interrupted runs as non-passing.
  • Remove hardcoded --no-session-persistence from 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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@codesoda codesoda merged commit d3bb51f into main Apr 14, 2026
5 checks passed
@codesoda codesoda deleted the fix/interrupt-reporting branch April 14, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants