[PR #762] OLD-3011: tests/semantic: run v_div_fixup_f32 through the translator, not a mock oracle (TEST-545) #800

Open
opened 2026-11-26 20:19:05 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/762
Author: @whoalin1
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: test-545-real-oracle


📝 Commits (1)

  • 4ca48d5 tests/semantic: run v_div_fixup_f32 through the translator, not a mock oracle (TEST-545)

📊 Changes

3 files changed (+402 additions, -903 deletions)

View changed files

📝 tests/semantic/README.md (+5 -0)
➕ tests/semantic/fixtures/div_fixup_f32.asm (+9 -0)
📝 tests/semantic/test_valu_div_fixup.py (+388 -903)

📄 Description

Restores my open PR from the original repository (OLD-3011 / TEST-545), rebased onto current main (2d73c242f).

Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133003627

Summary

  • tests/semantic/test_valu_div_fixup.py previously compared a hand-written Python model against itself without importing tools/rdna2spirv.py, so it passed regardless of what the translator emitted.
  • Replaces the self-testing mock oracle with real translator assertions against tools/rdna2spirv.py and spirv_mini_interp: pure-integer lowering op order and measured classification constants, NaN(S2) over NaN(S1) read off the dataflow, measured rule words, clamp/omod ordering, EXEC-masked preservation, and null-destination behavior.
  • Adds tests/semantic/fixtures/div_fixup_f32.asm and updates tests/semantic/README.md.

Verification (rebased on 2d73c242f)

  • py -3.14 -m unittest discover -s tests/semantic -p test_valu_div_fixup.py -v — 8/8 passed
  • py -3.14 -m unittest discover -s tests/semantic -p test_alu_div_fixup_f32.py -v — 4/4 passed
  • py -3.14 -I tests/test_text_write_line_endings.py — 3/3 passed

AI-assisted (Gemini 4 Neon).


🔄 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/762 **Author:** [@whoalin1](https://github.com/whoalin1) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `test-545-real-oracle` --- ### 📝 Commits (1) - [`4ca48d5`](https://github.com/ubiquitarianism/leonida/commit/4ca48d52526d1372a22a96d0052e82a269d6456f) tests/semantic: run v_div_fixup_f32 through the translator, not a mock oracle (TEST-545) ### 📊 Changes **3 files changed** (+402 additions, -903 deletions) <details> <summary>View changed files</summary> 📝 `tests/semantic/README.md` (+5 -0) ➕ `tests/semantic/fixtures/div_fixup_f32.asm` (+9 -0) 📝 `tests/semantic/test_valu_div_fixup.py` (+388 -903) </details> ### 📄 Description Restores my open PR from the original repository (OLD-3011 / TEST-545), rebased onto current `main` (`2d73c242f`). Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133003627 ### Summary - `tests/semantic/test_valu_div_fixup.py` previously compared a hand-written Python model against itself without importing `tools/rdna2spirv.py`, so it passed regardless of what the translator emitted. - Replaces the self-testing mock oracle with real translator assertions against `tools/rdna2spirv.py` and `spirv_mini_interp`: pure-integer lowering op order and measured classification constants, `NaN(S2)` over `NaN(S1)` read off the dataflow, measured rule words, `clamp`/`omod` ordering, EXEC-masked preservation, and null-destination behavior. - Adds `tests/semantic/fixtures/div_fixup_f32.asm` and updates `tests/semantic/README.md`. ### Verification (rebased on `2d73c242f`) - `py -3.14 -m unittest discover -s tests/semantic -p test_valu_div_fixup.py -v` — **8/8 passed** - `py -3.14 -m unittest discover -s tests/semantic -p test_alu_div_fixup_f32.py -v` — **4/4 passed** - `py -3.14 -I tests/test_text_write_line_endings.py` — **3/3 passed** AI-assisted (Gemini 4 Neon). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#800
No description provided.