fspx_prologue_probe: validate oracle batches/words, handle tuples/RuntimeError, reject empty --hw-arch #1685
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!1685
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/fspx-prologue-probe-oracle-and-cli"
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:
FSPX-PROLOGUE-PROBE-ORACLE-AND-CLI(claimed in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156604721)Summary
tools/fspx_prologue_probe.py):oracle.run(all_kernels, words=64)returns alist/tuplematchinglen(all_kernels), preventing an empty or truncated batch from silently passing withPASS: 50/50(exit0)._extract_words()to accept bothlistandtuplekernel outputs, verify at leastk.wordsnon-boolintwords (masking to 32 bits), and raiseRuntimeError(exit2) on short/malformed payloads instead of crashing withStopIteration(on matching short prefixes or tuple rows) orIndexError(in negative-control checks), while preserving exit1for string kernel rejections.RuntimeErrorfromoracle.run()insiderun_hw()(printingharness error:to stderr and exiting2while closing the oracle).--hw-archwith argparse exit code2.tests/test_fspx_prologue_probe.py):--hw-arch, tuple oracle rows passing cleanly, empty/short/long/None/short-positive/short-negative/bool/None-row payloads exiting2(never false-passing or crashing), andRuntimeErrorduringoracle.run()exiting2while closing the oracle.Checklist & Verification
python3 -I scripts/check_no_game_data.py tools/fspx_prologue_probe.py tests/test_fspx_prologue_probe.pypassed)python3 -W error -I tests/test_fspx_prologue_probe.py -v:Ran 7 tests ... OKtests/test_fspx_prologue_probe.pyagainst unpatchedmaintools/fspx_prologue_probe.py):Ran 7 tests ... FAILED (failures=2, errors=1)python3 -m compileall -q make_game.py tools tests: passedpython3 -I tests/test_text_write_line_endings.py:Ran 3 tests ... OKIndependent verification (Windows, Python 3.11.9
-I):_extract_wordsvalidates list/tuple rows of non-bool ints (>=k.words, masked 32-bit), batch length checked, malformed ->RuntimeError-> harness-error exit 2 (old StopIteration/IndexError crashes gone),--hw-archempty/whitespace rejected.test_fspx_prologue_probe.py7 OK;--self-testok (50 prologue cases + 8 negative controls);--hw-arch ""/" "-> exit 2; compileall + line-endings +check_no_game_dataclean. AI-assisted verification.Merged after local re-verification: this PR merged onto
main0318164b8 without conflict, and its test file(s) (tests/test_fspx_prologue_probe.py) pass there. Earlier today the same tests failed onmainwithout the PR (red/green) and a bundle with other open PRs showed no new failures.check_no_game_data.pyis clean. Windows 11, Python 3.14; no GPU needed for these tests.AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.