mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #1663] f64_diff: harden CLI guards, validate hw oracle batch/word counts, and propagate HarnessError out of shrink() #1675
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#1675
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/1663
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/f64-diff-cli-oracle-and-shrink📝 Commits (1)
2ddbf4bf64_diff: harden --ops/--hw-arch/--exe/zero-case CLI guards, validate hw oracle results, and propagate shrink HarnessError📊 Changes
2 files changed (+105 additions, -7 deletions)
View changed files
📝
tests/test_f64_diff.py(+62 -0)📝
tools/f64_diff.py(+43 -7)📄 Description
Item ID:
F64-DIFF-CLI-ORACLE-AND-SHRINKClaim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7155892025
Summary
tools/f64_diff.py): reject empty/whitespace/trailing-comma--ops(previously--ops ""silently ran all 47 ops), deduplicate--opstokens, reject empty--hw-arch/--exe(previously--exe ""silently fell back to defaultvk_harness), and reject zero-case runs (--no-sweep --programs 0without--known) with exit2.hw is None, exact batch length inrun_batch(), exact single-result return inrun_one(), and 4-word list/tuple payloads (previously a short word list like[0, 1]produced a false shader mismatch exit1instead ofHarnessErrorexit2). PropagateHarnessErrorout ofshrink()instead of swallowing it.errors="replace"andOSError->HarnessErrorhandling toglslc,spirv-as, andvk_harnessinvocations inprepare_gpu()/run_gpu().tests/test_f64_diff.py): add 2 regression tests covering all of the above (keeping existing all-skipped-exits-0 tests intact).Verification
python3 -W error -I tests/test_f64_diff.py -v: 34 passed, 0 failed (1.112s).main: ran=34, failures=12, errors=0.python3 -m compileall -q tools/f64_diff.py tests/test_f64_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 SPIR-V interpreter; no game data)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.