Corroborate Python no-test exit-code 5 - #58
Merged
Conversation
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
pytest.pyorunittest.pyexits 5 before lifecycle observationWhy
Both pytest and the stdlib unittest CLI use exit code 5 for no-test outcomes, but the same numeric exit code is not sufficient provenance. Because Python module resolution can execute a repository-local
pytest.pyorunittest.py, a runner import can terminate with code 5 before ProofDiff observes any test lifecycle. The previous broad exception could therefore erase a real process failure and downgradeverification-failedto a non-failing result.The fix accepts exit 5 only when exact high-confidence zero-test observer data corroborates the meaning. Targeted pytest can corroborate itself through its observer record; opaque pytest/unittest checks require their paired targeted observer.
Regression coverage
pytest.pyaborting withSystemExit(5)now fails closedunittest.pyaborting withSystemExit(5)now fails closedVerification
npm testpassednpm run clean && npm run buildpassedgit diff --checkpasseddistrefreshed