Repository navigation
fix: keep the Windows launcher alive when stdout is cp1252 - #30
Draft
feizheng10 wants to merge 1 commit into
Draft
feizheng10 wants to merge 1 commit into
feizheng10 wants to merge 1 commit into
Conversation
GitHub Actions Windows runners encode the console as cp1252. Child output is decoded with errors=replace, so a relayed line can contain U+FFFD, and writing that character aborts the action with UnicodeEncodeError. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
The kernel-bottleneck Windows behavioral job on amd/skills#285 crashed in the skillscope launcher (
bootstrap/launch.py,main,sys.stdout.write). The console encoding is cp1252, and child output decoded witherrors="replace"can contain U+FFFD. Writing that character raisedUnicodeEncodeError: 'charmap' codec can't encode character '\ufffd'and aborted the action.At process startup the launcher now reconfigures
sys.stdoutandsys.stderrto UTF-8 witherrors="replace"when the streams supportreconfigure. A missing stream, a redirect that cannot be reconfigured, or anOSError/ValueErrordoes not crash startup. Eval logic, skill content, runner selection, and rocprof-compute behavior are unchanged.Test plan
python -m unittest tests.test_skillscope.TestActionLauncher— relaying U+FFFD through a cp1252-like stdout does not raiseUnicodeEncodeError, and setup survives a missing, closed, or non-reconfigurable streampython -m unittest discover -s tests -t .— 507 tests, OKMade with Cursor