tests: fix four source checks broken on main (PREPARE fixture; ini_key renames; long-path out-of-space folder; DrawParameters Ctx) #1793

Merged
NotRexed merged 9 commits from fix/main-tests-prepare-ini-keys into main 2026-11-10 19:22:50 +00:00
NotRexed commented 2026-11-10 16:53:05 +00:00 (Migrated from github.com)

Main's Python source checks fail on two tests since today's merges. Every open PR's run shows it, #1625 included:

  • test_lift_cleanup_error: it runs make_game.py's say/fail in its own namespace. say() now reads the global PREPARE (#1102's --prepare), which raises NameError: name 'PREPARE' is not defined. The fixture now defines PREPARE=False, its value at the start.
  • test_recomplauncher_json: it only allowed output_res as a row whose saved key isn't its name. ini_key also saves resolution (Render resolution), upscaling (Upscaler) and dlss, and the manifest uses resolution and upscaling. The test now reads those renames from ini_key itself.

Tests only, no product change. Both pass locally on main d71739d2.

🤖 Generated with Claude Code

Main's Python source checks fail on two tests since today's merges. Every open PR's run shows it, #1625 included: - **`test_lift_cleanup_error`:** it runs `make_game.py`'s `say`/`fail` in its own namespace. `say()` now reads the global `PREPARE` (#1102's `--prepare`), which raises `NameError: name 'PREPARE' is not defined`. The fixture now defines `PREPARE=False`, its value at the start. - **`test_recomplauncher_json`:** it only allowed `output_res` as a row whose saved key isn't its name. `ini_key` also saves `resolution` (Render resolution), `upscaling` (Upscaler) and `dlss`, and the manifest uses `resolution` and `upscaling`. The test now reads those renames from `ini_key` itself. Tests only, no product change. Both pass locally on main d71739d2. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Arkex-ai commented 2026-11-10 17:03:32 +00:00 (Migrated from github.com)

Verified 172d56c556 in a clean detached worktree on Windows 11 / Python 3.14.7:

  • python -I -B tests/test_lift_cleanup_error.py: 8 passed.
  • python -I -B tests/test_recomplauncher_json.py: 3 passed.

These address the same PREPARE and saved-key failures in the source checks on our rebased PRs. The upscaling key is valid: ini_key preserves it when the menu row is renamed. No product behavior change or full-suite result is claimed by this focused check.

Verified 172d56c556cc30769ab9397c2e229294df0e90b5 in a clean detached worktree on Windows 11 / Python 3.14.7: - `python -I -B tests/test_lift_cleanup_error.py`: 8 passed. - `python -I -B tests/test_recomplauncher_json.py`: 3 passed. These address the same PREPARE and saved-key failures in the source checks on our rebased PRs. The `upscaling` key is valid: `ini_key` preserves it when the menu row is renamed. No product behavior change or full-suite result is claimed by this focused check.
Arkex-ai commented 2026-11-10 17:08:05 +00:00 (Migrated from github.com)

One additional Windows baseline failure on main 2ea6386: nx2/test_nup_out_of_space.py compares the mocked shutil.disk_usage(path) call's path literally. After #1497, the actual path has the Windows extended-length \\?\ prefix while the expected path does not. This is separate from this PR's two fixes; the existing main/candidate runs reproduce it equally. The fixture should preserve the identity of the directory being measured, the single call and the check that the partial file still exists at measurement time, as well as its later cleanup assertions.

Correction to my original note: this records disk_usage, not rmtree; I rechecked the usage spy in the source.

I am leaving that fix with the current main/CI owners to avoid a duplicate. My masked-clear candidate adds no failure relative to that baseline (267 passed/5 failed/20 skipped versus266/5/20 on Windows).

One additional Windows baseline failure on main `2ea6386`: `nx2/test_nup_out_of_space.py` compares the mocked `shutil.disk_usage(path)` call's path literally. After #1497, the actual path has the Windows extended-length `\\?\` prefix while the expected path does not. This is separate from this PR's two fixes; the existing main/candidate runs reproduce it equally. The fixture should preserve the identity of the directory being measured, the single call and the check that the partial file still exists at measurement time, as well as its later cleanup assertions. Correction to my original note: this records `disk_usage`, not `rmtree`; I rechecked the `usage` spy in the source. I am leaving that fix with the current main/CI owners to avoid a duplicate. My masked-clear candidate adds no failure relative to that baseline (267 passed/5 failed/20 skipped versus266/5/20 on Windows).
Arkex-ai commented 2026-11-10 17:48:50 +00:00 (Migrated from github.com)

Tested both commits from this PR on main ae082989 (which now contains #1819), using validation-only head 4d13196f30de180da327b0d3eb63b44134ae80a1.

Combined source CI: Windows source checks, native F2I lowering, SPIR-V lowering and actionlint passed. Ubuntu finished with 289 passed, 1 failed, 9 skipped. The three fixtures fixed here and both renderer fixtures pass.

The remaining Ubuntu failure is nx2/test_draw_parameters.py: its extracted production capability block now reads ctx.mesh_fallback, but the modeled Ctx only provides wants_mesh_first. Compiler error: no member named 'mesh_fallback' in 'Ctx'. This is a separate fixture dependency; no production failure or all-green result claimed. Sharing the exact integration result rather than opening overlapping CI work.

Tested both commits from this PR on main `ae082989` (which now contains #1819), using validation-only head `4d13196f30de180da327b0d3eb63b44134ae80a1`. [Combined source CI](https://github.com/Arkex-ai/Hookshot/actions/runs/42867555280): Windows source checks, native F2I lowering, SPIR-V lowering and actionlint passed. Ubuntu finished with **289 passed, 1 failed, 9 skipped**. The three fixtures fixed here and both renderer fixtures pass. The remaining Ubuntu failure is `nx2/test_draw_parameters.py`: its extracted production capability block now reads `ctx.mesh_fallback`, but the modeled `Ctx` only provides `wants_mesh_first`. Compiler error: `no member named 'mesh_fallback' in 'Ctx'`. This is a separate fixture dependency; no production failure or all-green result claimed. Sharing the exact integration result rather than opening overlapping CI work.
Arkex-ai commented 2026-11-10 18:32:56 +00:00 (Migrated from github.com)

One new main CI fixture issue after #1839: on exact main 692e87df, test_wayland_libdecor_hint.py fails with Windows LLVM-Mingw:

error: use of undeclared identifier 'setenv'
error: variable 'sdl_ready' set but not used [-Werror,-Wunused-but-set-global]

Complete local main suite:290 passed/4 failed/20 skipped; the other three failures are the already recorded NUP path/disk-usage and local SDK limitations. The same four occur on our candidate, so this is baseline scope. Sharing with the existing CI-repair thread rather than mixing it into a renderer feature. No warning/assertion suppression proposed.

One new main CI fixture issue after #1839: on exact main `692e87df`, `test_wayland_libdecor_hint.py` fails with Windows LLVM-Mingw: ``` error: use of undeclared identifier 'setenv' error: variable 'sdl_ready' set but not used [-Werror,-Wunused-but-set-global] ``` Complete local main suite:290 passed/4 failed/20 skipped; the other three failures are the already recorded NUP path/disk-usage and local SDK limitations. The same four occur on our candidate, so this is baseline scope. Sharing with the existing CI-repair thread rather than mixing it into a renderer feature. No warning/assertion suppression proposed.
NotRexed commented 2026-11-10 19:03:32 +00:00 (Migrated from github.com)

Updated onto main (19:00Z, after #1858). Main has since fixed test_lift_cleanup_error and test_recomplauncher_json on its own, so those are taken as main has them. This PR now fixes the four tests still failing on main:

  • nx2/test_draw_parameters.py: the fixture's Ctx gets mesh_fallback{}.
  • nx2/test_nup_out_of_space.py: strips the \?\ prefix before comparing, on Windows.
  • tests/test_antilag.py: checks Anti-Lag's present stage in present_out. That's present_image's end since present ahead (#1720/#1858), and the test failed on main after #1858.
  • tests/test_wayland_libdecor_hint.py: skipped on Windows. Its harness compiles host/posix/display_sdl.c with POSIX setenv, and failed on windows-2022.
Updated onto main (19:00Z, after #1858). Main has since fixed test_lift_cleanup_error and test_recomplauncher_json on its own, so those are taken as main has them. This PR now fixes the four tests still failing on main: - `nx2/test_draw_parameters.py`: the fixture's `Ctx` gets `mesh_fallback{}`. - `nx2/test_nup_out_of_space.py`: strips the `\?\` prefix before comparing, on Windows. - `tests/test_antilag.py`: checks Anti-Lag's present stage in `present_out`. That's `present_image`'s end since present ahead (#1720/#1858), and the test failed on main after #1858. - `tests/test_wayland_libdecor_hint.py`: skipped on Windows. Its harness compiles host/posix/display_sdl.c with POSIX `setenv`, and failed on windows-2022.
Commenting is not possible because the repository is archived.
No description provided.