fix(cli): exit non-zero on red error paths - #166
Merged
Paul-Kyle merged 1 commit intoAug 30, 2026
Conversation
CLI handlers that printed a red error and then returned left the process at exit code 0, so automation could not detect failure. Raise SystemExit(1) on those paths (house idiom). Keep the yellow reindex-already-running HTTP 409 path as exit 0. Fixes phasespace-labs#164 Co-authored-by: Cursor <cursoragent@cursor.com>
Member
|
Complete, and the part I want to call out is the 409. The issue said that sweep was a floor rather than a proof and asked you to judge each site — you left "reindex already running" at exit 0, pinned it with a test, and said why in both the issue and the PR instead of leaving it to be found in the diff. That is the whole reason it was Also right, and easy to get wrong: the Merging. Thanks for a strong first contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
raise SystemExit(1), matching the house idiom inreview.py.tests/test_cli_stop.py.Fixes #164
Test plan
pytest tests/test_cli_error_exit_codes.py tests/test_cli_stop.py(17 passed)palinode depends --unblocked/palinode trace …and confirm non-zero exitAssisted-by: Cursor