mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:25:53 +01:00
[PR #1685] fspx_prologue_probe: validate oracle batches/words, handle tuples/RuntimeError, reject empty --hw-arch #1699
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#1699
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/1685
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/fspx-prologue-probe-oracle-and-cli📝 Commits (1)
59138bdfspx_prologue_probe: validate oracle batches/words, handle tuples/RuntimeError, reject empty --hw-arch📊 Changes
2 files changed (+101 additions, -13 deletions)
View changed files
📝
tests/test_fspx_prologue_probe.py(+60 -0)📝
tools/fspx_prologue_probe.py(+41 -13)📄 Description
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 ... OK🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.