mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:45:54 +01:00
[PR #1629] dot_diff: reject a zero or negative --max-ops and --programs #1643
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#1643
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/1629
Author: @xel1uz
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/dot-diff-arg-guards📝 Commits (1)
2b85105dot_diff: reject a zero or negative --max-ops and --programs📊 Changes
2 files changed (+43 additions, -0 deletions)
View changed files
📝
tests/test_dot_diff.py(+38 -0)📝
tools/dot_diff.py(+5 -0)📄 Description
Item ID:
DOT-DIFF-ARG-GUARDS(new item; the coordination issue #14 is at GitHub's 2,500-comment cap, so the claim lives here)Claimed as:
DOT-DIFF-ARG-GUARDS---max-ops 0dies in numpy's randint and--programs 0exits 0 having run no random program. Reproduced on42537e7b.What and why
dot_diffvalidated neither count option:--max-ops 0ended inValueError: empty range in randint(1, 0)and--programs 0/--programs -3exited 0 after sweep statistics only (cases per op,results outside the 32-bit range), so a caller could not tell the random stage never ran. Both are now rejected inmain()right afterparse_args, before any work:--max-ops must be at least 1and--programs must be at least 1, viaap.error(exit 2, usage line, no traceback), matching the siblingcf_diff.py. Valid runs are unchanged. Side effect worth naming: the guards sit before the--list-ops/--self-testearly returns, so--list-ops --max-ops 0now also fails - deliberate, arguments are validated up front.Tested
pytest tests/test_dot_diff.py -qwith the tool at42537e7b: 4 failed, 18 passed, 15 subtests passed - only the new guard cases fail.git diff --checkclean;python3 -I scripts/check_no_game_data.pyclean on both files.GPUs tested: n/a - CPU only, no Vulkan device involved.
AI-assisted: Yes.
Checklist
main(42537e7b) and merges cleanly.docs/design.md- not applicable, no translator change.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.