fma_mix_probe: harden CLI parsing, hw oracle validation, and Vulkan/translator error handling #1670
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1670"
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?
Imported from ubiquitarianism/leonida. Originally posted by IlyassRS3 on 2026-11-25T07:41:20Z.
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 ... OKImported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T07:41:32Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T10:47:26Z.
#1670 | head
5e8a78e5a8(merged cleanly with main95b2e6c67) |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.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T14:48:59Z.
Red/green:
pytest tests/test_fma_mix_probe.pyfails on main (15 failed, 19 passed, 10 subtests passed) and passes on head5e8a78e5a8merged with main (21 passed, 23 subtests passed).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
d48a957bbin GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)