Repository navigation
fix(fix): exit 5 when computed fixes go unapplied - #1624
Merged
Martin Torp (mtorp) merged 1 commit intoOct 16, 2026
Merged
Conversation
Coana exits with 5 when it computed fixes it could not apply, and lists them under notApplied in its output file. Local-mode socket fix already reads that list and fails with "Some computed fixes were not applied", but the result carried no exit code, so the command exited with 1. Automation could not tell a partly applied run from a failed one. The not-applied result now carries code 5, which outputFixResult uses as the process exit code. Other failures still exit with 1.
Martin Torp (mtorp)
requested a review
from Benjamin Barslev Nielsen (barslev)
October 16, 2026 10:40
Martin Torp (mtorp)
marked this pull request as ready for review
October 16, 2026 10:41
Martin Torp (mtorp)
deleted the
martin/pass-through-not-applied-exit-code
branch
October 16, 2026 10:43
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.
Follow-up to #1584. Coana exits with 5 when it computed fixes it could not apply, and lists them under
notAppliedin its--output-file. Local-modesocket fixalready reads that list and fails with "Some computed fixes were not applied" or "No computed fixes were applied". But that result had no exit code, sooutputFixResultfell back to 1. A CI job runningsocket fixcould not tell "some fixes were left out" from "the run failed".What changes
code: 5, sosocket fixexits with 5, the same code Coana uses.[Unreleased]changelog entry under Changed.Testing
The two not-applied cases in
handle-fix-limit.test.mtsnow assertcode: 5. That file passes, andcheck:tscandlintare clean.Expected reviewer effort: Stamp
Note
Low Risk
Small, targeted change to local-mode exit semantics and tests; no change to fix application logic or PR mode.
Overview
Local
socket fixnow exits with code 5 when Coana computed fixes that could not be applied (none or only some), matching Coana’s behavior so CI can distinguish that outcome from a hard failure (still exit 1).The local-mode failure path in
coanaFixnow setscode: COANA_FIXES_NOT_APPLIED_EXIT_CODEon the result object, whichoutputFixResultalready maps toprocess.exitCode. PR mode is unchanged. Tests assertcode: 5for the not-applied scenarios; changelog documents the behavior andnotAppliedin--output-fileJSON.Reviewed by Cursor Bugbot for commit cbbdbfa. Configure here.