Skip to content

Fix two repository checks that fail on main - #1561

Merged
aslan2142 merged 4 commits into
ProjectLeonida:mainfrom
ytsodacan:fix-red-tests
Nov 26, 2026
Merged

aslan2142 merged 4 commits into
ProjectLeonida:mainfrom
ytsodacan:fix-red-tests

Conversation

@ytsodacan

@ytsodacan ytsodacan commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Two repository checks fail on main:

  • tests/test_tool_stdout_encoding.py: tools/compute_heap_layout_census.py, tools/game_run_summary.py and tools/stage_timeline.py don't set errors="replace" on stdout, so a redirected run can stop on a name the Windows code page can't encode. They get the guard the other tools have.
  • tests/test_runner_calls_all_tests.py: test_out_named_like_the_optional_spirv_index in tests/test_feature_scan.py isn't in the checker's list. Its runner already calls it (through globals(), which the checker doesn't follow in that form), so it joins the file's other tests in RUNNER_SKIPS.

Overlaps #1673, which fixes the same two checks and a third, without the last two guards.

Tested

macOS, Python 3.14.4. On main both checks fail; with this change both pass, and so do tests/test_feature_scan.py, tests/test_compute_heap_layout_census.py and tests/test_game_run_summary.py. OguzSoykan verified the first commit on native Windows; the two newer guards have no Windows run.

GPUs tested: n/a

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption.

@ytsodacan

Copy link
Copy Markdown
Contributor Author

@tiguan26 please review

@tiguan26

Copy link
Copy Markdown
Contributor

Tested on current main (b9320a1): both changes are correct, and test_runner_calls_all_tests.py now passes. test_tool_stdout_encoding.py still fails on main, though, because two tools have landed since without the guard: tools/game_run_summary.py and tools/stage_timeline.py (Lists differ: ['tools/game_run_summary.py', 'tools/stage_timeline.py'] != []). If you add the same sys.stdout.reconfigure(errors="replace") block to those two, this PR fixes both checks and I'll approve it.

AI-assisted (Claude).

@OguzSoykan

Copy link
Copy Markdown

Verified on native Windows at head 263c9114b: test_runner_calls_all_tests.py and test_tool_stdout_encoding.py fail on main and pass here. It overlaps #1673, which fixes the same two plus test_runtime_paths.py and teaches the checker the comprehension form instead of extending RUNNER_SKIPS.

Native Windows 10 Pro 19045, CPython 3.12, py -3.12 -I, checkout under a non-ASCII profile path (C:\Users\Oğuz\..., TEMP is the 8.3 alias C:\Users\OUZ~1\...). No game files.

AI-assisted (Claude Code).

compute_heap_layout_census.py: set errors="replace" on stdout like the other tools.
test_runner_calls_all_tests.py: list the new feature_scan test, which its runner already calls.
@ytsodacan

Copy link
Copy Markdown
Contributor Author

Thanks, reproduced on current main. Both tools have the guard in 4b10cbe, and test_tool_stdout_encoding.py and test_runner_calls_all_tests.py pass on top of db1a22d.

@OguzSoykan thanks for the Windows run and for pointing out #1673. It fixes the checker itself rather than extending RUNNER_SKIPS, so if it's merged first I'll cut this one down to the two new guards.

@tiguan26 tiguan26 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving 4b10cbe. Merged into current main with no conflicts: tests/test_runner_calls_all_tests.py passes, and the two tools I named now have the guard.

Main keeps moving, though. On today's main test_tool_stdout_encoding.py now lists scripts/corpus_watch.py, which landed after this PR. That's a new file, not something this PR missed, so it shouldn't hold this up. #1673, which teaches the checker the comprehension form, may be the longer-term fix for the runner check.

AI-assisted (Claude).

aslan2142 and others added 2 commits November 25, 2026 19:51
No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…jectLeonida#1561 review)

- test_tool_stdout_encoding: three scripts merged since this PR opened
  (check_compute_journal_overlay.py and compute_workers_win.py with ProjectLeonida#2098,
  corpus_watch.py with ProjectLeonida#817) get the same stdout guard as the tools here.
- test_runtime_paths: the runtime workflow's two path filters now include
  tools/conformance/**, which runtime/CMakeLists.txt names. The change is
  ProjectLeonida#1673's (xel1uz), carried here since ProjectLeonida#1673 duplicates this PR.

With it, test_tool_stdout_encoding, test_runner_calls_all_tests and
test_runtime_paths all pass on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aslan2142
aslan2142 merged commit f1afede into ProjectLeonida:main Nov 26, 2026
@aslan2142

Copy link
Copy Markdown
Collaborator

Merged, thanks! With this, the three repository checks that failed on main pass again.

AI-assisted (Claude Code, Claude Opus 5.5).

Kokonotcu added a commit to Kokonotcu/leonida that referenced this pull request Nov 26, 2026
9 upstream commits after 61732ac: ProjectLeonida#2150 (x64_recomp keeps the carry flag across a shift by a zero count, and treats a
shift by cl as a flag writer that may leave the flags alone), ProjectLeonida#1561 (red repository checks fixed and the newer scripts
guarded), and errors="replace" on stdout for game_run_summary and stage_timeline. No file here carried changes of ours,
so all are taken as upstream has them; no runtime code changed.

Tests: tests.test_x64_recomp and tests.test_runner_calls_all_tests pass (47, 32 skipped for want of an AArch64
toolchain, as upstream). The corpus is to be translated again with this x64_recomp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

4 participants