fma_mix_literal_probe: harden CLI parsing, hw oracle validation, and word masking #1672
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!1672
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/fma-mix-literal-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-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 ... OK#1672 | head c129c53b9cd45fe074f6321210b656fff65d4697 (merged cleanly with main 95b2e6c67) |
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.Red/green:
pytest tests/test_fma_mix_literal_probe.pyfails on main (6 failed, 7 passed, 6 subtests passed) and passes on head c129c53b9cd4 merged with main (10 passed, 17 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)