fix: explicit UTF-8 encoding in test _make_package helper to unblock Windows CI#1124
Merged
danielmeppiel merged 2 commits intomainfrom May 3, 2026
Merged
Conversation
…x Windows UnicodeEncodeError Agent-Logs-Url: https://github.com/microsoft/apm/sessions/fef5d8c7-0e07-4b3e-9b8a-3020fcdb96af Co-authored-by: sergio-sisternes-epam <207026618+sergio-sisternes-epam@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix unicode encoding issue in test_command_integrator
fix: explicit UTF-8 encoding in test _make_package helper to unblock Windows CI
May 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a Windows CI failure in the unit test suite by making test fixture file-writing deterministic across platforms (avoiding the Windows default cp1252 encoding).
Changes:
- Updated the shared
_make_packagetest helper to write prompt files with explicitencoding="utf-8".
danielmeppiel
approved these changes
May 3, 2026
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.
Description
On Windows,
write_text()defaults tocp1252, which cannot encode the Unicode tag character\U000e0041used intest_critical_security_finding_blocks_write, causing aUnicodeEncodeErrorin CI onwindows-latest.tests/unit/integration/test_command_integrator.pyline 37: Addedencoding="utf-8"to the module-level_make_packagehelper'swrite_textcall, matching the identical fix already applied at line 292 in the same file.Type of change
Testing
Original prompt