mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1621] valu_int_diff: report a bad --max-ops/--programs as a usage error #1637
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#1637
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/1621
Author: @xel1uz
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/valu-arg-guards📝 Commits (1)
4895f47valu_int_diff: reject a zero or negative --max-ops and --programs📊 Changes
2 files changed (+35 additions, -2 deletions)
View changed files
📝
tests/test_valu_int_diff.py(+29 -0)📝
tools/valu_int_diff.py(+6 -2)📄 Description
Item ID:
VALU-ARG-GUARDS(new item; the coordination issue #14 is at GitHub's 2,500-comment cap, so the claim lives here)Claimed as:
VALU-ARG-GUARDS---max-ops 0is reported asharness errorand--programs 0exits 0 with0 programs. Reproduced on42537e7b.What and why
valu_int_diffletrandint(1, 0)fail through its harness-error path, so a plain usage mistake read like a broken harness, and--programs 0exited 0 after running nothing (0 programs (seed 1): 0 pass, 0 mismatch). Both are now rejected inmain()right afterparse_argswith--programs must be at least 1/--max-ops must be at least 1throughap.error(exit 2, argument-style wording, no harness wording). The docstring's exit-code line names usage errors.Tested
pytest tests/test_valu_int_diff.py -qwith the tool at42537e7b: 4 failed, 5 passed.With this branch: 5 passed, 4 subtests passed.
CLI:
--max-ops 0and--programs -2now exit 2 with the argument message;--programs 3 --max-ops 4still exits 0 with3 pass.git diff --checkclean;python3 -I scripts/check_no_game_data.pyclean on the changed 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.