rdna2spirv: refuse a line with too few operands before lowering (D3D12-TRANSLATOR-MISSING-OPERAND) #3266

Merged
RussianSanta12 merged 4 commits from upstream-pr/3266 into main 2026-12-03 15:35:22 +00:00
RussianSanta12 commented 2026-12-02 23:29:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by RussianSanta12 on 2026-12-02T23:29:30Z.


Claimed in the coordination issue as: D3D12-TRANSLATOR-MISSING-OPERAND (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7353400606), from @imShangLi's finding.

What and why

A hand-written listing line with too few operands (a fixture typo) made tools/rdna2spirv.py end in a Python traceback (IndexError, ValueError from unpacking, TypeError) at whichever operand read came first, because the except (IndexError, TypeError) at the end of Gen.insn only turned the no-operand case into Unsupported. An IndexError carries no index, so widening that except would also hide real translator bugs; this adds an operand-count check instead.

  • MIN_OPERANDS is built once at import from the decoder's ISA tables (tools/rdna2_isa_tables.py, already a translator dependency in translator_deps.cmake and make_game.TRANSLATION_SOURCES), one operand per field, keyed by (mnemonic, encoding family): _e64 -> VOP3/VOP3B, _e32/_sdwa/_dpp -> VOP1/VOP2/VOPC, an unsuffixed mnemonic -> the fewest over its encodings. ~1,900 entries, ~1-3 ms at import.
  • Operands a printed line legitimately omits are not counted: the GFX10 v_cmpx destination (EXEC), the implicit VCC operands of VOP2/VOPC short forms (v_cndmask_b32 vD, s0, s1, v_add_co_ci_u32_e32 vD, vcc, s0, s1, v_cmp_class_f32_e32 s0, s1), the VDST of a FLAT-family atomic without glc (or with lds), and the VDATA of a buffer/FLAT-family load with lds (LLVM prints buffer_load_dword v0, s[4:7], 0 offen lds). NOOPS and mnemonics outside the tables are not checked.
  • The check runs at the top of Gen.insn, i.e. only for instructions that are actually lowered: words after s_endpgm (embedded constant tables, which can decode into short lines) are untouched, as on main. Cost: one or two dict lookups per lowered instruction (~0.5 us).
  • A short line is now Unsupported("<op>: expects N operands, got M"); test_insn_no_operands.py's expected message changes accordingly (v_add_f32: expects 3 operands, got 0).

Note: the first commit's message says LLVM always prints every operand; that is not quite true (the MUBUF lds form above), which the second commit handles and documents. Squash on merge if preferred.

No docs/design.md contract row: this is input validation and changes no emitted SPIR-V (the previous no-operand conversion had none either).

Tested

  • New tests/semantic/test_insn_operand_count.py: 11 short lines across the reported crash sites (Gen._insn, v_max3/v_med3 unpacking, compare, sop2_b32_srcs, holds_lane_mask, scalar_load, buffer_address, lds_op, a short global_load_dword, v_cndmask_b32_e64 with 3 operands) assert the exact message; complete lines and the short assembler forms still translate; an LLVM lds buffer load keeps its buffer_load_dword form rejection; short junk after s_endpgm still translates.
  • Red (only tools/rdna2spirv.py restored from main): the new file fails 11 subtests (IndexError/ValueError, and v_cndmask_b32_e64 v0, v1, v2 silently translating). Reproduced independently by the reviewer agent in a throwaway worktree.
  • Green: the new file (4 tests) and test_insn_no_operands, test_wave64_halves_soundness, test_valu_f32_class_rndne, test_sdwa_carry, test_scalar_noop_waitcnt pass.
  • Full translator suite: python -I scripts/run_semantic_tests.py tests/semantic -> 561 files, 6758 tests, 0 files failed.
  • False-rejection hunting (no game files; synthetic only): 124 hand-written LLVM-syntax lines covering VOP1/2/3/3P/C in every suffix, SOPP/SOPK/SOP1, SMEM, MUBUF/MTBUF (incl. off, lds, atomics with/without glc), GLOBAL/SCRATCH/FLAT, DS (gds, swizzle), MIMG (bvh, msaa, bracketed addresses): 0 rejected. 1.6M random encodings through rdna2_decode -> format_insn -> parse_line -> the check: only the decoder's VOP2 madak/madmk/fmaak/fmamk _dpp/_sdwa forms, which LLVM rejects as invalid encodings (posted as a separate finding; they are only checked if actually lowered). All 16,456 instruction lines of the repo's 393 .asm files pass, except a branch to a label named done that never reaches Gen.insn (separate finding: MODWORDS strips done).
  • python -m compileall -q make_game.py tools tests; python -m unittest discover -s tests -p "test_docs_*.py" (57 OK); python -I scripts/check_no_game_data.py.
  • Windows 11, Python 3.12. No game files used.

GPUs tested: n/a (translator input validation; no SPIR-V change, CPU-only tests)

AI-assisted: yes. Implementation: Claude Opus 5.5 (Claude Code). Independent read-only reviewer agent: Claude Opus 5.5 - first pass "changes needed" (check ran on unreachable code; lds loads mislabelled; short global_load still crashed; encoding-blind minimum), all addressed in the second commit; second pass approve, remaining nits applied or noted here.

Follow-up noted by the reviewer (not in this PR): explicit_carry_vcc expands a 3-operand v_*_co_ci_u32_e64 line as if it were the VOP2 short form, so that malformed _e64 line still translates (same as main).

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: input validation, no new lowering rule)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5616607734 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3266). Originally posted by [RussianSanta12](https://github.com/RussianSanta12) on 2026-12-02T23:29:30Z. --- Claimed in the coordination issue as: D3D12-TRANSLATOR-MISSING-OPERAND (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7353400606), from @imShangLi's finding. ### What and why A hand-written listing line with too **few** operands (a fixture typo) made `tools/rdna2spirv.py` end in a Python traceback (`IndexError`, `ValueError` from unpacking, `TypeError`) at whichever operand read came first, because the `except (IndexError, TypeError)` at the end of `Gen.insn` only turned the **no**-operand case into `Unsupported`. An `IndexError` carries no index, so widening that `except` would also hide real translator bugs; this adds an operand-count check instead. - `MIN_OPERANDS` is built once at import from the decoder's ISA tables (`tools/rdna2_isa_tables.py`, already a translator dependency in `translator_deps.cmake` and `make_game.TRANSLATION_SOURCES`), one operand per field, keyed by `(mnemonic, encoding family)`: `_e64` -> VOP3/VOP3B, `_e32`/`_sdwa`/`_dpp` -> VOP1/VOP2/VOPC, an unsuffixed mnemonic -> the fewest over its encodings. ~1,900 entries, ~1-3 ms at import. - Operands a printed line legitimately omits are not counted: the GFX10 `v_cmpx` destination (EXEC), the implicit VCC operands of VOP2/VOPC short forms (`v_cndmask_b32 vD, s0, s1`, `v_add_co_ci_u32_e32 vD, vcc, s0, s1`, `v_cmp_class_f32_e32 s0, s1`), the VDST of a FLAT-family atomic without `glc` (or with `lds`), and the VDATA of a buffer/FLAT-family load with `lds` (LLVM prints `buffer_load_dword v0, s[4:7], 0 offen lds`). `NOOPS` and mnemonics outside the tables are not checked. - The check runs at the top of `Gen.insn`, i.e. only for instructions that are actually lowered: words after `s_endpgm` (embedded constant tables, which can decode into short lines) are untouched, as on `main`. Cost: one or two dict lookups per lowered instruction (~0.5 us). - A short line is now `Unsupported("<op>: expects N operands, got M")`; `test_insn_no_operands.py`'s expected message changes accordingly (`v_add_f32: expects 3 operands, got 0`). Note: the first commit's message says LLVM always prints every operand; that is not quite true (the MUBUF `lds` form above), which the second commit handles and documents. Squash on merge if preferred. No `docs/design.md` contract row: this is input validation and changes no emitted SPIR-V (the previous no-operand conversion had none either). ### Tested - New `tests/semantic/test_insn_operand_count.py`: 11 short lines across the reported crash sites (`Gen._insn`, `v_max3`/`v_med3` unpacking, `compare`, `sop2_b32_srcs`, `holds_lane_mask`, `scalar_load`, `buffer_address`, `lds_op`, a short `global_load_dword`, `v_cndmask_b32_e64` with 3 operands) assert the exact message; complete lines and the short assembler forms still translate; an LLVM `lds` buffer load keeps its `buffer_load_dword form` rejection; short junk after `s_endpgm` still translates. - **Red** (only `tools/rdna2spirv.py` restored from `main`): the new file fails 11 subtests (IndexError/ValueError, and `v_cndmask_b32_e64 v0, v1, v2` silently translating). Reproduced independently by the reviewer agent in a throwaway worktree. - **Green**: the new file (4 tests) and `test_insn_no_operands`, `test_wave64_halves_soundness`, `test_valu_f32_class_rndne`, `test_sdwa_carry`, `test_scalar_noop_waitcnt` pass. - Full translator suite: `python -I scripts/run_semantic_tests.py tests/semantic` -> **561 files, 6758 tests, 0 files failed**. - False-rejection hunting (no game files; synthetic only): 124 hand-written LLVM-syntax lines covering VOP1/2/3/3P/C in every suffix, SOPP/SOPK/SOP1, SMEM, MUBUF/MTBUF (incl. `off`, `lds`, atomics with/without glc), GLOBAL/SCRATCH/FLAT, DS (gds, swizzle), MIMG (bvh, msaa, bracketed addresses): 0 rejected. 1.6M random encodings through `rdna2_decode` -> `format_insn` -> `parse_line` -> the check: only the decoder's VOP2 `madak/madmk/fmaak/fmamk` `_dpp`/`_sdwa` forms, which LLVM rejects as invalid encodings (posted as a separate finding; they are only checked if actually lowered). All 16,456 instruction lines of the repo's 393 `.asm` files pass, except a branch to a label named `done` that never reaches `Gen.insn` (separate finding: `MODWORDS` strips `done`). - `python -m compileall -q make_game.py tools tests`; `python -m unittest discover -s tests -p "test_docs_*.py"` (57 OK); `python -I scripts/check_no_game_data.py`. - Windows 11, Python 3.12. No game files used. GPUs tested: n/a (translator input validation; no SPIR-V change, CPU-only tests) AI-assisted: yes. Implementation: Claude Opus 5.5 (Claude Code). Independent read-only reviewer agent: Claude Opus 5.5 - first pass "changes needed" (check ran on unreachable code; `lds` loads mislabelled; short `global_load` still crashed; encoding-blind minimum), all addressed in the second commit; second pass approve, remaining nits applied or noted here. Follow-up noted by the reviewer (not in this PR): `explicit_carry_vcc` expands a 3-operand `v_*_co_ci_u32_e64` line as if it were the VOP2 short form, so that malformed `_e64` line still translates (same as `main`). ### 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: input validation, no new lowering rule) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
merzleckeier commented 2026-12-02 23:36:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-02T23:36:41Z.

Review: COMMENTED


Two paths still bypass the new operand check on 31b96e3b merged with main at 81efe4566. I reproduced both through support.translate_lines() with a synthetic pixel shader.

  • s_setreg_imm32_b32 and s_setreg_b32 with zero operands raise IndexError in the rounding-mode scan at tools/rdna2spirv.py:22498. The direct count check already gives “expects 2 operands, got 0”, but translation indexes args[0] before it reaches that check.
  • v_add_co_ci_u32_e64 v0, v1, v2 and the corresponding sub instruction translate silently. explicit_carry_vcc() at line 21151 inserts both VCC operands before Gen.insn() validates the count. The raw count check gives “expects 5 operands, got 3”. LLVM llvm-mc for gfx1010 rejects the short _e64 spelling and assembles the five-operand form. LLVM GFX10 instruction syntax

In a scratch copy, checking that the rounding-mode scan has an operand and restricting implicit VCC expansion to the unsuffixed or short encodings made all four inputs produce the intended Unsupported diagnostic. The complete _e64 and short _e32 forms still emitted byte-identical SPIR-V, and 13 focused tests passed. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6161006784 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3266#pullrequestreview-6161006784). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-02T23:36:41Z. **Review:** COMMENTED --- Two paths still bypass the new operand check on `31b96e3b` merged with `main` at `81efe4566`. I reproduced both through `support.translate_lines()` with a synthetic pixel shader. - `s_setreg_imm32_b32` and `s_setreg_b32` with zero operands raise `IndexError` in the rounding-mode scan at `tools/rdna2spirv.py:22498`. The direct count check already gives “expects 2 operands, got 0”, but translation indexes `args[0]` before it reaches that check. - `v_add_co_ci_u32_e64 v0, v1, v2` and the corresponding sub instruction translate silently. `explicit_carry_vcc()` at line 21151 inserts both VCC operands before `Gen.insn()` validates the count. The raw count check gives “expects 5 operands, got 3”. LLVM `llvm-mc` for `gfx1010` rejects the short `_e64` spelling and assembles the five-operand form. [LLVM GFX10 instruction syntax](https://releases.llvm.org/21.1.0/docs/AMDGPU/AMDGPUAsmGFX10.html#vop3) In a scratch copy, checking that the rounding-mode scan has an operand and restricting implicit VCC expansion to the unsuffixed or short encodings made all four inputs produce the intended `Unsupported` diagnostic. The complete `_e64` and short `_e32` forms still emitted byte-identical SPIR-V, and 13 focused tests passed. AI-assisted.
DeadlyChirp commented 2026-12-02 23:45:11 +00:00 (Migrated from github.com)

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


Independent Windows reproduction on PR head 31b96e3ba3c4c9b35c5dd92a50c6a5cc07a600f5 (Windows 11, Python 3.12.10):

py -3.12 -I tests/test_rdna2spirv_decode.py
Ran 25 tests
FAILED (failures=1)

test_dpp_invalid_opcodes_and_boundary_modifiers fails at line 307: the “Missing DPP control” case calls Gen.insn with zero operands, so the new operand check raises v_mov_b32_dpp: expects 2 operands, got 0 before the DPP-control validation; the expected DPP control regex therefore does not match. This matches the failing tests/test_rdna2spirv_decode.py check in CI. Supplying two synthetic VGPR operands in this case would let it exercise the DPP-control path, while the separate operand-count test continues covering zero operands. No game data or GPU used.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7362382364 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3266#issuecomment-7362382364). Originally posted by [DeadlyChirp](https://github.com/DeadlyChirp) on 2026-12-02T23:45:11Z. --- Independent Windows reproduction on PR head `31b96e3ba3c4c9b35c5dd92a50c6a5cc07a600f5` (Windows 11, Python 3.12.10): ```text py -3.12 -I tests/test_rdna2spirv_decode.py Ran 25 tests FAILED (failures=1) ``` `test_dpp_invalid_opcodes_and_boundary_modifiers` fails at line 307: the “Missing DPP control” case calls `Gen.insn` with zero operands, so the new operand check raises `v_mov_b32_dpp: expects 2 operands, got 0` before the DPP-control validation; the expected `DPP control` regex therefore does not match. This matches the failing `tests/test_rdna2spirv_decode.py` check in CI. Supplying two synthetic VGPR operands in this case would let it exercise the DPP-control path, while the separate operand-count test continues covering zero operands. No game data or GPU used.
fiestorra commented 2026-12-03 00:03:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T00:03:27Z.


VERIFY-3266 — Windows nativo: red then green en los dos ficheros de test

Own commit 8cdd86ac1 — tests/semantic/test_insn_operand_count.py (+19), tests/test_rdna2spirv_decode.py (10), tools/rdna2spirv.py

Ran at the head

python -I tests/semantic/test_insn_operand_count.py     Ran 5 tests — OK
python -I tests/test_rdna2spirv_decode.py               Ran 25 tests — OK

Negative control: the commit's own hunk does not revert cleanly (the branch carries a merged main), so I put main's tools/rdna2spirv.py back and re-ran both:

FAIL: test_dpp_invalid_opcodes_and_boundary_modifiers
FAIL: test_short_lines_raise_unsupported_naming_the_op
FAIL: test_bare_exp_in_a_vertex_shader_is_not_a_translator_error

Three bite, and they are the two halves of the change: the message names the op, and a line that is short but not empty is not "no operands".

What the change is, and it is a good distinction: before, any instruction whose operands could not be read raised Unsupported("<op>: no operands") — including a line that had operands, just fewer than its ISA table entry expects. Now check_operand_counts says "<op>: expects N operands, got 0" for a mnemonic in the ISA tables, and Gen.insn keeps "no operands" for another mnemonic — so index.json, which is built from these, points at the right instruction for the right reason.

And the exemption list is the part that shows it was thought through: s_endpgm, v_nop, v_clrexcp, ds_nop, s_barrier in compute stay untouched — "their ISA table entries have no operands and they never fail an operand read". A rule that says "zero operands is an error" would have flagged every one of them, and the comment says why they are not.

What I could not test

  • A shader that produces the short line in a real title: the tests build the lines directly, which is the translator's input.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7362745034 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3266#issuecomment-7362745034). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T00:03:27Z. --- ## VERIFY-3266 — Windows nativo: `red then green` en los dos ficheros de test | | | |---|---| | Own commit | `8cdd86ac1` — `tests/semantic/test_insn_operand_count.py` (+19), `tests/test_rdna2spirv_decode.py` (10), `tools/rdna2spirv.py` | **Ran at the head** ``` python -I tests/semantic/test_insn_operand_count.py Ran 5 tests — OK python -I tests/test_rdna2spirv_decode.py Ran 25 tests — OK ``` **Negative control**: the commit's own hunk does not revert cleanly (the branch carries a merged `main`), so I put **`main`'s `tools/rdna2spirv.py`** back and re-ran both: ``` FAIL: test_dpp_invalid_opcodes_and_boundary_modifiers FAIL: test_short_lines_raise_unsupported_naming_the_op FAIL: test_bare_exp_in_a_vertex_shader_is_not_a_translator_error ``` **Three bite**, and they are the two halves of the change: **the message names the op**, and **a line that is short but not empty is not "no operands"**. **What the change is, and it is a good distinction**: before, **any instruction whose operands could not be read raised `Unsupported("<op>: no operands")`** — including a line **that had operands, just fewer than its ISA table entry expects**. **Now `check_operand_counts` says `"<op>: expects N operands, got 0"` for a mnemonic in the ISA tables, and `Gen.insn` keeps `"no operands"` for another mnemonic** — **so `index.json`, which is built from these, points at the right instruction for the right reason.** **And the exemption list is the part that shows it was thought through**: `s_endpgm`, `v_nop`, `v_clrexcp`, `ds_nop`, `s_barrier` in compute **stay untouched** — *"their ISA table entries have no operands and they never fail an operand read"*. **A rule that says "zero operands is an error" would have flagged every one of them**, and the comment says why they are not. ## What I could not test - **A shader that produces the short line in a real title**: the tests build the lines directly, which is the translator's input. Written with an AI assistant.
merzleckeier commented 2026-12-03 00:05:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T00:05:17Z.

Review: COMMENTED


Rechecked 8cdd86ac merged onto main at 81efe4566. All six newly covered cases fail with the prior translator (31b96e3b) and pass with this head. That covers the two empty s_setreg forms, the three short _e64 carry forms, and the empty vertex export. The valid rounding-mode write, full _e64 carry and short _e32 carry still produce identical SPIR-V in the focused comparison.

The DPP fixture now reaches the intended modifier diagnostics. All 25 decoder tests pass, and the full Linux semantic run completed 6,796 tests across 561 files with zero file failures.

I also checked the integration with the symbolic-branch parser fix #3215 (d0fc19927). The heads merge cleanly. The parser, decoder, operand-count and control-flow branch suites all passed on the combined tree (68 tests). All checks here used synthetic fixtures. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6161319455 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3266#pullrequestreview-6161319455). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T00:05:17Z. **Review:** COMMENTED --- Rechecked `8cdd86ac` merged onto `main` at `81efe4566`. All six newly covered cases fail with the prior translator (`31b96e3b`) and pass with this head. That covers the two empty `s_setreg` forms, the three short `_e64` carry forms, and the empty vertex export. The valid rounding-mode write, full `_e64` carry and short `_e32` carry still produce identical SPIR-V in the focused comparison. The DPP fixture now reaches the intended modifier diagnostics. All 25 decoder tests pass, and the full Linux semantic run completed 6,796 tests across 561 files with zero file failures. I also checked the integration with the symbolic-branch parser fix #3215 (`d0fc19927`). The heads merge cleanly. The parser, decoder, operand-count and control-flow branch suites all passed on the combined tree (68 tests). All checks here used synthetic fixtures. AI-assisted.
aegish-zagi commented 2026-12-03 04:48:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aegish-zagi on 2026-12-03T04:48:10Z.


VERIFY-3266 — PASS

PR #3266 | head 8cdd86ac19 | merged cleanly with current main (d9b618f10) in a scratch worktree, no conflicts
Tests run: tests/semantic/test_insn_no_operands.py, tests/semantic/test_insn_operand_count.py, tests/test_rdna2spirv_decode.py (python -I, stdlib unittest)
Red on main: all three files FAILED on main code with the PR's tests (failures=1, failures=17, failures=1) — MEASURED
Green on PR: all three files OK after merge (4 + 5 + 25 tests) — MEASURED
Diff audit: 4 files, tools/rdna2spirv.py + 3 test files only; operand-count refusal before lowering, no game data (check_no_game_data.py clean on the touched files) — READ IN CODE
Platform: Linux, Python 3.12.3, no GPU

AI-assisted: yes (Muse Wonder, Muse by Meta)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7368059231 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3266#issuecomment-7368059231). Originally posted by [aegish-zagi](https://github.com/aegish-zagi) on 2026-12-03T04:48:10Z. --- VERIFY-3266 — PASS PR #3266 | head 8cdd86ac19816fde5ca8d69d77649fac4bfe74f5 | merged cleanly with current main (d9b618f10) in a scratch worktree, no conflicts Tests run: tests/semantic/test_insn_no_operands.py, tests/semantic/test_insn_operand_count.py, tests/test_rdna2spirv_decode.py (python -I, stdlib unittest) Red on main: all three files FAILED on main code with the PR's tests (failures=1, failures=17, failures=1) — MEASURED Green on PR: all three files OK after merge (4 + 5 + 25 tests) — MEASURED Diff audit: 4 files, tools/rdna2spirv.py + 3 test files only; operand-count refusal before lowering, no game data (check_no_game_data.py clean on the touched files) — READ IN CODE Platform: Linux, Python 3.12.3, no GPU AI-assisted: yes (Muse Wonder, Muse by Meta)
lixonik commented 2026-12-03 06:31:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-03T06:31:00Z.


Windows native verification (red -> green) -- PASS on head 8cdd86ac1 (merged cleanly via git merge --no-ff onto main d9b618f10).

Checks (Windows 10 x64, Python 3.12, PowerShell 5.1)

  • python -I scripts/check_no_game_data.py -> PASS
  • Green:
    • python -I tests/test_rdna2spirv_decode.py -v -> Ran 25 tests in 0.088s / OK
    • python -I tests/semantic/test_insn_no_operands.py -v -> Ran 4 tests in 0.134s / OK
    • python -I tests/semantic/test_insn_operand_count.py -v -> Ran 5 tests in 0.194s / OK
  • Red (reverted tools/rdna2spirv.py to main d9b618f10, keeping the PR's tests):
    • tests/test_rdna2spirv_decode.py -> Ran 25 tests in 0.081s / FAILED (failures=1) (exit 1)
    • tests/semantic/test_insn_no_operands.py -> Ran 4 tests in 0.088s / FAILED (failures=1) (exit 1)
    • tests/semantic/test_insn_operand_count.py -> Ran 5 tests in 0.188s / FAILED (failures=17) (exit 1)

AI-assisted: yes (Antigravity -- Gemini 4 Neon).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7369922644 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3266#issuecomment-7369922644). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-03T06:31:00Z. --- **Windows native verification (`red -> green`) -- PASS** on head `8cdd86ac1` (merged cleanly via `git merge --no-ff` onto `main` `d9b618f10`). ### Checks (Windows 10 x64, Python 3.12, PowerShell 5.1) - `python -I scripts/check_no_game_data.py` -> **PASS** - **Green:** - `python -I tests/test_rdna2spirv_decode.py -v` -> **Ran 25 tests in 0.088s / OK** - `python -I tests/semantic/test_insn_no_operands.py -v` -> **Ran 4 tests in 0.134s / OK** - `python -I tests/semantic/test_insn_operand_count.py -v` -> **Ran 5 tests in 0.194s / OK** - **Red** (reverted `tools/rdna2spirv.py` to `main` `d9b618f10`, keeping the PR's tests): - `tests/test_rdna2spirv_decode.py` -> **Ran 25 tests in 0.081s / FAILED (failures=1)** (exit `1`) - `tests/semantic/test_insn_no_operands.py` -> **Ran 4 tests in 0.088s / FAILED (failures=1)** (exit `1`) - `tests/semantic/test_insn_operand_count.py` -> **Ran 5 tests in 0.188s / FAILED (failures=17)** (exit `1`) AI-assisted: yes (Antigravity -- Gemini 4 Neon).
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!3266
No description provided.