Repository navigation
fix(fix): fail when Coana leaves computed fixes unapplied - #1584
Draft
Martin Torp (mtorp) wants to merge 1 commit into
Draft
Martin Torp (mtorp) wants to merge 1 commit into
Martin Torp (mtorp) wants to merge 1 commit into
Conversation
socket fix reported success whenever Coana exited 0, and hardcoded fixedAll: true. Coana now lists fixes it could not apply under notApplied in its --output-file and exits 5. socket fix treats that exit as a result rather than a crash: it still copies the output file, then fails with each unapplied fix and its reason, and sets fixedAll to false. In PR mode it warns and opens a PR for whatever was applied. Refs ENG-5437
This branch has not been deployed
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.
Part of ENG-5437.
socket fixreported success whenever Coana exited 0, and local mode hardcodedfixedAll: true. So a run where Coana skipped a directory and changed nothing still printed "Finished!" and exited 0.The matching Coana change (coana-tech/coana-package-manager#2541) lists fixes it could not apply under
notAppliedin its--output-file, uses the new typeno-fixes-appliedwhen nothing was applied, and exits with 5.What changes
socket fixstill reads and copies the output file, then fails with "No computed fixes were applied" or "Some computed fixes were not applied". The cause lists each unapplied fix with its reason.fixedAllis false. A non-emptynotAppliedwith exit 0 is treated the same way.This is safe to merge before the Coana change ships, because the current Coana never exits 5 or writes
notApplied. It takes effect once the Coana version is bumped.Testing
New tests in
handle-fix-limit.test.mtscover exit 5 with nothing applied, exit 5 with some applied (and--output-filestill written), a clean run, and an unrelated Coana failure. The fix tests pass, excepthandle-fix-id.test.mts, which fails locally on GitHub API mocks and is untouched here.Expected reviewer effort: High-level design decisions