Skip to content

Exit with an error when the changed-file list fails to load - #416

Merged
umputun merged 2 commits into
masterfrom
fix/bad-ref-exit-code
Oct 27, 2026
Merged

umputun merged 2 commits into
masterfrom
fix/bad-ref-exit-code

Conversation

@umputun

@umputun umputun commented Oct 27, 2026

Copy link
Copy Markdown
Owner

a mistyped ref (revdiff no-such-ref) showed "error loading files" inside the TUI, and quitting then exited 0 with nothing on stdout or stderr. launch-revdiff.sh and the plugins read exit 0 with empty output as a review with no annotations, so an agent that passed a bad ref reported a clean review.

the model now keeps the error of the latest file-list load, cleared by the next successful one. When it is set and there are no annotations, revdiff prints error: load changed files: ... and exits 1 on quit or a signal, and the launcher relays the message. When annotations exist, output and history work as before, so nothing is lost.

TestRun_FailedFileLoadExitsWithError runs the real TUI under a PTY with a bad ref and checks for exit 1 and the error text. The PTY harness now records the child's exit status.

a mistyped ref exited 0 with empty output, so agents treated a failed review as
clean. Report file-list load failures on exit when no annotations exist, and
keep the existing output and history behavior when notes exist.
run the real TUI under a PTY with a bad ref and assert exit 1 with the load
error on stderr. The PTY harness now records the child's exit status, so
dropping the load error from run() fails a test.
Copilot AI balanced review requested due to automatic review settings October 27, 2026 17:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@umputun
umputun merged commit 7a2eaf5 into master Oct 27, 2026
7 checks passed
@umputun
umputun deleted the fix/bad-ref-exit-code branch October 27, 2026 17:16
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