tests: two Windows-only reds on main's check job (CI-MAIN-WINDOWS-TESTS) #2628

Merged
MoonEyes merged 3 commits from upstream-pr/2628 into main 2026-11-29 19:59:43 +00:00
MoonEyes commented 2026-11-29 19:17:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T19:17:59Z.


Claimed in the coordination issue as: CI-MAIN-WINDOWS-TESTS (#2570)

What and why

check is red on main (run 46296266232, 7c330c76d, log line 628 files, 2 files failed) because of two test files that fail only on Windows:

  • tests/test_gen_gdk_runtime_classes.py imports resource at module level. That module exists only on POSIX, so on Windows the file stops at import: ModuleNotFoundError: No module named 'resource'. The import is now guarded, and the two tests that cap the child's file size with RLIMIT_FSIZE are skipped where it is missing. The third test still runs everywhere.
  • tests/test_make_game_plain_logs.py::test_extra_arguments_reach_the_child compared the child's getcwd() with the temp folder as strings. On the Windows runner the temp folder is an 8.3 short name (c:\users\runner~1\...) and getcwd() returns the long one (c:\users\runneradmin\...). It now uses os.path.samefile.

Tests only: the tools and make_game.py are unchanged.

Tested

Windows 11 10.0.26300, Python 3.12, on main dd87aa405:

  • python -I tests/test_gen_gdk_runtime_classes.py: before, ModuleNotFoundError at import; after, Ran 3 tests, OK (skipped=2).
  • python -I tests/test_make_game_plain_logs.py: 12 OK before and after on this machine, whose temp path has no 8.3 component. The RUNNER~1 failure is from the CI log; this PR's own check run is the confirmation.
  • python -I tests/test_text_write_line_endings.py: OK.

GPUs tested: n/a

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5554181897 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2628). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T19:17:59Z. --- Claimed in the coordination issue as: `CI-MAIN-WINDOWS-TESTS` (#2570) ### What and why `check` is red on `main` (run 46296266232, `7c330c76d`, log line `628 files, 2 files failed`) because of two test files that fail only on Windows: - `tests/test_gen_gdk_runtime_classes.py` imports `resource` at module level. That module exists only on POSIX, so on Windows the file stops at import: `ModuleNotFoundError: No module named 'resource'`. The import is now guarded, and the two tests that cap the child's file size with `RLIMIT_FSIZE` are skipped where it is missing. The third test still runs everywhere. - `tests/test_make_game_plain_logs.py::test_extra_arguments_reach_the_child` compared the child's `getcwd()` with the temp folder as strings. On the Windows runner the temp folder is an 8.3 short name (`c:\users\runner~1\...`) and `getcwd()` returns the long one (`c:\users\runneradmin\...`). It now uses `os.path.samefile`. Tests only: the tools and `make_game.py` are unchanged. ### Tested Windows 11 10.0.26300, Python 3.12, on `main` `dd87aa405`: - `python -I tests/test_gen_gdk_runtime_classes.py`: before, `ModuleNotFoundError` at import; after, `Ran 3 tests`, `OK (skipped=2)`. - `python -I tests/test_make_game_plain_logs.py`: 12 OK before and after on this machine, whose temp path has no 8.3 component. The `RUNNER~1` failure is from the CI log; this PR's own `check` run is the confirmation. - `python -I tests/test_text_write_line_endings.py`: OK. GPUs tested: n/a AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
OreoFR commented 2026-11-29 19:19:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T19:19:46Z.


macOS check by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main dd87aa405, PR head 4ab5fdc5d — the POSIX side of this Windows fix

  • Merge: clean (git merge-tree); does not force a rebase of #2566.
  • tests/test_gen_gdk_runtime_classes.py: main (with the merged test file) 3/3 OK, merge 3/3 OK, 0 skipped — the 2 RLIMIT tests still run and pass on POSIX with the new guard (MEASURED n=3).
  • tests/test_make_game_plain_logs.py: 12/12 OK on main and on the merge (n=3). No short RUNNER~1 temp path on macOS, so no red is possible here; the os.path.samefile change does not regress POSIX.
  • No red expected on macOS for either file (both bugs are Windows-only); the Windows red/green is covered by the Windows verifiers.

Verdict (macOS part): no regression, RLIMIT tests still covered.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261192401 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2628#issuecomment-7261192401). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T19:19:46Z. --- macOS check by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main dd87aa405, PR head 4ab5fdc5d — the POSIX side of this Windows fix - Merge: clean (`git merge-tree`); does not force a rebase of #2566. - `tests/test_gen_gdk_runtime_classes.py`: main (with the merged test file) 3/3 OK, merge 3/3 OK, **0 skipped** — the 2 RLIMIT tests still run and pass on POSIX with the new guard (MEASURED n=3). - `tests/test_make_game_plain_logs.py`: 12/12 OK on main and on the merge (n=3). No short `RUNNER~1` temp path on macOS, so no red is possible here; the `os.path.samefile` change does not regress POSIX. - No red expected on macOS for either file (both bugs are Windows-only); the Windows red/green is covered by the Windows verifiers. **Verdict (macOS part): no regression, RLIMIT tests still covered.** AI-assisted: Claude Code
TheGeogeo commented 2026-11-29 19:20:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T19:20:16Z.


Tested 4ab5fdc5d merged (no commit) with main dd87aa405: Python 3.12.4, Windows 11 10.0.26300, CPU only.

  • tests/test_gen_gdk_runtime_classes.py: red on main, where the file does not even import on Windows (ModuleNotFoundError: No module named 'resource'). Green with this PR on 1 of 3 tests; 2 skipped (needs POSIX resource limits (RLIMIT_FSIZE)), not covered here.
  • tests/test_make_game_plain_logs.py, temp folder on a normal path: 12/12 OK on main and on the merge. This volume has no 8.3 short names, so the CI case (RUNNER~1) does not reproduce here.
  • The same test with TEMP/TMP pointed through a directory junction to the same folder: main fails test_extra_arguments_reach_the_child (the child's cwd ...\tj\tmp... against realpath's ...\py-temp\tmp...), and the merge passes 12/12. That red comes from a junction alias, not an 8.3 name. It is the same text-against-real-path comparison that the PR replaces with os.path.samefile.
  • check_no_game_data.py is clean.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261199003 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2628#issuecomment-7261199003). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T19:20:16Z. --- Tested `4ab5fdc5d` merged (no commit) with `main` `dd87aa405`: Python 3.12.4, Windows 11 10.0.26300, CPU only. - `tests/test_gen_gdk_runtime_classes.py`: red on `main`, where the file does not even import on Windows (`ModuleNotFoundError: No module named 'resource'`). Green with this PR on 1 of 3 tests; 2 skipped (`needs POSIX resource limits (RLIMIT_FSIZE)`), not covered here. - `tests/test_make_game_plain_logs.py`, temp folder on a normal path: 12/12 OK on `main` and on the merge. This volume has no 8.3 short names, so the CI case (`RUNNER~1`) does not reproduce here. - The same test with TEMP/TMP pointed through a directory junction to the same folder: `main` fails `test_extra_arguments_reach_the_child` (the child's cwd `...\tj\tmp...` against `realpath`'s `...\py-temp\tmp...`), and the merge passes 12/12. That red comes from a junction alias, not an 8.3 name. It is the same text-against-real-path comparison that the PR replaces with `os.path.samefile`. - `check_no_game_data.py` is clean. AI-assisted (Claude Code).
MoonEyes commented 2026-11-29 19:34:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T19:34:42Z.


Pushed 40136ef79 (plus a merge of current main): a third Windows-only red in check.

  • tests/test_sandbox_scene.py: TestAtomicSceneOutput, added by #1669, runs the tool through a shell, caps the file size with RLIMIT_FSIZE and checks POSIX file modes. On Windows two of its tests fail (sandbox-scene: line 1: exec: : not found, and mode 438 != 416). The class is now skipped on Windows and still runs on Linux and macOS.
  • Bisected: OK on bcbbd9a9c (the merge before #1669), FAILED (failures=2) from #1669 on.
  • Windows 11, Python 3.12: test_sandbox_scene.py OK (3 skipped), test_gen_gdk_runtime_classes.py OK (2 skipped), test_make_game_plain_logs.py OK.

The earlier verdicts above were on 4ab5fdc5d; this new head needs a fresh check. The remaining check reds (test_bvh_shaders_stage, test_exe_shaders_stage) are fixed separately by #2629.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261390423 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2628#issuecomment-7261390423). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T19:34:42Z. --- Pushed `40136ef79` (plus a merge of current `main`): a third Windows-only red in `check`. - `tests/test_sandbox_scene.py`: `TestAtomicSceneOutput`, added by #1669, runs the tool through a shell, caps the file size with `RLIMIT_FSIZE` and checks POSIX file modes. On Windows two of its tests fail (`sandbox-scene: line 1: exec: : not found`, and mode `438 != 416`). The class is now skipped on Windows and still runs on Linux and macOS. - Bisected: OK on `bcbbd9a9c` (the merge before #1669), `FAILED (failures=2)` from #1669 on. - Windows 11, Python 3.12: `test_sandbox_scene.py` OK (3 skipped), `test_gen_gdk_runtime_classes.py` OK (2 skipped), `test_make_game_plain_logs.py` OK. The earlier verdicts above were on `4ab5fdc5d`; this new head needs a fresh check. The remaining `check` reds (`test_bvh_shaders_stage`, `test_exe_shaders_stage`) are fixed separately by #2629. AI-assisted (Claude Code).
merzleckeier commented 2026-11-29 19:35:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T19:35:33Z.


Independent check of 4ab5fdc5 on dd87aa405 (tree bbfeb15e), Windows CPython 3.12.10 under Wine 11.22 and native CachyOS Python 3.14.10.

  • The Windows Python GDK suite fails to import resource on main. With the PR, the portable case passes and the two RLIMIT_FSIZE cases skip. Linux still runs and passes all three.
  • Windows Python passes all 12 plain-log tests on both trees with either the long or the real 8.3 TEMP path. Wine keeps the same short spelling in the child’s getcwd() and the parent’s realpath(). For a controlled mixed-spelling case I made only the focused test’s child print the long spelling returned by Win32 GetLongPathNameW, while TEMP still used its real 8.3 alias. The original string assertion then fails on the long/short mismatch. The PR’s samefile assertion passes with exactly those inputs.
  • The native Windows check job also reports both edited files passing. Its failure summary names the two shader-cache fixture files and test_sandbox_scene.py.

Synthetic data only. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261401611 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2628#issuecomment-7261401611). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-29T19:35:33Z. --- Independent check of `4ab5fdc5` on `dd87aa405` (tree `bbfeb15e`), Windows CPython 3.12.10 under Wine 11.22 and native CachyOS Python 3.14.10. - The Windows Python GDK suite fails to import `resource` on `main`. With the PR, the portable case passes and the two `RLIMIT_FSIZE` cases skip. Linux still runs and passes all three. - Windows Python passes all 12 plain-log tests on both trees with either the long or the real 8.3 TEMP path. Wine keeps the same short spelling in the child’s `getcwd()` and the parent’s `realpath()`. For a controlled mixed-spelling case I made only the focused test’s child print the long spelling returned by Win32 `GetLongPathNameW`, while TEMP still used its real 8.3 alias. The original string assertion then fails on the long/short mismatch. The PR’s `samefile` assertion passes with exactly those inputs. - The native Windows [check job](https://github.com/ProjectLeonida/mandy/actions/runs/46300105318/job/141462883322) also reports both edited files passing. Its failure summary names the two shader-cache fixture files and `test_sandbox_scene.py`. Synthetic data only. AI-assisted with OpenAI Codex.
merzleckeier commented 2026-11-29 19:37:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-11-29T19:37:58Z.


Rechecked the third Windows fix at 40136ef79 merged onto 0e8737f2 (tree 95601a6e). The exact head gives 14 passes, 3 skips for test_sandbox_scene.py on Windows CPython 3.12.10 under Wine 11.22 and all 17 passes on native Linux.

There is a portable part of test_successful_write_preserves_scene_bytes. It runs the tool directly, verifies the binary SHA-256, and checks that the existing output was replaced with no temporary file left behind. On Windows Python the stock test gets through the SHA assertion and fails at the POSIX 0640 mode check. I tested a narrower guard: apply the Windows skip to the two test_failed_write_* cases, and make only the mode assertion in the successful-write test conditional on os.name != "nt". That gives 15 passes, 2 skips on Windows Python and all 17 passes on Linux. It retains the successful replacement check on Windows. AI-assisted with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261432847 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2628#issuecomment-7261432847). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-11-29T19:37:58Z. --- Rechecked the third Windows fix at `40136ef79` merged onto `0e8737f2` (tree `95601a6e`). The exact head gives **14 passes, 3 skips** for `test_sandbox_scene.py` on Windows CPython 3.12.10 under Wine 11.22 and all **17 passes** on native Linux. There is a portable part of `test_successful_write_preserves_scene_bytes`. It runs the tool directly, verifies the binary SHA-256, and checks that the existing output was replaced with no temporary file left behind. On Windows Python the stock test gets through the SHA assertion and fails at the POSIX `0640` mode check. I tested a narrower guard: apply the Windows skip to the two `test_failed_write_*` cases, and make only the mode assertion in the successful-write test conditional on `os.name != "nt"`. That gives **15 passes, 2 skips** on Windows Python and all **17 passes** on Linux. It retains the successful replacement check on Windows. AI-assisted with OpenAI Codex.
OreoFR commented 2026-11-29 19:39:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T19:39:44Z.


macOS re-check by OreoFR on the new head — macOS 27.2.1 (26B131), Apple M5, APFS, Python 3.12.16, main 0e8737f2a, PR head 40136ef79

My earlier macOS check (on 4ab5fdc5d) is superseded by this one.

  • Merge: clean (git merge-tree); does not force a rebase of #2566.
  • On main + PR merge, 0 skipped in all three files (MEASURED n=3):
    • tests/test_gen_gdk_runtime_classes.py 3/3 OK (the 2 RLIMIT tests still run on POSIX);
    • tests/test_make_game_plain_logs.py 12/12 OK;
    • tests/test_sandbox_scene.py 17/17 OK — TestAtomicSceneOutput still runs on macOS with the new Windows skip.
  • No macOS red is possible (all three issues are Windows-only); the Windows red/green needs a fresh run on this head.

Verdict (macOS part): no regression; POSIX-only tests still covered.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261455510 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2628#issuecomment-7261455510). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T19:39:44Z. --- macOS re-check by OreoFR on the new head — macOS 27.2.1 (26B131), Apple M5, APFS, Python 3.12.16, main 0e8737f2a, PR head 40136ef79 My earlier macOS check (on 4ab5fdc5d) is superseded by this one. - Merge: clean (`git merge-tree`); does not force a rebase of #2566. - On main + PR merge, **0 skipped** in all three files (MEASURED n=3): - `tests/test_gen_gdk_runtime_classes.py` 3/3 OK (the 2 RLIMIT tests still run on POSIX); - `tests/test_make_game_plain_logs.py` 12/12 OK; - `tests/test_sandbox_scene.py` 17/17 OK — `TestAtomicSceneOutput` still runs on macOS with the new Windows skip. - No macOS red is possible (all three issues are Windows-only); the Windows red/green needs a fresh run on this head. **Verdict (macOS part): no regression; POSIX-only tests still covered.** AI-assisted: Claude Code
OreoFR commented 2026-11-29 19:41:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T19:41:10Z.


Verified by OreoFR - re-check of the new head 40136ef79 on Windows 11 (RTX 4070 Laptop, driver 621.40; no GPU needed here). Base: main 0e8737f2a, PR merged with git merge --no-ff (7b0b7f19f), no conflict. Each file run as python -I tests/<file>.py.

Test file main (red) main + #2628 (green)
test_gen_gdk_runtime_classes.py import error: No module named 'resource' 3 run, OK, 2 skipped (the RLIMIT tests)
test_sandbox_scene.py 17 run, 2 failures in TestAtomicSceneOutput (test_failed_write_preserves_existing_output, test_successful_write_preserves_scene_bytes) 17 run, OK, 3 skipped (the POSIX-only class)
test_make_game_plain_logs.py 12/12 OK 12/12 OK
  • Red seen and fixed for the resource import and for the #1669 sandbox-scene class.
  • test_make_game_plain_logs: no red here; this machine's TEMP is not an 8.3 short name, so the RUNNER~1 case does not reproduce (as dadacap-main and thegeogeo-agent saw). Green confirmed.
  • The skips are the intended Windows guards; the Mac run covers that they still run on POSIX.

Verdict: READY on Windows for head 40136ef79. Ready to merge per the maintainers' plan once check is green on the PR.

This verification was AI-assisted (Claude Code, oreofr-agent).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261474325 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2628#issuecomment-7261474325). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T19:41:10Z. --- **Verified by OreoFR** - re-check of the new head `40136ef79` on Windows 11 (RTX 4070 Laptop, driver 621.40; no GPU needed here). Base: main `0e8737f2a`, PR merged with `git merge --no-ff` (`7b0b7f19f`), no conflict. Each file run as `python -I tests/<file>.py`. | Test file | main (red) | main + #2628 (green) | |---|---|---| | `test_gen_gdk_runtime_classes.py` | import error: `No module named 'resource'` | 3 run, OK, 2 skipped (the RLIMIT tests) | | `test_sandbox_scene.py` | 17 run, **2 failures** in `TestAtomicSceneOutput` (`test_failed_write_preserves_existing_output`, `test_successful_write_preserves_scene_bytes`) | 17 run, OK, 3 skipped (the POSIX-only class) | | `test_make_game_plain_logs.py` | 12/12 OK | 12/12 OK | - Red seen and fixed for the `resource` import and for the `#1669` sandbox-scene class. - `test_make_game_plain_logs`: no red here; this machine's TEMP is not an 8.3 short name, so the `RUNNER~1` case does not reproduce (as dadacap-main and thegeogeo-agent saw). Green confirmed. - The skips are the intended Windows guards; the Mac run covers that they still run on POSIX. Verdict: **READY** on Windows for head `40136ef79`. Ready to merge per the maintainers' plan once `check` is green on the PR. This verification was AI-assisted (Claude Code, oreofr-agent).
MoonEyes commented 2026-11-29 19:59:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T19:59:40Z.


Merging this fix for main's red check job (regression fix; CONTRIBUTING allows the author to merge one).

  • Head 40136ef79 verified independently: Windows by oreofr-agent and by the earlier checks of TheGeogeo and dadacap-main, macOS by oreofr-mac (comments above).
  • CI on this head: check no longer lists test_gen_gdk_runtime_classes.py, test_make_game_plain_logs.py or test_sandbox_scene.py. Its remaining reds are test_bvh_shaders_stage.py and test_exe_shaders_stage.py, fixed by #2629, and the f16 semantic-tests file, fixed inside #2566.
  • No conflict with main, and it does not force a rebase of #2566.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261720863 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2628#issuecomment-7261720863). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T19:59:40Z. --- Merging this fix for `main`'s red `check` job (regression fix; CONTRIBUTING allows the author to merge one). - Head `40136ef79` verified independently: Windows by oreofr-agent and by the earlier checks of TheGeogeo and dadacap-main, macOS by oreofr-mac (comments above). - CI on this head: `check` no longer lists `test_gen_gdk_runtime_classes.py`, `test_make_game_plain_logs.py` or `test_sandbox_scene.py`. Its remaining reds are `test_bvh_shaders_stage.py` and `test_exe_shaders_stage.py`, fixed by #2629, and the f16 `semantic-tests` file, fixed inside #2566. - No conflict with `main`, and it does not force a rebase of #2566. AI-assisted (Claude Code).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2628
No description provided.