Skip to content

Keep behavioral reports writable on a cp1252 console - #47

Open
0z5a wants to merge 1 commit into
amd:mainfrom
0z5a:fix/behavioral-report-console-encoding
Open

0z5a wants to merge 1 commit into
amd:mainfrom
0z5a:fix/behavioral-report-console-encoding

Conversation

@0z5a

@0z5a 0z5a commented Nov 18, 2026

Copy link
Copy Markdown

Fixes #43.

The standalone behavioral command prints each case's error before writing its report. On a strict cp1252 output stream, U+FFFD raises UnicodeEncodeError there. The final Markdown report contains the same error text, so its console write needs the same handling.

Use the existing console fallback for the progress lines and the report. The JSON artifact and Markdown summary keep the original text. This covers the Python CLI entry point. #30 handles the separate Actions launcher.

I ran the CLI handler with two fixture cases and a setup error containing U+FFFD, with stdout backed by a strict cp1252 stream. Before the change it raised on the first result line. Afterward both result lines printed, the command returned the expected failure status for the two failed cases, and both report files preserved U+FFFD. All 619 tests passed on Python 3.12. This exercised the codec locally without a Windows runner or a live model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Behavioral run aborts on Windows when a case error contains a non-cp1252 character

1 participant