You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(lexbench): version chart SVGs crash report builds under an ASCII locale #208
src/harness/lexbench/charts.py writes chart SVGs in render_chart with output.write_text(...) and no encoding. Chart text contains non-ASCII characters (for example † and Chinese legend notes), so harness.lexbench.report raises UnicodeEncodeError when the build runs under an ASCII locale such as LC_ALL=C with PYTHONUTF8=0 and PYTHONCOERCECLOCALE=0.
tests/test_explicit_utf8_io.py allows this call because charts.py is in HASH_BOUND with the reason "copied byte for byte into the public reproduction directory". The Lexbench report publishes it as reproduction/plot_version_summary.py.
Decision needed
Adding encoding="utf-8" fixes the crash, but it changes the bytes of that published copy. It would move the reproduction/plot_version_summary.py route in all three tests/golden/lexbench-{minimal,macos,linux}.json snapshots, and future report packages would differ from earlier ones in that file.
The owner decides whether to change the published copy. If so:
add the encoding in render_chart and in the read_text call in main, and lower or remove the charts.py entry in HASH_BOUND;
regenerate the affected Lexbench snapshots and explain the moved route in the PR.
Default if there is no objection: make the change, because a build that crashes on a locale is a defect and the published copy gains no behavior difference under UTF-8.
Activity
test(lexbench): keep report snapshots locale-independent
refactor(lexbench): split report main into named typed stages (#207)
fix(lexbench): write chart SVGs as explicit UTF-8