test_shader_checks: count and fake cs_w32_shift64 (six tests red on main since #590) #721

Manually merged
github merged 1 commit from gh-pr/721/head into gh-pr/721/base 2026-11-26 09:17:58 +00:00
Owner

@⁠Boost9898 on GitHub · 2026-11-24 12:54 UTC · original
Boost9898:fix/shader-checks-shift64 → main · +11 −2 · 1 files · 1 commits · merged 2026-11-24 13:10 UTC

Claimed in the coordination issue as: #14

What and why

#590 (49d904fef) added cs_w32_shift64 to main() in runtime/test/shaders/check.py: a dump whose input records are seeded through VKC_HEAP_INIT. tests/test_shader_checks.py was not updated, so six Wave64Checks tests fail on main 51f316092:

  • TOTAL doesn't count the new case, so the expected N of TOTAL pass line is one short (215 of 219 vs 215 of 220).
  • The fake harness has no answer for cs_w32_shift64, so it falls through to the default branch, writes no dump, and the case fails with no VKC_DUMP file written.

This counts the case in TOTAL and teaches the fake harness to answer it like cs_heap_init. It checks the 1 dump arguments and VKC_OUT_WORDS, then returns check.shift64_words()'s expected words only when the VKC_HEAP_INIT file holds the seeded input records. Otherwise it echoes the input back, so a check.py that stops seeding the inputs still fails.

Tested

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

  • tests/test_shader_checks.py: 14 failures on main 51f316092. With this change, 87 OK on both versions.
  • tests/test_gpu_shift64.py: OK on both versions.
  • Negative control: changing one seeded input word in check.shift64_test makes the 14 failures come back.
  • python -m compileall, git diff --check and scripts/check_no_game_data.py on the changed file: 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 12:54 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/721) `Boost9898:fix/shader-checks-shift64` → `main` · +11 −2 · 1 files · 1 commits · merged 2026-11-24 13:10 UTC Claimed in the coordination issue as: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 ### What and why #590 (`49d904fef`) added `cs_w32_shift64` to `main()` in `runtime/test/shaders/check.py`: a dump whose input records are seeded through `VKC_HEAP_INIT`. `tests/test_shader_checks.py` was not updated, so six `Wave64Checks` tests fail on `main` `51f316092`: - `TOTAL` doesn't count the new case, so the expected `N of TOTAL pass` line is one short (`215 of 219` vs `215 of 220`). - The fake harness has no answer for `cs_w32_shift64`, so it falls through to the default branch, writes no dump, and the case fails with `no VKC_DUMP file written`. This counts the case in `TOTAL` and teaches the fake harness to answer it like `cs_heap_init`. It checks the `1 dump` arguments and `VKC_OUT_WORDS`, then returns `check.shift64_words()`'s expected words only when the `VKC_HEAP_INIT` file holds the seeded input records. Otherwise it echoes the input back, so a `check.py` that stops seeding the inputs still fails. ### Tested Apple M4, macOS 26.5.1, Python 3.14.8 and 3.12.10, CPU only, no game files. - `tests/test_shader_checks.py`: 14 failures on `main` `51f316092`. With this change, 87 OK on both versions. - `tests/test_gpu_shift64.py`: OK on both versions. - Negative control: changing one seeded input word in `check.shift64_test` makes the 14 failures come back. - `python -m compileall`, `git diff --check` and `scripts/check_no_game_data.py` on the changed file: 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)
#590 added cs_w32_shift64 to check.py main() (a VKC_HEAP_INIT-seeded dump),
but test_shader_checks.py neither counts it in TOTAL nor answers it in its
fake harness, so six Wave64Checks tests fail on main. The fake device now
returns the expected words only when check.py seeded the input records.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:17:57 +00:00
github manually merged commit bb83b572e8 into gh-pr/721/base 2026-11-26 09:17:58 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 13:25 UTC · original · approved these changes

Audited and verified. Clean-room compliant.

  • Adds cs_w32_shift64 mock harness assertion in tests/test_shader_checks.py.
  • Validates shift64 words round-trip and heap init seeding.
**@⁠abnalstlll-byte** on GitHub · 2026-11-24 13:25 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/721#pullrequestreview-6039980154) · **approved these changes** Audited and verified. Clean-room compliant. - Adds cs_w32_shift64 mock harness assertion in tests/test_shader_checks.py. - Validates shift64 words round-trip and heap init seeding.
This discussion has been locked. Commenting is limited to contributors.
No description provided.