Skip to content

Tests: preserve non-ASCII paths from Git inventories - #8063

Open
Barbital11111 wants to merge 1 commit into
ItsNotRexed:mainfrom
Barbital11111:fix/ci-git-path-bytes
Open

Barbital11111 wants to merge 1 commit into
ItsNotRexed:mainfrom
Barbital11111:fix/ci-git-path-bytes

Conversation

@Barbital11111

Copy link
Copy Markdown
Contributor

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 as tests/test_docs_links.py. The existing Git fallback behavior is unchanged.

Validation

CPU-only, synthetic paths, no game files. AI-assisted (Codex).

@devnull34 devnull34 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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).

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