Skip to content

tests/semantic: drop test_int_to_float.py, a model-only test - #4083

Closed
slint6614-dev wants to merge 1 commit into
ItsNotRexed:mainfrom
slint6614-dev:test/drop-int-to-float-model
Closed

slint6614-dev wants to merge 1 commit into
ItsNotRexed:mainfrom
slint6614-dev:test/drop-int-to-float-model

Conversation

@slint6614-dev

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: new TEST item, #3918 (comment)

What and why

tests/semantic/test_int_to_float.py is in DEBT in tests/test_semantic_translator_use.py. It imported nothing from the repository. It checked Python's own float()/struct conversions against hand-written bit patterns, plus an i32 -> f64 case for v_cvt_f64_i32, which tools/rdna2spirv.py doesn't implement. So it passed whatever the translator did.

The translator paths it is about are already covered by tests that do run the translator, so a rewrite would only duplicate them. This deletes the file and its DEBT entry, as the DEBT comment allows ("fixing the file, or deleting it, simply removes it from the debt"). No other file references it.

Tested

Linux (WSL2), CPython 3.14.4, CPU only, no GPU, no game files, at aa2988cc:

  • python -I tests/test_semantic_translator_use.py: pass. git diff --check: clean.

Coverage that stays: I mutated tools/rdna2spirv.py and ran every test file that uses v_cvt_f32_i32/v_cvt_f32_u32 (CI-style, all green on main first):

Mutation caught by
v_cvt_f32_i32 converted as unsigned (OpConvertUToF) test_alu_vop3_mods_hw.py, test_f32_fuzz.py, test_values.py, test_translate.py
v_cvt_f32_u32 converted as signed (OpConvertSToF) test_f32_fuzz.py, test_values.py, test_translate.py

The deleted file catches neither, since it never calls the translator.

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. (No new rule: test-only.)

AI-assisted (Claude Code).

🤖 Generated with Claude Code

https://claude.ai/code/session_013nWg6BssUf8MjNaKuMSkfc

The file imported nothing from the repository. It checked Python's own
float()/struct conversions against hand-written bit patterns, plus an
i32 -> f64 case for v_cvt_f64_i32, which tools/rdna2spirv.py does not
implement, so it passed whatever the translator did; it was listed in
DEBT in tests/test_semantic_translator_use.py.

The translator paths it is about are already covered by tests that run
the translator: with v_cvt_f32_i32 converted as unsigned, or
v_cvt_f32_u32 as signed, test_f32_fuzz.py, test_values.py and
test_translate.py fail (and test_alu_vop3_mods_hw.py for the first).
A rewrite would duplicate them, so delete the file and its DEBT entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013nWg6BssUf8MjNaKuMSkfc

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran this at bccf9e0c on Windows 11:

  • python -I tests/test_semantic_translator_use.py -> 3 tests, OK, with test_int_to_float no longer in DEBT.
  • No other file references test_int_to_float; git diff --check clean.

The deleted file imported nothing from the repository and checked Python's own conversion against hand-written bits, including an op the translator does not implement (v_cvt_f64_i32), so it could pass while the translator was wrong. Removing it is the correct way to clear debt rather than moving it to the allowlist. No blocking issue.

@slint6614-dev

Copy link
Copy Markdown
Contributor Author

Superseded by #4114. Deleting this file was the wrong fix: it was a translator test by @Ritolino (9a2db92) that later commits overwrote with a model-only version. #4114 restores the original instead of deleting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants