Never let verify --json fail without a diagnostic#27
Merged
Conversation
Summary emit a synthetic diagnostic for any non-zero verifier run that produced no parsable diagnostics, not just when stderr is non-empty. `_run_project_tool` only synthesized a diagnostic when the tool exited non-zero AND had no parsed diagnostics AND wrote to stderr. A verifier that exited non-zero with unparsable stdout and empty stderr therefore failed silently — a failing `rc` with zero diagnostics and no reason. Broaden the fallback to always surface one diagnostic: prefer the last stderr line, then the last stdout line, then a generic exit-status message. Testing - checkrun test suite: all suites pass (verify-test 107 passed) - new verify-test cases: non-zero exit with unparsable stdout + empty stderr yields a diagnostic from stdout; non-zero exit with no output yields a generic "exited with status N" diagnostic - checkrun lint clean on both files
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.
_run_project_toolonly synthesized a diagnostic when a non-zero verifier also wrote to stderr, so a tool that exited non-zero with unparsable stdout and empty stderr failed silently (failing rc, zero diagnostics, no reason).Broaden the fallback to always surface one diagnostic for a non-zero run with no parsed diagnostics: prefer the last stderr line, then the last stdout line, then a generic "exited with status N and produced no diagnostics" message.
Testing: checkrun test suite passes (verify-test 107); new cases cover unparsable-stdout+empty-stderr and no-output-at-all; checkrun lint clean.