fix(tests): force UTF-8 in non-ASCII SKILL.md fixture (Windows CI hotfix)#979
Merged
danielmeppiel merged 1 commit intomainfrom Apr 27, 2026
Merged
Conversation
test_non_ascii_frontmatter_warning fails on Windows runners because Path.write_text() defaults to the system locale (cp1252 on windows-latest). The non-ASCII description bytes get mangled on disk, the validator fails to decode as UTF-8, and the test sees a hard error instead of the intended warning. Pin encoding='utf-8' so bytes-on-disk are valid UTF-8 on every platform, which exercises the actual non-ASCII warning code path the test asserts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a Windows CI-only test failure by ensuring the non-ASCII SKILL.md fixture is written as valid UTF-8, so the validator exercises the intended "non-ASCII warning" (not decode error) path.
Changes:
- Set
encoding="utf-8"on thePath.write_text()call that writes non-ASCII frontmatter content intest_non_ascii_frontmatter_warning.
Show a summary per file
| File | Description |
|---|---|
tests/unit/test_skill_bundle.py |
Writes the non-ASCII SKILL.md fixture using UTF-8 to avoid cp1252 corruption on Windows and keep the test exercising the warning path. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
| sd.mkdir() | ||
| (sd / "SKILL.md").write_text( | ||
| "---\nname: unicode-skill\ndescription: Ünïcödé description\n---\n# x\n" | ||
| "---\nname: unicode-skill\ndescription: Ünïcödé description\n---\n# x\n", |
There was a problem hiding this comment.
This test file contains non-ASCII characters directly in the Python string literal ("Unic..." with accented letters). Repo guidelines require source files to remain printable ASCII; please spell these characters using Unicode escape sequences (e.g., \u00dc) so the source stays ASCII while still writing non-ASCII content into SKILL.md via UTF-8.
danielmeppiel
pushed a commit
that referenced
this pull request
Apr 27, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Problem
tests/unit/test_skill_bundle.py::TestSkillBundleValidation::test_non_ascii_frontmatter_warningfails on Windows runners on the v0.9.4 release branch (job 73133340014).Path.write_text()defaults to the system locale encoding. Onwindows-latestthat is cp1252, so the non-ASCII description bytes are written incorrectly. The validator then fails to decode the file as UTF-8 and surfaces a hard parse error:The test asserts
is_valid == Trueand a "non-ASCII" warning — i.e. the validator's tolerant code path for valid UTF-8 with non-ASCII bytes. The fixture has to actually be valid UTF-8 for that path to fire.Fix
Pin
encoding="utf-8"on the onewrite_textcall that contains non-ASCII content. The other 24write_textcalls in the file are ASCII-only and are unaffected.Verification
Scope
v0.9.4to unblock the release.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com