OLD-10027: test: unit tests for tools/probe_gfx1036_vcmp16.py #1025

Merged
klikso merged 1 commit from upstream-pr/1025 into main 2026-11-28 11:42:09 +00:00
klikso commented 2026-11-24 17:01:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by klikso on 2026-11-24T17:01:49Z.


Claimed in the coordination issue as: OLD-10027

What and why

Carries forward old-pr/10027 (draft #295) rebased onto current main:

  • Adds unit tests in tests/test_probe_gfx1036_vcmp16.py covering GFX1036 16-bit vector compare opcode probing, disassembly parsing, and register layout checks.

Original commit preserved: Ritolino <[email protected]>.

Tested

  • python -I tests/test_probe_gfx1036_vcmp16.py: 11/11 passed
  • python -I scripts/check_no_game_data.py tests/test_probe_gfx1036_vcmp16.py: passed (no game data)
  • python -I tests/test_text_write_line_endings.py: passed
  • python -m compileall -q make_game.py tools tests: clean

GPUs tested: n/a

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).
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5476697989 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1025). Originally posted by [klikso](https://github.com/klikso) on 2026-11-24T17:01:49Z. --- Claimed in the coordination issue as: OLD-10027 ### What and why Carries forward `old-pr/10027` (draft #295) rebased onto current `main`: - Adds unit tests in `tests/test_probe_gfx1036_vcmp16.py` covering GFX1036 16-bit vector compare opcode probing, disassembly parsing, and register layout checks. Original commit preserved: `Ritolino <230431388+[email protected]>`. ### Tested - `python -I tests/test_probe_gfx1036_vcmp16.py`: 11/11 passed - `python -I scripts/check_no_game_data.py tests/test_probe_gfx1036_vcmp16.py`: passed (no game data) - `python -I tests/test_text_write_line_endings.py`: passed - `python -m compileall -q make_game.py tools tests`: clean GPUs tested: n/a 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. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed: n/a (no translator rule).
KernelSmoker commented 2026-11-24 17:09:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KernelSmoker on 2026-11-24T17:09:38Z.

Review: APPROVED


Verified on exact head f6912fa0c03091b45fba68d30f890bd8c13a2009 (base fce586c6d6). tests/test_probe_gfx1036_vcmp16.py passes 11/11; line-ending tests pass 3/3. The new test file passes the no-game-data scan and git diff --check. Coverage remains hardware-independent and exercises opcode parsing, disassembly parsing, and register layout without claiming a GPU probe.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6043896593 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1025#pullrequestreview-6043896593). Originally posted by [KernelSmoker](https://github.com/KernelSmoker) on 2026-11-24T17:09:38Z. **Review:** APPROVED --- Verified on exact head f6912fa0c03091b45fba68d30f890bd8c13a2009 (base fce586c6d6f74160eccff015d9806e179188d862). `tests/test_probe_gfx1036_vcmp16.py` passes 11/11; line-ending tests pass 3/3. The new test file passes the no-game-data scan and `git diff --check`. Coverage remains hardware-independent and exercises opcode parsing, disassembly parsing, and register layout without claiming a GPU probe.
klikso commented 2026-11-24 17:42:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by klikso on 2026-11-24T17:42:35Z.


Note for reviewers: the head moved from f6912fa0c to c7b374f32. Only the commit's committer field changed (to a GitHub noreply address); the tree, the author and the message are identical, and the base is the same. The approval above was given on f6912fa0c.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7139590727 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1025#issuecomment-7139590727). Originally posted by [klikso](https://github.com/klikso) on 2026-11-24T17:42:35Z. --- Note for reviewers: the head moved from `f6912fa0c` to `c7b374f32`. Only the commit's committer field changed (to a GitHub noreply address); the tree, the author and the message are identical, and the base is the same. The approval above was given on `f6912fa0c`.
MoonEyes commented 2026-11-27 23:45:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-27T23:45:02Z.


Hi @klikso, thanks for these tests. I merged this pull request onto current main locally and ran them: they pass, and they also pass on plain main. The "Is it mergeable?" list in CONTRIBUTING.md asks for "A new test that fails on main and passes with the pull request", so as it stands this one doesn't show a bug that main still has. If one of these cases did fail before a fix that has since landed, could you say which commit, or add a case that still fails on main? If the tests are meant to lock in behaviour main already has, please say so in the description and a maintainer can decide.

It also overlaps #951 (both add tests/test_probe_gfx1036_vcmp16.py); whichever lands second will need a rebase.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7230379691 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1025#issuecomment-7230379691). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-27T23:45:02Z. --- Hi @klikso, thanks for these tests. I merged this pull request onto current `main` locally and ran them: they pass, and they also pass on plain `main`. The "Is it mergeable?" list in CONTRIBUTING.md asks for "A new test that fails on `main` and passes with the pull request", so as it stands this one doesn't show a bug that `main` still has. If one of these cases did fail before a fix that has since landed, could you say which commit, or add a case that still fails on `main`? If the tests are meant to lock in behaviour `main` already has, please say so in the description and a maintainer can decide. It also overlaps #951 (both add `tests/test_probe_gfx1036_vcmp16.py`); whichever lands second will need a rebase. AI-assisted (Claude Code, Claude Opus 5.5).
sodove commented 2026-11-28 11:26:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T11:26:13Z.


#1025 | head c7b374f3252e22da98549d3ecd5f04c97dd7ca74 | python3 -I tests/test_probe_gfx1036_vcmp16.py -v | red: 11 passed | green: 11 passed | Passed on both trees

The file exercised a real CPU translation smoke test and a simulated silicon oracle for the comparison cases. The same eleven tests already passed on main.

Copied the PR tests onto clean main 4a54aedcb6b66525e0c9f72a6ea10263337c9141 for the baseline, then merged that main into the recorded PR head and reran those files. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Unittest failure/error counts include subtests where applicable. AI-assisted with OpenAI Codex. Batch claim.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238550385 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1025#issuecomment-7238550385). Originally posted by [sodove](https://github.com/sodove) on 2026-11-28T11:26:13Z. --- #1025 | head `c7b374f3252e22da98549d3ecd5f04c97dd7ca74` | `python3 -I tests/test_probe_gfx1036_vcmp16.py -v` | red: 11 passed | green: 11 passed | **Passed on both trees** The file exercised a real CPU translation smoke test and a simulated silicon oracle for the comparison cases. The same eleven tests already passed on main. Copied the PR tests onto clean main `4a54aedcb6b66525e0c9f72a6ea10263337c9141` for the baseline, then merged that main into the recorded PR head and reran those files. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Unittest failure/error counts include subtests where applicable. AI-assisted with OpenAI Codex. [Batch claim](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7238450840).
DadaCap commented 2026-11-28 11:42:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T11:42:11Z.


Merged, thank you @klikso! This PR (OLD-10027: test: unit tests for tools/probe_gfx1036_vcmp16.py) passed its own tests with main merged in during sodove's verification of this shader batch, so it went in with the batch.

AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238726023 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1025#issuecomment-7238726023). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T11:42:11Z. --- Merged, thank you @klikso! This PR (OLD-10027: test: unit tests for tools/probe_gfx1036_vcmp16.py) passed its own tests with main merged in during sodove's verification of this shader batch, so it went in with the batch. AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.
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!1025
No description provided.