pknorm_probe: harden CLI parsing, hw oracle validation, and error lifecycle #1675
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1675"
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:48:46Z.
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 ... OKImported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T07:48:59Z.
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-28T11:25:05Z.
#1675 | head
64e7a1ba2e(merged cleanly with main4a54aedcb) |python -I tests/test_pknorm_probe.py| red on main:FAILED (failures=10, errors=4)(false0exit on empty/short oracle batches,boolwords accepted, malformed--oracle/--hw-archflags accepted, and uncaughtIndexError/TypeError/Unavailableinrun_hw/main) | green on PR+main:6 tests OK| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
run_hwbatch-length and strict integer/non-bool32-bit word validation, string-rejection checking beforediffs/nan_halvesbit-shifts, upfront--oracle/--hw-archvalidation, andrunner.Unavailable -> exit 77+RuntimeError -> exit 2underfinally: oracle.close()intools/pknorm_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:51:21Z.
Red/green: classified READY by cloud-5 (red on main
09c153948, green on head merged with main); head64e7a1ba2eunchanged since 2026-11-25, before that run.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)