Repository navigation
Conversation
Takes the raw per-phase records conftest already builds for --report-jsonl and returns summary lines: targets and category filters, a pass rate per component (tests/<dir>) and target with the service URL, and, with several targets, the tests whose outcome differs between them. It reuses classify_record, parse_nodeid and OUTCOME_SEVERITY from generate_report.py so the terminal and the dashboard count outcomes the same way. The first design tagged items with a cross-target key built from item.callspec.indices at collection time; parse_nodeid already strips the target (including dashed names like ci-nameres-es) from the node ID, so that was dropped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The header listing targets and category filters scrolls away in long runs, and pytest's own totals don't say how each service did on each target. A pytest_terminal_summary hook now prints summarize_run's lines after pytest's summary. pytest_runtest_logreport keeps its records in memory for this whether or not --report-jsonl is set. The URL lookup reads targets.ini directly rather than through get_target(), which raises on an unknown --target; that run has already failed at collection, and the summary shouldn't add a second traceback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
A full run prints thousands of lines, so the header saying which targets and categories were tested scrolls away, and pytest's closing totals don't say how each service did on each target. This PR adds a "Babel Validation summary" block after pytest's own summary. It lists the targets and category filters, then a pass rate per component (
tests/<dir>) and target, with the URL that was tested. When more than one--targetis given, it also lists the tests whose outcome differs between targets.Calls worth overruling
--categoryare skips, so they don't drag the percentage down; they're shown as a separate "N skipped". xfailed counts as run but not passed.summarize_runreusesclassify_record,parse_nodeidandOUTCOME_SEVERITYfromgenerate_report.py, applied to the same per-phase records that--report-jsonlwrites. So a test counts once, as its worst phase, and the target is parsed out of the node ID.pytest_runtest_logreportnow keeps those records in memory even when--report-jsonlisn't set.What's here
summarize_runintests/_pytest_helpers.py, with unit tests intests/unit/test_run_summary.py.pytest_terminal_summaryhook intests/conftest.py. It reads targets.ini directly rather than throughget_target(): an unknown--targethas already failed collection, and the summary shouldn't add a second traceback.Verification
The new unit tests and the rest of the unit suite (about 280 tests) pass on 30a53b9. Live runs printed the expected summary for
--target dev --target prod, for-n 4 --target dev --target ci-nameres-es(so xdist workers' reports reach it), and for a--category "Unit Tests"Google Sheet run, where the filtered rows showed up as skips.Nothing is blocking, and nothing was deferred.
🤖 Generated with Claude Code