native_pso_hashes: exit 0 on --help (test_tool_startup red on main since #497) #776

Manually merged
github merged 1 commit from gh-pr/776/head into gh-pr/776/base 2026-11-26 09:20:53 +00:00
Owner

@⁠Boost9898 on GitHub · 2026-11-24 13:41 UTC · original
Boost9898:fix/native-pso-hashes-help → main · +12 −0 · 2 files · 1 commits · merged 2026-11-24 14:37 UTC

Claimed in the coordination issue as: #14

What and why

#497 (1740e093c) added tools/native_pso_hashes.py, which imports its sibling shader_carve. tests/test_tool_startup.py derives its list from such imports and runs each tool with --help. This one took --help as a wrong argument count, printed the usage and exited 2, so test_each_sibling_importing_tool_starts fails on main 647affe2a (tool='native_pso_hashes').

main() now treats -h/--help like tools/mesh_compute_vs.py does: it prints the docstring to stdout and returns 0. A wrong argument count still returns 2. A unit test in tests/test_native_pso_hashes.py covers both flags.

Tested

Apple M4, macOS 26.5.1, Python 3.14.8 and 3.12.10, CPU only, no game files.

  • tests/test_tool_startup.py: fails on main 647affe2a. With this change, OK on both versions.
  • tests/test_native_pso_hashes.py (with the new test): OK on both versions. Negative control: without the change to the tool, the new test fails and so does test_tool_startup.py.
  • python -m compileall, git diff --check and scripts/check_no_game_data.py on the changed files: clean.

GPUs tested: n/a (no GPU tests involved)

AI-assisted: yes

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: no translator rule changes)
**@⁠Boost9898** on GitHub · 2026-11-24 13:41 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/776) `Boost9898:fix/native-pso-hashes-help` → `main` · +12 −0 · 2 files · 1 commits · merged 2026-11-24 14:37 UTC Claimed in the coordination issue as: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 ### What and why #497 (`1740e093c`) added `tools/native_pso_hashes.py`, which imports its sibling `shader_carve`. `tests/test_tool_startup.py` derives its list from such imports and runs each tool with `--help`. This one took `--help` as a wrong argument count, printed the usage and exited 2, so `test_each_sibling_importing_tool_starts` fails on `main` `647affe2a` (`tool='native_pso_hashes'`). `main()` now treats `-h`/`--help` like `tools/mesh_compute_vs.py` does: it prints the docstring to stdout and returns 0. A wrong argument count still returns 2. A unit test in `tests/test_native_pso_hashes.py` covers both flags. ### Tested Apple M4, macOS 26.5.1, Python 3.14.8 and 3.12.10, CPU only, no game files. - `tests/test_tool_startup.py`: fails on `main` `647affe2a`. With this change, OK on both versions. - `tests/test_native_pso_hashes.py` (with the new test): OK on both versions. Negative control: without the change to the tool, the new test fails and so does `test_tool_startup.py`. - `python -m compileall`, `git diff --check` and `scripts/check_no_game_data.py` on the changed files: clean. GPUs tested: n/a (no GPU tests involved) AI-assisted: yes ### 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: no translator rule changes)
tools/native_pso_hashes.py (#497) imports shader_carve, so
test_tool_startup runs it with --help; it took that as a wrong argument
count and exited 2, which fails the test on main. -h/--help now print the
docstring to stdout and return 0, like mesh_compute_vs.py.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:20:51 +00:00
github manually merged commit 116de82f6d into gh-pr/776/base 2026-11-26 09:20:53 +00:00
Author
Owner

@⁠KernelSmoker on GitHub · 2026-11-24 13:43 UTC · original · reviewed

Independent Linux verification of PR head 116de82f6ddaa226cf942da17749345c5e5dc87d on current base 47c6511747c93aa3fb908d7782ca96173d0eead3: tests/test_native_pso_hashes.py passed 9/9 and tests/test_tool_startup.py passed 2/2, including the previously failing sibling-startup case. Direct python3 -I tools/native_pso_hashes.py --help exited successfully and displayed the expected usage; git diff --check passed. Synthetic fixtures only, no game data or GPU. At the latest hosted-check refresh, all reported checks were still queued. AI-assisted independent verification.

**@⁠KernelSmoker** on GitHub · 2026-11-24 13:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/776#pullrequestreview-6040261998) · **reviewed** Independent Linux verification of PR head `116de82f6ddaa226cf942da17749345c5e5dc87d` on current base `47c6511747c93aa3fb908d7782ca96173d0eead3`: `tests/test_native_pso_hashes.py` passed 9/9 and `tests/test_tool_startup.py` passed 2/2, including the previously failing sibling-startup case. Direct `python3 -I tools/native_pso_hashes.py --help` exited successfully and displayed the expected usage; `git diff --check` passed. Synthetic fixtures only, no game data or GPU. At the latest hosted-check refresh, all reported checks were still queued. AI-assisted independent verification.
This discussion has been locked. Commenting is limited to contributors.
No description provided.