fma_mix_probe: harden CLI parsing, hw oracle validation, and Vulkan/translator error handling #1670
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1670
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/fma-mix-probe-cli-and-oracle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Item ID:
FMA-MIX-PROBE-CLI-AND-ORACLE(claimed in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156111455)Summary
Unavailablehandling (tools/fma_mix_probe.py):run_hw(), validate thatoracle.run()returns alist/tuplematchinglen(cases)and that every non-string entry is a non-emptylist/tuplewhose first element is anint(notbool), raisingRuntimeError(exit2) instead of silently truncating viazip()or crashing with uncaughtIndexError/TypeError.runner.Unavailableinside therun_hw()try/finallyblock inmain()soModeUnavailableduringoracle.run()exits77cleanly while closing the oracle.--hw-archand--build, and reject empty or trailing-comma--oracletokens ("","hw,",",translator") with argparse exit code2.rdna2spirv.Unsupportedalongsidespirv_mini_interp.UnsupportedConstructinmain()(exit2harness error).errors="replace"tospirv-asandvk_compute_testsubprocess runs inrun_vulkan()to prevent uncaughtUnicodeDecodeErroron non-UTF-8 output, and avoid duplicatingruntime/test/shadersinsys.path.word &= 0xFFFFFFFFinhalf()so high-bit masking is exact.tests/test_fma_mix_probe.py):Unavailableduringrun()+rdna2spirv.Unsupported, andhalf()masking +run_vulkan(..., errors="replace").Checklist & Verification
python3 -I scripts/check_no_game_data.py tools/fma_mix_probe.py tests/test_fma_mix_probe.pypassed)python3 -W error -I tests/test_fma_mix_probe.py -v:Ran 21 tests ... OKtests/test_fma_mix_probe.pyagainst unpatchedmaintools/fma_mix_probe.py):Ran 21 tests ... FAILED (failures=12, errors=3)python3 -m compileall -q make_game.py tools tests: passedpython3 -I tests/test_text_write_line_endings.py:Ran 3 tests ... OK#1670 | head 5e8a78e5a8cfaca491640db12faef7cd151077df (merged cleanly with main 95b2e6c67) |
python -I tests/test_fma_mix_probe.py| red on main:FAILED (failures=12, errors=3)(malformed--oracle/--hw-arch/--buildflags accepted, unmasked bits above bit 31 inhalf(), and uncaughtIndexError/TypeError/Unsupportedon malformed oracle/translator runs) | green on PR+main:21 tests OK| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
half32-bit masking,run_vulkan(sys.pathdedup +errors="replace"),run_hwbatch-length and strict integer word validation, upfront--oracle/--hw-arch/--buildvalidation, andrunner.Unavailable -> exit 77+rdna2spirv.Unsupported -> exit 2handling intools/fma_mix_probe.py. Also passedtests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK),tests/test_runner_calls_all_tests.py(3 OK), andscripts/check_no_game_data.py.Red/green:
pytest tests/test_fma_mix_probe.pyfails on main (15 failed, 19 passed, 10 subtests passed) and passes on head 5e8a78e5a8cf merged with main (21 passed, 23 subtests passed).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957bb in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)