Skip to content

Tests: read checked-in sources as UTF-8 in three new test files - #14414

Merged
danielhanchen merged 1 commit into
mainfrom
fix/test-reads-utf8
Oct 20, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix/test-reads-utf8

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

tests/test_source_read_encoding.py::test_checked_in_file_reads_name_an_encoding fails on main, so the Repo tests (CPU, rest) shard is red on every PR (for example #14395):

AssertionError: 3 file reads in the test trees touch a checked-in file with the platform default encoding, so they break on Windows as soon as that file gains a non-ASCII byte. Pass encoding = "utf-8": ['tests/test_grouped_gemm_mixed_tma_device.py:218: read_text()', ...]
AssertionError: 2 file reads in the test trees touch a checked-in file with the platform default encoding, ... ['studio/backend/tests/test_diffusion_vae_oom.py:1726: read_text()', 'tests/test_legacy_block_compile_install.py:15: read_text()']

Three test files that merged today read checked-in sources with a bare read_text():

File Reads Added by
tests/test_grouped_gemm_mixed_tma_device.py 3 #14358
studio/backend/tests/test_diffusion_vae_oom.py 1 #13802
tests/test_legacy_block_compile_install.py 1 #14398

The guard is right: on Windows, read_text() decodes with the locale codec (cp1252), so these break as soon as one of those sources gains a non-ASCII byte.

Fix

Pass encoding = "utf-8" to the five reads. No other change.

Verification

  • On main: tests/test_source_read_encoding.py: 2 failed, 14 passed (the two failures above).
  • With this change: the guard and the two touched tests/ files pass, apart from 4 test_legacy_gate errors.
  • Some failures on this host are the same with and without this change, so they come from the local environment, not this PR:
    • the 4 test_legacy_gate setup errors in tests/test_legacy_block_compile_install.py;
    • 8 failures in studio/backend/tests/test_diffusion_vae_oom.py (102 passed).

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T23:01:51.072305Z 3910711 Manual request
🔒 Security Review ⚠️ Failed 2026-10-20T22:58:31.838391Z
We couldn’t complete this review. Comment @codex security review to try again.
3910711 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 3910711fe4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant