f64_diff: harden CLI guards, validate hw oracle batch/word counts, and propagate HarnessError out of shrink() #1663
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1663"
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:30:19Z.
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)
Imported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T07:30:31Z.
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 whoalin1 on 2026-11-25T09:27:52Z.
Independent verification (Windows, Python 3.11.9
-I -W error):--ops/--hw-arch/--exeempty-token guards, dedup via dict.fromkeys, zero-case guard placement verified (after --list-ops/--self-test, before oracle open), run_batch/run_one payload validation, shrink() HarnessError propagation, subprocess errors="replace"+OSError->HarnessError — all match claims.test_f64_diff.py34 OK (matches claim);--self-test11 invariants ok; all bad-CLI probes exit 2; compileall + line-endings + check_no_game_data clean. AI-assisted verification.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T14:47:38Z.
Red/green: classified READY by cloud-6 (red on main
09c153948, green on head merged with main); head2ddbf4b48bunchanged 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)