div_fixup_diff: reject empty/unjudged runs, invalid counts, and malformed --ops; accept argv (DIV-FIXUP-DIFF-CLI-AND-EMPTY-RUN-GUARDS) #1616
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1616"
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-25T06:06:47Z.
Item ID:
DIV-FIXUP-DIFF-CLI-AND-EMPTY-RUN-GUARDS(unlisted; coordination issue #14 is at GitHub's 2,500-comment cap with no open successor at submission time, and no open PR touchestools/div_fixup_diff.py).What changed
tools/div_fixup_diff.py,main,run_suite):--no-sweep --programs 0and runs where every program wasunjudgedprinted0/0 judged programs match, 0 mismatchand exited0(false pass). Now empty configurations are refused upfront andjudged == 0exits2.--programs < 0and--max-ops < 1(previously--max-ops 0crashed insiderng.randint(1, max_ops)), and validateprograms/max_opsinrun_suite()against negative andboolvalues.--opsparsing and acceptargv=Noneinmain(argv=None): reject empty/blank/comma-only/trailing-comma--ops(previously--ops ""and--ops ","silently ran all ops or fell back to empty list) and deduplicate repeated op names so sweep/grid/random counts aren't skewed.tests/test_div_fixup_diff.py): 4 new tests inCliGuardscovering all of the above (no game files, no GPU).Verification
python3 -W error -I tests/test_div_fixup_diff.py -v: 29 passedpython3 -W error -I tests/test_text_write_line_endings.py: passedpython3 -I scripts/check_no_game_data.py tools/div_fixup_diff.py tests/test_div_fixup_diff.py: cleanpython3 -m compileall -q tools/div_fixup_diff.py tests/test_div_fixup_diff.py: cleanCliGuardssuite oftests/test_div_fixup_diff.pyagainst unpatchedmain:tools/div_fixup_diff.py): 12 failures, 3 errors across the 4 CLI tests.Imported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T06:06:59Z.
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 MoonEyes on 2026-11-28T10:41:13Z.
Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18).
Targeted batch of 18 PRs (their tests, the tests importing the changed modules, the docs tests) on main
3ca0707: no new failure, Linux / Python 3.13.AI-assisted (Claude Code, Claude Opus 5.5)