mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:25:52 +01:00
[PR #1675] pknorm_probe: harden CLI parsing, hw oracle validation, and error lifecycle #1688
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#1688
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/1675
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/pknorm-probe-cli-and-oracle📝 Commits (1)
64e7a1bpknorm_probe: harden CLI parsing, hw oracle validation, and error lifecycle📊 Changes
2 files changed (+127 additions, -3 deletions)
View changed files
📝
tests/test_pknorm_probe.py(+100 -0)📝
tools/pknorm_probe.py(+27 -3)📄 Description
Item ID:
PKNORM-PROBE-CLI-AND-ORACLE(claimed in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156255931)Summary
tools/pknorm_probe.py):run_hw(), validate thatoracle.run()returns alist/tuplematchinglen(case_list)and that every non-string entry is a non-emptylist/tuplewhose first element is anint(notbool), preventing false passes on empty/short sweep outputs (zip()truncation) and uncaughtIndexError/TypeErroron malformed payloads.runner.Unavailable(exit77) andRuntimeError(exit2) raised duringoracle.run()insidetry ... finally: oracle.close().--hw-archand empty/trailing-comma--oracletokens ("","hw,",",translator") with argparse exit code2.tests/test_pknorm_probe.py):CliAndOracleTestscovering malformed/empty CLI flags, empty/short/long/malformed oracle payloads, string rejection entries,runner.Unavailable-> exit77, andRuntimeError-> exit2, verifyingoracle.close()on every path.Checklist & Verification
python3 -I scripts/check_no_game_data.py tools/pknorm_probe.py tests/test_pknorm_probe.pypassed)python3 -W error -I tests/test_pknorm_probe.py -v:Ran 6 tests ... OKtests/test_pknorm_probe.pyagainst unpatchedmaintools/pknorm_probe.py):Ran 6 tests ... FAILED (failures=10, errors=4)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.