mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1654] pk16_diff: restore globals, validate hardware oracle/shrink results and CLI options, and tighten RefError checks #1668
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#1668
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/1654
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/pk16-diff-oracle-cli-and-ref📝 Commits (1)
7586cc1pk16_diff: restore globals, validate oracle/shrink results and CLI options, and enforce RefError checks📊 Changes
2 files changed (+158 additions, -8 deletions)
View changed files
📝
tests/test_pk16_diff.py(+94 -0)📝
tools/pk16_diff.py(+64 -8)📄 Description
Item ID:
PK16-DIFF-ORACLE-CLI-AND-REFClaim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7155677593
Summary
tools/pk16_diff.py): restoreKNOWNandLITERALSinmain()'sfinallyblock (and handle--list-ops/--self-testbefore mutating them) so in-process runs do not leak flags.hw_run()validatingoracle is not Noneand exact result-list length across bothrun_suite()and shrinkcheck_fn(avoidingAttributeError/IndexErroron empty or short oracle returns); validate 4-word tuples/lists in_diff(); catch transientSkipduring final shrunk recheck and fall back toproblem.--hw-arch,--build, and--work.RefErrorinstead of silent ignores or rawValueError/IndexError/TypeErroron invalid operands, non-SGPR/non-VGPR destinations, wrong source counts, mismatchedop_sel/op_sel_hilengths,op_sel_hion non-packedOPS_16ops, andclampon ops without clamp support.tests/test_pk16_diff.py): add 4 regression tests covering all of the above.Verification
python3 -W error -I tests/test_pk16_diff.py -v: 20 passed, 0 failed (2.612s).main: ran=20, failures=7, errors=6.python3 -m compileall -q tools/pk16_diff.py tests/test_pk16_diff.py,python3 -I tests/test_text_write_line_endings.py,python3 -I scripts/check_no_game_data.py: all pass.AI-assisted: yes
GPUs tested: none (CPU unit tests with stubbed hardware oracle and
spirv_mini_interp; no game data)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.