tests: the BVH shader-stage fixture writes the FSPX key the step checks for #5

Merged
wavehs merged 1 commit from upstream-pr/5 into main 2026-11-24 01:40:17 +00:00
wavehs commented 2026-11-24 01:28:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-24T01:28:30Z.


Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository has no such issue yet. This fixes the red tests/test_bvh_shaders_stage.py on main; no other open pull request touches it.

Depends on: none.

What and why

make_game.fspx_cache_complete only accepts an FSPX translation index whose compute row carries fspx_code_sha256 (added by 32c010551), the key the runtime looks the program up by. The fake rdna2spirv.py in tests/test_bvh_shaders_stage.py still wrote a row with just "stage": "cs", so shaders() treated the FSPX cache as incomplete and ran fspx_unpack.py + rdna2spirv.py again on every call. The test's second stage() assertion then failed:

AssertionError: Lists differ: ['fspx_unpack.py', 'rdna2spirv.py'] != []

The fake now writes the key, as the real translator does (tests/test_fspx_shaders_stage.py:167). One test file, one row of the fake's index; no tool code changes.

Tested

main@30daa6958, macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files:

tree tests/test_bvh_shaders_stage.py
main@30daa6958 FAILED (failures=1) — the diff above
this commit Ran 13 tests ... OK

Also python -I tests/test_fspx_shaders_stage.py → 23 tests OK, python -m compileall -q make_game.py tools tests clean, python -I scripts/check_no_game_data.py tests/test_bvh_shaders_stage.py clean.

Not run: Windows, any GPU test, the translator suite (no translator code). The assertion is platform-neutral.

AI-assisted: yes.

Checklist

  • 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. (Not applicable: no translator change.)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5464334929 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/5). Originally posted by [wavehs](https://github.com/wavehs) on 2026-11-24T01:28:30Z. --- Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository has no such issue yet. This fixes the red `tests/test_bvh_shaders_stage.py` on `main`; no other open pull request touches it. Depends on: none. ### What and why `make_game.fspx_cache_complete` only accepts an FSPX translation index whose compute row carries `fspx_code_sha256` (added by `32c010551`), the key the runtime looks the program up by. The fake `rdna2spirv.py` in `tests/test_bvh_shaders_stage.py` still wrote a row with just `"stage": "cs"`, so `shaders()` treated the FSPX cache as incomplete and ran `fspx_unpack.py` + `rdna2spirv.py` again on every call. The test's second `stage()` assertion then failed: ``` AssertionError: Lists differ: ['fspx_unpack.py', 'rdna2spirv.py'] != [] ``` The fake now writes the key, as the real translator does (`tests/test_fspx_shaders_stage.py:167`). One test file, one row of the fake's index; no tool code changes. ### Tested `main@30daa6958`, macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files: | tree | `tests/test_bvh_shaders_stage.py` | |---|---| | `main@30daa6958` | `FAILED (failures=1)` — the diff above | | this commit | `Ran 13 tests ... OK` | Also `python -I tests/test_fspx_shaders_stage.py` → 23 tests OK, `python -m compileall -q make_game.py tools tests` clean, `python -I scripts/check_no_game_data.py tests/test_bvh_shaders_stage.py` clean. Not run: Windows, any GPU test, the translator suite (no translator code). The assertion is platform-neutral. AI-assisted: yes. ### Checklist - [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. (Not applicable: no translator change.)
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!5
No description provided.