[PR #5] [MERGED] tests: the BVH shader-stage fixture writes the FSPX key the step checks for #63

Closed
opened 2026-11-26 20:16:40 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/5
Author: @wavehs
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: test-bvh-fspx-cache-key


📝 Commits (1)

  • 90edda5 tests: the BVH shader-stage fixture writes the FSPX key the step checks for

📊 Changes

1 file changed (+4 additions, -2 deletions)

View changed files

📝 tests/test_bvh_shaders_stage.py (+4 -2)

📄 Description

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.)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/5 **Author:** [@wavehs](https://github.com/wavehs) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `test-bvh-fspx-cache-key` --- ### 📝 Commits (1) - [`90edda5`](https://github.com/ubiquitarianism/leonida/commit/90edda52c3c8a24eec05b47de74ca12704beece1) tests: the BVH shader-stage fixture writes the FSPX key the step checks for ### 📊 Changes **1 file changed** (+4 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_bvh_shaders_stage.py` (+4 -2) </details> ### 📄 Description 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.) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:16:40 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#63
No description provided.