fma_mix_literal_probe: harden CLI parsing, hw oracle validation, and word masking #1672
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1672"
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:43:16Z.
Item ID:
FMA-MIX-LITERAL-PROBE-CLI-AND-ORACLE(claimed in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156151636)Summary
Unavailablehandling (tools/fma_mix_literal_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 empty/trailing-comma--oracletokens ("","hw,",",translator") with argparse exit code2.word &= 0xFFFFFFFFinverdict()before exact 32-bit comparison.tests/test_fma_mix_literal_probe.py):Unavailableduringrun()+ oracle closure, and 32-bit word masking inverdict().Checklist & Verification
python3 -I scripts/check_no_game_data.py tools/fma_mix_literal_probe.py tests/test_fma_mix_literal_probe.pypassed)python3 -W error -I tests/test_fma_mix_literal_probe.py -v:Ran 10 tests ... OKtests/test_fma_mix_literal_probe.pyagainst unpatchedmaintools/fma_mix_literal_probe.py):Ran 10 tests ... FAILED (failures=9, 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:43:26Z.
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:28Z.
#1672 | head
c129c53b9c(merged cleanly with main95b2e6c67) |python -I tests/test_fma_mix_literal_probe.py| red on main:FAILED (failures=9, errors=3)(malformed--oracle/--hw-archflags accepted, unmasked>32-bit words inverdict(), and uncaughtIndexError/TypeError/Unavailableinrun_hw/main) | green on PR+main:10 tests OK| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
verdict32-bit masking,run_hwbatch-length and strict integer/non-boolword validation, upfront--oracle/--hw-archCLI validation, andrunner.Unavailable -> exit 77with guaranteedoracle.close()intools/fma_mix_literal_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:49:25Z.
Red/green:
pytest tests/test_fma_mix_literal_probe.pyfails on main (6 failed, 7 passed, 6 subtests passed) and passes on headc129c53b9cmerged with main (10 passed, 17 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)