Repository navigation
fix: tgtrace writes its trace atomically; verify refuses a missing or broken trace (#108) - #155
Merged
Merged
Conversation
… truncated trace (#108) A truncated trace raised an uncaught JSONDecodeError out of verify.run, so the CLI exited 1 (= tests failed); a missing trace read as {}, so every selected journey was reported uncovered (exit 3). Both are a broken run, not a verdict. - tgtrace writes <out>.tmp.<pid> and os.replace()s it; a failed write removes the temp file, so the target is absent or whole. - verify.run returns an error (exit 2, REFUSED) for a missing or unreadable trace; pytest_adapter.run refuses a truncated one too. - README and --help say exit 2 also covers "no readable trace".
…n the refusal (#108 review) - H1: `null` / `[]` / a string parse as JSON, then crashed validate() with an AttributeError (exit 1 again). verify and pytest_adapter refuse a non-object trace like a truncated one. - H3: the missing-trace refusal now carries the tail of pytest's stderr, which names the real cause (a bad flag, tgtrace's xdist refusal). - ConnectionClosedTests writes a whole (empty) trace, so it covers the validate/ledger path again instead of stopping at the new refusal.
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.
Fixes #108.
<out>.tmp.<pid>andos.replaces it, so a killed run leaves no trace or a whole one, never a truncated one.--helpsay exit 2 also covers "no readable trace".Reviewed by /code-review and a code-reviewer agent; the agent drove real pytest runs (red, SIGKILL, SIGTERM, Ctrl-C,
os._exit, bad flag,-p no:tgtrace) and found no wrong exit code. The high-severity findings are fixed in daaef68 (non-object trace, the dropped stderr, a test that stopped covering its path); the rest are filed as #153 and #154.