mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #1674] mad_denorm_probe: harden CLI parsing, hw oracle validation, and error lifecycle #1689
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1689
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1674
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/mad-denorm-probe-cli-and-oracle📝 Commits (1)
28e797emad_denorm_probe: harden CLI parsing, hw oracle validation, and error lifecycle📊 Changes
2 files changed (+139 additions, -10 deletions)
View changed files
📝
tests/test_mad_denorm_probe.py(+102 -0)📝
tools/mad_denorm_probe.py(+37 -10)📄 Description
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 ... OK🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.