Repository navigation
Conversation
In mocha's spec reporter epilogue, indented diff or error lines starting with `- ` (or nested numbered items) matched `_MOCHA_TEST_RE` and prematurely cleared `in_epilogue`, emitting spurious test entries and recording subsequent `2) Suite` epilogue headers as failed tests. Lines such as `N pending` or indent-2 diff braces also remained on `suites` and could prefix tests from a later mocha run in the same log. Reset `suites` on epilogue entry, skip `N pending` summary lines, keep the parser in epilogue mode until all expected numbered failure headers are consumed, and only exit the final failure block on a valid spec-reporter suite chain or root-level test line. Keep the standalone verifier parser in lockstep.
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.
Summary
- ..., numbered, or check-mark lines inside Mocha failure epilogues from prematurely exiting epilogue mode, emitting bogus test results, or turning subsequent2) Suiteepilogue headers intoFAILEDtests.N pendingsummary lines, and require a valid spec-reporter suite chain or root-level test line to exit the final failure block so diff lines (such as indent-2{/}) cannot leak into a subsequent Mocha run in the same log.src/repo2rlenv/log_parsers/jest_parser.pyand the standalone verifier insrc/repo2rlenv/pipelines/_pr_runtime_verifier.py.Test plan
tests/test_mocha_output.pycovering dash/numbered/check-mark lines inside multi-failure and single-failure epilogues, indent-2 diff lines andN pendingsummaries before a second run, and nested second runs after epilogue diffs.pytest -q tests/test_mocha_output.py tests/test_log_parsers.py tests/test_pr_runtime_verifier.py tests/test_pipeline_contract.py tests/test_pipeline_pr_runtime.py tests/test_node_runner.py— 222 passed.ruff check .andruff format --check .— passed.Out of scope
tests/verifier.py; those tasks would need regeneration to pick up the updated standalone parser.