mad_denorm_probe: harden CLI parsing, hw oracle validation, and error lifecycle #1674
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1674"
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:46:52Z.
Item ID:
MAD-DENORM-PROBE-CLI-AND-ORACLE(claimed in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156204400)Summary
tools/mad_denorm_probe.py):_extract_hw_words()used by bothcheck_mode_denorm_effect()andrun_hw()to validate thatoracle.run()returns alist/tuplematching the exact kernel count and that every non-string element is a non-emptylist/tuplewith a non-boolintfirst word, preventing false passes on empty/truncated sweep responses and uncaughtIndexError/TypeErroron malformed payloads.asm.valu_skip_reason("v_mad_f32", oracle.arch)inside thetry ... finally: oracle.close()block so the oracle is always closed on every exit path.runner.Unavailable(exit77) andRuntimeError(exit2) raised duringoracle.run()insidetry ... finally.--hw-archand empty/trailing-comma--oracletokens ("","hw,",",translator") with argparse exit code2.tests/test_mad_denorm_probe.py):runner.Unavailableduringrun()-> exit77, andRuntimeErrorduringrun()-> exit2, verifyingoracle.close()on every path.Checklist & Verification
python3 -I scripts/check_no_game_data.py tools/mad_denorm_probe.py tests/test_mad_denorm_probe.pypassed)python3 -W error -I tests/test_mad_denorm_probe.py -v:Ran 5 tests ... OKtests/test_mad_denorm_probe.pyagainst unpatchedmaintools/mad_denorm_probe.py):Ran 5 tests ... FAILED (failures=11, errors=6)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:47:07Z.
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:30Z.
#1674 | head
28e797e63c(merged cleanly with main95b2e6c67) |python -I tests/test_mad_denorm_probe.py| red on main:FAILED (failures=11, errors=6)(false0exit on empty/short sweep lists due to silentzip,boolword accepted as0x1, malformed--oracle/--hw-archflags accepted, and uncaughtIndexError/TypeError/Unavailableinrun_hw/check_mode_denorm_effect) | green on PR+main:5 tests OK| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
_extract_hw_words(enforcing exact batch length and strict integer/non-bool32-bit words across bothcheck_mode_denorm_effectandrun_hw), upfront--oracle/--hw-archvalidation, and unifiedtry/finally: oracle.close()handling forvalu_skip_reason,runner.Unavailable -> exit 77, andRuntimeError -> exit 2intools/mad_denorm_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:48Z.
Red/green:
pytest tests/test_mad_denorm_probe.pyfails on main (17 failed, 4 passed, 1 subtests passed) and passes on head28e797e63cmerged with main (5 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)