vint_diff: restore globals, validate hardware oracle/shrink results and CLI options, and tighten RefError checks #1656
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1656"
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:20:46Z.
Item ID:
VINT-DIFF-ORACLE-CLI-AND-REFClaim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7155721833
Summary
tools/vint_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(preventingAttributeError/IndexErroron empty or short oracle responses); validate 4-word tuples/lists in_diff(); catch transientSkipduring final shrunk recheck and fall back toproblem.--hw-arch,--build, and--work.RefErrorinstead of silent misbehaviour or rawValueError/KeyError/IndexError/TypeErroron invalid operands, non-pair 64-bit sources/destinations, unknown or malformedv_cmp_*/v_cndmask_b32_e64/s_mov_b32forms, wrong source counts, and unsupportedop_selmodifiers (non-OP_SEL_OPS, wrong length, or non-zero trailing selector bits).tests/test_vint_diff.py): add 4 regression tests covering all of the above.Verification
python3 -W error -I tests/test_vint_diff.py -v: 29 passed, 0 failed (2.718s).main: ran=29, failures=9, errors=7.python3 -m compileall -q tools/vint_diff.py tests/test_vint_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)Imported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T07:20:57Z.
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:32:35Z.
Independent verification (Windows, Python 3.11.9
-I -W error): restore-globals claim confirmed —KNOWN/LITERALSsaved+restored infinally, mutation moved after oracle connect,--list-ops/--self-testearly-return before it.hw_run/_diffvalidation, shrink Skip fallback, RefError tightening (incl._e64suffix + CMPS membership on v_cmp) all present.test_vint_diff.py29 OK (matches body);--self-testok; bad-CLI exit 2 / hw-unavailable 77; compileall + line-endings + check_no_game_data clean. AI-assisted verification.Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T11:27:43Z.
#1656 | head
92ae99861a75cd904aab51e36b0a6b6cf722f5ca|python3 -I tests/test_vint_diff.py -v| red: 29 run, 9 failures, 7 errors | green: 29 passed | Red → greenThe test file covers option handling, oracle result shape, shrink behavior and restoration of global settings.
Copied the PR tests onto clean main
4a54aedcb6b66525e0c9f72a6ea10263337c9141for the baseline, then merged that main into the recorded PR head and reran those files. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Unittest failure/error counts include subtests where applicable. AI-assisted with OpenAI Codex. Batch claim.Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T11:44:21Z.
Merged, thank you @IlyassRS3! This PR (vint_diff: restore globals, validate hardware oracle/shrink results and CLI options, and tighten RefError checks) passed its own tests with main merged in during sodove's verification of this shader batch, so it went in with the batch.
AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.