Repository navigation
fix(pretty_print): restore stdout after printer failures. - #551
Merged
sromoam merged 3 commits intoNov 13, 2026
Merged
Conversation
vawsgit
approved these changes
Nov 10, 2026
Contributor
There was a problem hiding this comment.
✅ LGTM!
Verified at head a5b79b6, with stickler imported from that checkout's src:
- The new tests give 17 passed. With
dev'spretty_print.pyand these tests, 10 of 17 fail: the stdout-restore tests forprint_non_matches,print_evaluation_resultsandprint_confusion_matrix_html, plus the bulk file-output and invalid-regex tests. The full suite gives 4118 passed, 13 skipped, 1 xfailed, as the PR body says. - All four items of #424 are delivered: stdout is restored in the three printers, and the bulk info reaches file output.
- Mutations are caught: dropping the bulk info from file output fails 2 tests, and removing the open-error message fails 1.
- Nested redirects (
print_evaluation_resultscallingprint_confusion_matrixandprint_non_matches) write to the file correctly. No caller insrc/passesoutput_file, so making render errors raise breaks no internal caller. - No conflict with
dev. With #548,pretty_print.pymerges automatically, and both PRs' tests pass on the merged file (23 passed). OnlyCHANGELOG.mdconflicts. Whichever PR merges second keeps both entries.
Non-blocking (low):
ruff format --checkfails onpretty_print.py:1293(line over 88 characters). CI runs onlyruff check, so CI will not catch it.- The body does not say
Closes #424, so merging leaves #424 open. - The CHANGELOG entry has no bold lead sentence and no
#424link, unlike the entries next to it. - The early
returns for unrecognizable results (print_confusion_matrix_html,print_non_matches) leave an old output file in place. That predates this PR, but the new README's "same rendering path" line overstates it.
Security Scan ResultsASH Security Scan Report
Scan Metadata
SummaryScanner ResultsThe table below shows findings by scanner, with status based on severity thresholds and dependencies:
Report generated by Automated Security Helper (ASH) at 2026-11-13T16:23:35+00:00 |
Contributor
|
Hi! I merged the latest |
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.
Restores stdout after printer failures using context-managed redirection. File and terminal rendering now share a path, including the bulk summary in confusion-matrix file output. File-opening errors are reported separately from rendering errors.
Adds regression tests and a changelog entry. The separate HTML escaping work in #548 is outside this change.
Testing: merged current
dev(7034ec0) ind0a4ee1, preserving the printer entry and all upstream changelog entries. The merge retains upstream HTML escaping. On Python 3.12.16, the dependency-enabled suite passed 3,526 tests (2 skipped, 1 xfailed); the separate Strands Evals integration suite passed 821 tests (1 xfailed). Repository-wide Ruff and whitespace checks pass. Independent AI review found no blocking merge issues. Hosted checks must validate the new head.AI-assisted implementation, testing and review.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.