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

Merged
Boost9898 merged 1 commit from upstream-pr/721 into main 2026-11-24 13:10:07 +00:00
Boost9898 commented 2026-11-24 12:54:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Boost9898 on 2026-11-24T12:54:20Z.


Claimed in the coordination issue as: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7132029799

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)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5472534565 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/721). Originally posted by [Boost9898](https://github.com/Boost9898) on 2026-11-24T12:54:20Z. --- Claimed in the coordination issue as: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7132029799 ### 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)
abnalstlll-byte commented 2026-11-24 13:25:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T13:25:17Z.

Review: APPROVED


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.
<!-- greyfinch-sync:ubiquitarianism/leonida:review:6039980154 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/721#pullrequestreview-6039980154). Originally posted by [abnalstlll-byte](https://github.com/abnalstlll-byte) on 2026-11-24T13:25:17Z. **Review:** APPROVED --- 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.
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!721
No description provided.