mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #1661] vrel_diff: reject malformed --ops tokens, guard compare() lane/word counts, handle shrink Skip, and tighten RefError checks #1676
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#1676
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/1661
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/vrel-diff-cli-compare-and-ref📝 Commits (1)
0f7b01bvrel_diff: harden --ops parsing, compare() lane/word bounds, shrink Skip handling, and RefError checks📊 Changes
2 files changed (+103 additions, -11 deletions)
View changed files
📝
tests/test_vrel_diff.py(+61 -0)📝
tools/vrel_diff.py(+42 -11)📄 Description
Item ID:
VREL-DIFF-CLI-COMPARE-AND-REFClaim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7155832832
Summary
--opsvalidation (tools/vrel_diff.py): checkargs.ops is not None(previously--ops ""silently ran all ops and--ops " , "crashed withIndexError), reject empty/trailing comma tokens, and deduplicate op tokens preserving order.compare()): reject mismatched lane counts (previouslygot == []silently returnedNoneas a false pass) and non-32-word lane payloads (previouslyIndexError).run_suite()): catch transientSkipwhen re-evaluating the shrunk program and fall back to the original mismatch detail.State,step(),rel(),events()): raiseRefErrorinstead ofIndexError/ValueError/TypeErroron empty tokens, wrong operand counts, non-integerv_writelane_b32lane indices, and uninitializedm0inevents().tests/test_vrel_diff.py): add 4 regression tests covering all of the above.Verification
python3 -W error -I tests/test_vrel_diff.py -v: 23 passed, 0 failed (2.569s).main: ran=23, failures=8, errors=11.python3 -m compileall -q tools/vrel_diff.py tests/test_vrel_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
spirv_wave_interp; no game data)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.