Repository navigation
Tests: preserve non-ASCII paths from Git inventories - #8063
Open
Barbital11111 wants to merge 1 commit into
Open
Barbital11111 wants to merge 1 commit into
Barbital11111 wants to merge 1 commit into
Conversation
devnull34
approved these changes
Nov 23, 2026
devnull34
left a comment
There was a problem hiding this comment.
Verified via Tier 2 Free Cloud (Groq gpt-oss-120b) & local test execution: Reading raw bytes from git ls-files -z and decoding with os.fsdecode() properly preserves non-ASCII pathnames and surrogateescapes on both Windows and POSIX without decoding failures. test_ci_registration.py passed (15/15, including new test_the_scan_preserves_non_ascii_git_paths).
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.
Coordination: CI-GIT-PATH-BYTES (claim).
Both CI inventory checks ask Git for NUL-terminated paths, but then read the pipe as text in the host's locale. On native Windows with CP936, a tracked Chinese filename caused a UnicodeDecodeError in the subprocess reader and left the CI registration check without a usable listing.
Split the raw Git bytes on NUL and decode each filename using
os.fsdecode, the same pattern astests/test_docs_links.py. The existing Git fallback behavior is unchanged.Validation
tests/test_ci_registration.pypassed 15/15 on Python 3.12.10 and 3.14.3. The added regression fails with the base implementation.tests/test_runtime_paths.pypassed 4/5 both before and after this change. The existing failure is the missingtools/replace_retry.pyworkflow path entry, tracked in CI: the runtime workflow's path filter lists tools/replace_retry.py (test_runtime_paths red since #2721) #7029.git diff --check, changed-file no-game-data scan, and merge simulation againstmainpassed. test_runtime_paths, tile_probe: git fallback exception guard and lazy numpy import #6116 modifies the same function for missing Git and currently conflicts intest_runtime_paths.py. test_docs_cli_flags: read tracked names with -z, so a non-ASCII page is not skipped #8057 handles a separate docs test.CPU-only, synthetic paths, no game files. AI-assisted (Codex).