Skip to content

fix(tests): use explicit UTF-8 file I/O - #390

Merged
smaramwbc merged 2 commits into
smaramwbc:mainfrom
be-student:codex/350-explicit-utf8-reads
Sep 8, 2026
Merged

fix(tests): use explicit UTF-8 file I/O#390
smaramwbc merged 2 commits into
smaramwbc:mainfrom
be-student:codex/350-explicit-utf8-reads

Conversation

@be-student

Copy link
Copy Markdown
Contributor

Description

Makes all five identified source-file reads/writes explicitly UTF-8 so invariant and eval tooling no longer depends on the Windows locale codec.

Related Issue

Closes #350

Type of Change

  • 🐛 Bug fix
  • 🧪 Test improvement

Changes Made

  • Added encoding="utf-8" at every listed boundary.
  • Documented the cross-platform file-I/O rule in CONTRIBUTING.md.

Testing

  • Unit tests pass locally
  • Integration tests pass locally

Test Commands Run

uv run ruff check .
uv run pytest -q

The full run reached 1,334 passed and 5 skipped; only three live-stack smoke tests failed because the API service was intentionally not running. PostgreSQL-backed tests used the repository Docker database, which was stopped afterward.

Checklist

  • Coding standards and self-review complete
  • Documentation updated
  • No breaking changes

@smaramwbc
smaramwbc merged commit e3dcce8 into smaramwbc:main Sep 8, 2026
6 checks passed
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.

[Bug]: Invariant tests crash with UnicodeDecodeError on Windows (read_text() without encoding=)

2 participants