Skip to content

fix(ci): force UTF-8 encoding in cross-platform diff normalizer - #284

Merged
Chris-Wolfgang merged 1 commit into
vNextfrom
fix/xplatform-utf8-encoding
Jul 17, 2026
Merged

fix(ci): force UTF-8 encoding in cross-platform diff normalizer#284
Chris-Wolfgang merged 1 commit into
vNextfrom
fix/xplatform-utf8-encoding

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Follow-up to PR #283. My UTF-8 fix commit was pushed after #283 merged, so it never landed on vNext — orphaned on the fix/xplatform-drop-macos-x64 branch. PR #280's cross-platform-diff check is still failing on the Windows-vs-Linux byte diff for that reason.

The bug

xUnit truncates long parameter values in test names with U+22EF ··· (MIDLINE HORIZONTAL ELLIPSIS). My Python normalizer's stdout defaults to cp1252 on Windows runners, which mangles those bytes to ��� (U+FFFD replacement). Linux/macOS emit the correct UTF-8 bytes. Same tests pass everywhere; only the on-disk bytes differ.

The fix

Sets PYTHONIOENCODING=utf-8 on the Normalize step. Same fix I pushed to fix/xplatform-drop-macos-x64 right after that PR merged — this is that same commit as a standalone PR to vNext.

Test plan

PR #280's cross-platform-differential run showed a false-positive
diff between the Windows rows and the Linux/macOS rows. Root cause:
xUnit truncates long parameter values in test names with U+22EF
`···` (MIDLINE HORIZONTAL ELLIPSIS). The Python normalizer's stdout
defaults to cp1252 on Windows, which can't represent U+22EF and
mangles the bytes into U+FFFD replacements. Linux/macOS emit the
correct UTF-8 bytes. Same tests pass; different bytes on disk.

Setting `PYTHONIOENCODING=utf-8` on the Normalize step forces the
same encoding everywhere, so the outcome files are byte-identical
across every OS/arch when the tests actually agree.

Caught by PR #280's cross-platform-differential run against the
5-row matrix from the previous commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 17, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants