tests/semantic: LEONIDA_REQUIRE_SPIRV_TOOLS=0 no longer requires the tools in active_cache and reg_ptr_hoist (TEST-REQUIRE-SPIRV-TOOLS-EQ-1) #1677

Manually merged
github merged 1 commit from gh-pr/1677/head into gh-pr/1677/base 2026-11-26 10:00:28 +00:00
Owner

@⁠MoonEyes on GitHub · 2026-11-25 07:53 UTC · original
MoonEyes:tests/require-spirv-tools-eq-1 → main · +2 −2 · 2 files · 1 commits · merged 2026-11-25 09:01 UTC

Claimed in the coordination issue as: TEST-REQUIRE-SPIRV-TOOLS-EQ-1

What and why

.github/workflows/ci.yml:193 sets LEONIDA_REQUIRE_SPIRV_TOOLS to '0' on non-Linux runners. tests/semantic/test_active_cache.py:56 and tests/semantic/test_reg_ptr_hoist.py:59 read it for truthiness, so "0" counted as "required", and both files failed in the Windows semantic-tests leg, which has no SPIRV-Tools (main run 45369028646). They now compare with "1", as test_fma_khr.py, test_fma_khr_f64.py and test_spirv_tools_required.py already do.

The two lines are the ones in draft #136 (carried over from old PR 9866). I asked there on 2026-11-24 whether anyone would rebase it down to them and had no answer, so this lands them on their own. #676 fixed the other two files of that Windows leg.

Tested

Windows 11, Python 3.14, python -I scripts/run_semantic_tests.py tests/semantic -p <file> for both files:

no SPIRV-Tools, unset no SPIRV-Tools, 0 no SPIRV-Tools, 1 SPIRV-Tools, 1
main 3f81d46ac pass fail fail (expected) not run
this PR pass pass fail (expected) pass

GPUs tested: n/a

AI-assisted: yes (Claude Code made the change and ran the measurements; I checked them)

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)

🤖 Generated with Claude Code

**@⁠MoonEyes** on GitHub · 2026-11-25 07:53 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1677) `MoonEyes:tests/require-spirv-tools-eq-1` → `main` · +2 −2 · 2 files · 1 commits · merged 2026-11-25 09:01 UTC Claimed in the coordination issue as: TEST-REQUIRE-SPIRV-TOOLS-EQ-1 ### What and why `.github/workflows/ci.yml:193` sets `LEONIDA_REQUIRE_SPIRV_TOOLS` to `'0'` on non-Linux runners. `tests/semantic/test_active_cache.py:56` and `tests/semantic/test_reg_ptr_hoist.py:59` read it for truthiness, so `"0"` counted as "required", and both files failed in the Windows `semantic-tests` leg, which has no SPIRV-Tools (main run 45369028646). They now compare with `"1"`, as `test_fma_khr.py`, `test_fma_khr_f64.py` and `test_spirv_tools_required.py` already do. The two lines are the ones in draft #136 (carried over from old PR 9866). I asked there on 2026-11-24 whether anyone would rebase it down to them and had no answer, so this lands them on their own. #676 fixed the other two files of that Windows leg. ### Tested Windows 11, Python 3.14, `python -I scripts/run_semantic_tests.py tests/semantic -p <file>` for both files: | | no SPIRV-Tools, unset | no SPIRV-Tools, `0` | no SPIRV-Tools, `1` | SPIRV-Tools, `1` | |---|---|---|---|---| | main 3f81d46ac | pass | **fail** | fail (expected) | not run | | this PR | pass | **pass** | fail (expected) | pass | GPUs tested: n/a AI-assisted: yes (Claude Code made the change and ran the measurements; I checked them) ### 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) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ci.yml sets LEONIDA_REQUIRE_SPIRV_TOOLS to "0" on non-Linux runners, and
test_active_cache and test_reg_ptr_hoist read it for truthiness, so "0"
counted as required and both files failed in the Windows semantic-tests
leg, which has no SPIRV-Tools. They now compare with "1", as
test_fma_khr, test_fma_khr_f64 and test_spirv_tools_required already do.
The two lines come from #136 (carried over from old PR 9866).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:00:27 +00:00
github manually merged commit a9f8dc886b into gh-pr/1677/base 2026-11-26 10:00:27 +00:00
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-25 08:41 UTC · original

Independent verification (Windows, no SPIRV-Tools on PATH): 2-line fix (== "1" instead of truthiness) confirmed — ci.yml sets LEONIDA_REQUIRE_SPIRV_TOOLS='0' on non-Linux which was truthy before, real bug. test_active_cache.py: unset->9 pass, =0->pass (previously failed), =1->8 expected failures without tools. test_reg_ptr_hoist.py: unset->5 pass, =0->pass, =1->4 expected failures. Only untested cell is tools-present+=1 (no SPIRV-Tools installed); unaffected by this change. AI-assisted verification.

**@⁠whoalin1** on GitHub · 2026-11-25 08:41 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1677#issuecomment-7157360958) Independent verification (Windows, no SPIRV-Tools on PATH): 2-line fix (`== "1"` instead of truthiness) confirmed — ci.yml sets `LEONIDA_REQUIRE_SPIRV_TOOLS='0'` on non-Linux which was truthy before, real bug. `test_active_cache.py`: unset->9 pass, `=0`->pass (previously failed), `=1`->8 expected failures without tools. `test_reg_ptr_hoist.py`: unset->5 pass, `=0`->pass, `=1`->4 expected failures. Only untested cell is tools-present+`=1` (no SPIRV-Tools installed); unaffected by this change. AI-assisted verification.
Author
Owner

@⁠OreoFR on GitHub · 2026-11-25 08:43 UTC · original

Independent check on native Windows, tests.semantic.test_active_cache + tests.semantic.test_reg_ptr_hoist. "No tools" means spirv-as and spirv-val off PATH; "tools" means the Vulkan SDK's are on it:

tree LEONIDA_REQUIRE_SPIRV_TOOLS SPIRV-Tools result
main 3f81d46ac 0 no tools FAILED (12 failures), the red Windows leg
#1677 a9f8dc886 0 no tools OK
#1677 1 no tools FAILED (12 failures): 1 still requires the tools
#1677 0 tools OK, modules validated
#1677 1 tools OK
main 1 tools OK (the Linux leg's case, unchanged)

On main, these two files are the only readers of the variable that test it for truthiness; test_fma_khr, test_fma_khr_f64, test_sopc_validation, test_unary_f16_validation and test_spirv_tools_required already compare with "1". So the change covers every reader, and it matches the ci.yml switch ('1' on Linux, '0' elsewhere).

AI-assisted.

**@⁠OreoFR** on GitHub · 2026-11-25 08:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1677#issuecomment-7157389095) Independent check on native Windows, `tests.semantic.test_active_cache` + `tests.semantic.test_reg_ptr_hoist`. "No tools" means spirv-as and spirv-val off `PATH`; "tools" means the Vulkan SDK's are on it: | tree | `LEONIDA_REQUIRE_SPIRV_TOOLS` | SPIRV-Tools | result | |---|---|---|---| | `main` `3f81d46ac` | `0` | no tools | FAILED (12 failures), the red Windows leg | | #1677 `a9f8dc886` | `0` | no tools | OK | | #1677 | `1` | no tools | FAILED (12 failures): `1` still requires the tools | | #1677 | `0` | tools | OK, modules validated | | #1677 | `1` | tools | OK | | `main` | `1` | tools | OK (the Linux leg's case, unchanged) | On `main`, these two files are the only readers of the variable that test it for truthiness; `test_fma_khr`, `test_fma_khr_f64`, `test_sopc_validation`, `test_unary_f16_validation` and `test_spirv_tools_required` already compare with `"1"`. So the change covers every reader, and it matches the `ci.yml` switch (`'1'` on Linux, `'0'` elsewhere). AI-assisted.
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 09:01 UTC · original

Merged. Reviewed: the fix is right and covers every reader that tested the variable for truthiness.

  • The claim in #1608 came before the PR and is unedited; the overlap with draft #136 is credited.
  • git grep LEONIDA_REQUIRE_SPIRV_TOOLS: the other five readers already compare with "1", and no doc relies on the old meaning.
  • Measured on Linux with spirv-as/spirv-val hidden: main fails 12 tests with =0 and this branch passes; =1 still fails without the tools, and every case passes with them.
  • Checked on main 604ddff0b + a9f8dc886: the semantic suite passes (487 files, 6,279 tests, 0 files failed); the 14 docs and writer tests pass; check_no_game_data.py is clean on the 2 changed files.

Thanks, and thanks to whoalin1 and OreoFR for the Windows checks.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-25 09:01 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1677#issuecomment-7157764879) Merged. Reviewed: the fix is right and covers every reader that tested the variable for truthiness. - The claim in #1608 came before the PR and is unedited; the overlap with draft #136 is credited. - `git grep LEONIDA_REQUIRE_SPIRV_TOOLS`: the other five readers already compare with `"1"`, and no doc relies on the old meaning. - Measured on Linux with `spirv-as`/`spirv-val` hidden: `main` fails 12 tests with `=0` and this branch passes; `=1` still fails without the tools, and every case passes with them. - **Checked on `main` `604ddff0b` + `a9f8dc886`:** the semantic suite passes (487 files, 6,279 tests, 0 files failed); the 14 docs and writer tests pass; `check_no_game_data.py` is clean on the 2 changed files. Thanks, and thanks to whoalin1 and OreoFR for the Windows checks. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.