Skip to content

Tests: read checked-in files with an explicit encoding in the run report and FLM host tests - #18654

Merged
danielhanchen merged 1 commit into
mainfrom
ci/test-reads-explicit-encoding-2
Nov 20, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/test-reads-explicit-encoding-2

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Repo tests (CPU, rest-2) is red on main (seen on #18650, reproduced on current main). tests/test_source_read_encoding.py flags three new reads that use the platform default encoding:

AssertionError: 2 file reads in the test trees touch a checked-in file with the platform default encoding ...: ['tests/test_run_report.py:246: read_text()', 'tests/test_run_report.py:267: read_text()']
AssertionError: 1 file reads in the test trees touch a checked-in file with the platform default encoding ...: ['studio/backend/tests/test_npu_flm_host.py:286: read_text()']

Cause

All three are bare read_text() calls on checked-in files. On Windows they would decode with the locale code page as soon as one of those files gains a non-ASCII byte. The guard is right; the reads are what needs fixing.

Change

  • encoding = "utf-8" on those three read_text calls. No behaviour change.

Testing

  • tests/test_source_read_encoding.py lists the three offenders on main and passes with this change.
  • tests/test_source_read_encoding.py and tests/test_run_report.py: 30 passed.
  • studio/backend/tests/test_npu_flm_host.py: 21 passed.

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T18:21:25.319134Z eb34e68 Manual request
ℹ️ 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.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: eb34e6803b

ℹ️ 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".

@danielhanchen
danielhanchen merged commit 4cb5be8 into main Nov 20, 2026
@danielhanchen
danielhanchen deleted the ci/test-reads-explicit-encoding-2 branch November 20, 2026 18:21
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