chore: remove 13 dead one-off scripts, fix /home/nolan test paths, drop unused imports (CHORE-TIER2A-PYTHON-CLEANUP) #2704

Manually merged
github merged 2 commits from github-bot/gh-2704 into gh-pr/2704/base 2026-11-30 09:34:09 +00:00 AGit
Owner

@⁠aslan2142 on GitHub · 2026-11-30 09:01 UTC · original
aslan2142:chore/tier2a-python-cleanup → main · +36 −3398 · 23 files · 2 commits · merged 2026-11-30 09:31 UTC

Item ID: CHORE-TIER2A-PYTHON-CLEANUP (claimed in #2570, follow-up to #2668)

AI-assisted: yes (implemented and independently audited via read-only adversarial review).

Summary

Removes 13 dead / completed one-off research scripts and their dedicated tests (-3,370 LOC, all verified zero external callers and zero doc/workflow references), fixes the last 3 hardcoded /home/nolan/... QEMU paths in tests/test_x64_recomp_*.py, and removes 7 verified unused imports across 6 surviving tools/scripts (22 files changed, +4 / -3,392).

1. Deleted files (13 files, -3,370 LOC — 0 callers, 0 doc/CI refs)

  • tools/valu_int_diff.py + tests/test_valu_int_diff.py: redundant integer VALU fuzzer superseded by vint_diff.py + wint_diff.py + pk16_diff.py + sad_diff.py (72/73 v_* opcodes duplicated; sole remaining opcode v_lerp_u8 is already covered by tests/semantic/test_{alu,valu}_lerp_u8.py, tests/semantic/test_int_ext_fixture.py, runtime/test/shaders/cs_w32_int_ext.asm, and tools/int_hw_probe.py).
  • tools/turing_atlas.py + tests/test_turing_atlas.py: completed one-off Turing PR-body atlas generator.
  • tools/dpp_hw_probe.py + tests/test_dpp_hw_probe.py: completed one-off AMD RX 7800 XT DPP hardware probe.
  • tools/draw_ownership.py + tests/test_draw_ownership.py: completed one-off ASSET-70 measurement campaign script.
  • scripts/carve_all.ps1 + tests/test_carve_all_brackets.py + tests/test_carve_all_paths.py: initial-commit research wrapper ((research tool; the build itself doesn't need it)).
  • scripts/meta_to_xml.ps1 + tests/test_meta_to_xml_paths.py: initial-commit PS 5.1 script requiring external CodeWalker.Core.dll.

2. Fixed & cleaned surviving files (9 files, +4 / -22 LOC)

  • Removed last 3 hardcoded /home/nolan/.nix-profile/bin/qemu-system-aarch64 paths: tests/test_x64_recomp_bitops.py, tests/test_x64_recomp_rcl_rcr.py, tests/test_x64_recomp_std_str.py now use os.environ.get("QEMU_AARCH64") or shutil.which("qemu-system-aarch64") or "" (matching tools/x64_recomp.py:3924 and sibling tests; git grep /home/nolan now returns 0 hits repo-wide).
  • Removed 7 verified unused imports (0 AST/string/test-patch uses):
    • tools/image_fuzz.py: re
    • tools/leonida_launcher.py: shutil
    • tools/probe_gfx1036_vcmp16.py: math, spirv_mini_interp as si
    • tools/shader_link_check.py: Declaration
    • scripts/bench_wave64.py: json
    • scripts/bench_translate.py: statistics

3. Intentionally kept (verified active or referenced)

  • tools/anim_skel_match.py & tools/anim_skeleton_match.py: distinct purposes, both cited in docs/animation.md (:154, :352) and enforced by test_docs_repo_paths.py.
  • tools/analyze_4240_full.py: referenced by tests/test_missing_input_exit_codes.py and tests/test_tool_stdout_encoding.py.
  • tools/batch_glb.py, tools/{cvt,dot,f16misc,mode,vrel}_diff.py, tools/int3_cause.py, scripts/{corpus_watch,shader_stats,bench_translate}.py: active CI fuzzers or actively maintained developer utilities.
  • scripts/run_gpu_tests.py: left untouched to avoid conflicting with open PRs.

Testing

Tested on Linux (x86-64, no GPU required):

  • python3 -m compileall -q make_game.py tools tests scripts — PASS
  • python3 -I make_game.py --help — PASS
  • python3 -I scripts/check_no_game_data.py — PASS
  • tests/test_ci_registration.py (18/18), tests/test_runtime_paths.py (5/5), tests/test_runner_calls_all_tests.py (3/3), tests/test_tool_startup.py (2/2) — ALL PASS
  • All 13 tests/test_docs_*.py — ALL PASS
  • Unit tests for every modified file (test_x64_recomp_{bitops,rcl_rcr,std_str}.py + clean-skip check without QEMU, test_image_fuzz*.py 98 passed / 1 skipped, test_leonida_launcher.py 15/15, test_probe_gfx1036_vcmp16.py 11/11, test_shader_link_check.py 54 ran / 1 skipped, test_bench_wave64.py 15/15, test_bench_translate.py 10/10) — ALL PASS
**@⁠aslan2142** on GitHub · 2026-11-30 09:01 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2704) `aslan2142:chore/tier2a-python-cleanup` → `main` · +36 −3398 · 23 files · 2 commits · merged 2026-11-30 09:31 UTC Item ID: `CHORE-TIER2A-PYTHON-CLEANUP` (claimed in #2570, follow-up to #2668) AI-assisted: yes (implemented and independently audited via read-only adversarial review). ## Summary Removes 13 dead / completed one-off research scripts and their dedicated tests (`-3,370 LOC`, all verified zero external callers and zero doc/workflow references), fixes the last 3 hardcoded `/home/nolan/...` QEMU paths in `tests/test_x64_recomp_*.py`, and removes 7 verified unused imports across 6 surviving tools/scripts (`22 files changed, +4 / -3,392`). ### 1. Deleted files (13 files, `-3,370 LOC` — 0 callers, 0 doc/CI refs) - `tools/valu_int_diff.py` + `tests/test_valu_int_diff.py`: redundant integer VALU fuzzer superseded by `vint_diff.py` + `wint_diff.py` + `pk16_diff.py` + `sad_diff.py` (72/73 `v_*` opcodes duplicated; sole remaining opcode `v_lerp_u8` is already covered by `tests/semantic/test_{alu,valu}_lerp_u8.py`, `tests/semantic/test_int_ext_fixture.py`, `runtime/test/shaders/cs_w32_int_ext.asm`, and `tools/int_hw_probe.py`). - `tools/turing_atlas.py` + `tests/test_turing_atlas.py`: completed one-off Turing PR-body atlas generator. - `tools/dpp_hw_probe.py` + `tests/test_dpp_hw_probe.py`: completed one-off AMD RX 7800 XT DPP hardware probe. - `tools/draw_ownership.py` + `tests/test_draw_ownership.py`: completed one-off ASSET-70 measurement campaign script. - `scripts/carve_all.ps1` + `tests/test_carve_all_brackets.py` + `tests/test_carve_all_paths.py`: initial-commit research wrapper (`(research tool; the build itself doesn't need it)`). - `scripts/meta_to_xml.ps1` + `tests/test_meta_to_xml_paths.py`: initial-commit PS 5.1 script requiring external `CodeWalker.Core.dll`. ### 2. Fixed & cleaned surviving files (9 files, `+4 / -22 LOC`) - **Removed last 3 hardcoded `/home/nolan/.nix-profile/bin/qemu-system-aarch64` paths:** `tests/test_x64_recomp_bitops.py`, `tests/test_x64_recomp_rcl_rcr.py`, `tests/test_x64_recomp_std_str.py` now use `os.environ.get("QEMU_AARCH64") or shutil.which("qemu-system-aarch64") or ""` (matching `tools/x64_recomp.py:3924` and sibling tests; `git grep /home/nolan` now returns 0 hits repo-wide). - **Removed 7 verified unused imports (0 AST/string/test-patch uses):** - `tools/image_fuzz.py`: `re` - `tools/leonida_launcher.py`: `shutil` - `tools/probe_gfx1036_vcmp16.py`: `math`, `spirv_mini_interp as si` - `tools/shader_link_check.py`: `Declaration` - `scripts/bench_wave64.py`: `json` - `scripts/bench_translate.py`: `statistics` ### 3. Intentionally kept (verified active or referenced) - `tools/anim_skel_match.py` & `tools/anim_skeleton_match.py`: distinct purposes, both cited in `docs/animation.md` (`:154`, `:352`) and enforced by `test_docs_repo_paths.py`. - `tools/analyze_4240_full.py`: referenced by `tests/test_missing_input_exit_codes.py` and `tests/test_tool_stdout_encoding.py`. - `tools/batch_glb.py`, `tools/{cvt,dot,f16misc,mode,vrel}_diff.py`, `tools/int3_cause.py`, `scripts/{corpus_watch,shader_stats,bench_translate}.py`: active CI fuzzers or actively maintained developer utilities. - `scripts/run_gpu_tests.py`: left untouched to avoid conflicting with open PRs. ## Testing Tested on Linux (x86-64, no GPU required): - `python3 -m compileall -q make_game.py tools tests scripts` — PASS - `python3 -I make_game.py --help` — PASS - `python3 -I scripts/check_no_game_data.py` — PASS - `tests/test_ci_registration.py` (18/18), `tests/test_runtime_paths.py` (5/5), `tests/test_runner_calls_all_tests.py` (3/3), `tests/test_tool_startup.py` (2/2) — ALL PASS - All 13 `tests/test_docs_*.py` — ALL PASS - Unit tests for every modified file (`test_x64_recomp_{bitops,rcl_rcr,std_str}.py` + clean-skip check without QEMU, `test_image_fuzz*.py` 98 passed / 1 skipped, `test_leonida_launcher.py` 15/15, `test_probe_gfx1036_vcmp16.py` 11/11, `test_shader_link_check.py` 54 ran / 1 skipped, `test_bench_wave64.py` 15/15, `test_bench_translate.py` 10/10) — ALL PASS
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 09:06:55 +00:00
Author
Owner

@⁠OreoFR on GitHub · 2026-11-30 09:02 UTC · original

Checked by OreoFR on macOS 27.2.1, Apple M5 (arm64, QEMU path: qemu-system-aarch64 11.1.3 from Homebrew on PATH), Python 3.12.16 -I, main dcba958e5, PR head 45df09b84. MEASURED:

  • Deleted tools/scripts have no remaining reference in main + this PR (git grep of valu_int_diff, turing_atlas, draw_ownership, dpp_hw_probe, carve_all, meta_to_xml: 0 hits each).
  • tests/test_x64_recomp_bitops.py 9/9, test_x64_recomp_rcl_rcr.py 5/5, test_x64_recomp_std_str.py 5/5, OK both on main and with this PR. No red here: on this Mac qemu-system-aarch64 is found on PATH either way, so the hardcoded /home/nolan/... candidate on main is never needed; the change is a cleanup rather than a fix you can see fail.
  • The 6 surviving files with removed imports (tools/image_fuzz.py, leonida_launcher.py, probe_gfx1036_vcmp16.py, shader_link_check.py, scripts/bench_translate.py, bench_wave64.py) compile (py_compile).
  • Merges cleanly with main and with #2566.

Not covered: whether the deleted tools still had users outside the repository (a maintainer's call).

AI-assisted: Claude Code

**@⁠OreoFR** on GitHub · 2026-11-30 09:02 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2704#issuecomment-7273667311) Checked by OreoFR on macOS 27.2.1, Apple M5 (arm64, QEMU path: qemu-system-aarch64 11.1.3 from Homebrew on `PATH`), Python 3.12.16 `-I`, main dcba958e5, PR head 45df09b84. MEASURED: - **Deleted tools/scripts have no remaining reference** in main + this PR (`git grep` of `valu_int_diff`, `turing_atlas`, `draw_ownership`, `dpp_hw_probe`, `carve_all`, `meta_to_xml`: 0 hits each). - `tests/test_x64_recomp_bitops.py` 9/9, `test_x64_recomp_rcl_rcr.py` 5/5, `test_x64_recomp_std_str.py` 5/5, OK both on main and with this PR. **No red here**: on this Mac `qemu-system-aarch64` is found on `PATH` either way, so the hardcoded `/home/nolan/...` candidate on main is never needed; the change is a cleanup rather than a fix you can see fail. - The 6 surviving files with removed imports (`tools/image_fuzz.py`, `leonida_launcher.py`, `probe_gfx1036_vcmp16.py`, `shader_link_check.py`, `scripts/bench_translate.py`, `bench_wave64.py`) compile (`py_compile`). - Merges cleanly with main and with #2566. Not covered: whether the deleted tools still had users outside the repository (a maintainer's call). AI-assisted: Claude Code
Update `tests/semantic/test_interp_computed_ij_fallback.py` (#2239) to
narrow `v_interp_p2_f16` reference expectations toward zero (`f16_rtz` /
`f16_rtz_bits`), matching `SHADER-468` (#1181).

AI-assisted.
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-30 09:23 UTC · original

Carried #2633's fix (c717967d0, author unchanged — @zmasi) to align tests/semantic/test_interp_computed_ij_fallback.py with SHADER-468 toward-zero v_interp_p2_f16 narrowing (which is currently failing CI/semantic-tests on main). Verified test_interp_computed_ij_fallback.py 9/9 PASS locally; will drop cleanly on rebase if #2633 merges first. Thanks @OreoFR for verifying on macOS!

**@⁠aslan2142** on GitHub · 2026-11-30 09:23 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2704#issuecomment-7274136327) Carried #2633's fix (`c717967d0`, author unchanged — `@zmasi`) to align `tests/semantic/test_interp_computed_ij_fallback.py` with `SHADER-468` toward-zero `v_interp_p2_f16` narrowing (which is currently failing `CI/semantic-tests` on `main`). Verified `test_interp_computed_ij_fallback.py` 9/9 PASS locally; will drop cleanly on rebase if #2633 merges first. Thanks `@OreoFR` for verifying on macOS!
github-bot changed target branch from main to gh-pr/2704/base 2026-11-30 09:34:08 +00:00
github manually merged commit c717967d0c into gh-pr/2704/base 2026-11-30 09:34:09 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!2704
No description provided.