mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:20:53 +01:00
[PR #1613] dot_diff: fail on skipped programs, reject invalid counts/empty --ops, and accept argv (DOT-DIFF-SKIPS-AND-CLI) #1625
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#1625
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/1613
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/dot-diff-skips-and-cli📝 Commits (1)
803575ddot_diff: fail on skipped programs, reject invalid counts/empty --ops, and accept argv📊 Changes
2 files changed (+108 additions, -14 deletions)
View changed files
📝
tests/test_dot_diff.py(+70 -0)📝
tools/dot_diff.py(+38 -14)📄 Description
Item ID:
DOT-DIFF-SKIPS-AND-CLI(unlisted; coordination issue #14 is at GitHub's 2,500-comment cap with no open successor at submission time, and no open PR touchestools/dot_diff.py).What changed
main()(tools/dot_diff.py): unlikecvt_diff.py,div_fixup_diff.py, andmode_diff.py,dot_diff.pydid not tracktotal_skip, so a run where every generated program skipped translation exited0(false pass). Nowtotal_skipis tallied across stages and exits1withSKIPPED <N> program(s)when non-zero; a zero-program run exits2.--programs,--max-ops, and empty runs upfront:--programs < 0,--max-ops < 1(which previously crashed insiderng.randint(1, max_ops)), and--no-sweep --programs 0(which previously ran 0 programs and exited0) with exit2.randomstage when--programs 0is combined with sweep/grid.run_suite()against negative/boolprogramsand< 1/boolmax_ops.--opsparsing and acceptargv=Noneinmain(argv=None): reject empty/blank/trailing-comma--ops(previously--ops ""silently ran all 12 ops), trim whitespace around"gfx103x", and deduplicate repeated op names so sweep/grid/random weights aren't skewed.tests/test_dot_diff.py): 4 new tests inCliGuardscovering all of the above (no game files, no GPU).Verification
python3 -W error -I tests/test_dot_diff.py -v: 21 passedpython3 -W error -I tests/test_text_write_line_endings.py: passedpython3 -I scripts/check_no_game_data.py tools/dot_diff.py tests/test_dot_diff.py: cleanpython3 -m compileall -q tools/dot_diff.py tests/test_dot_diff.py: cleantests/test_dot_diff.pyagainst unpatchedmain:tools/dot_diff.py): 11 failures, 3 errors across the 21 tests (all 4 new tests fail on unpatchedmain).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.