mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:25:53 +01:00
[PR #2270] valu_fuzz: prevent oracle leak, validate CLI options upfront, and add stdlib tests #2275
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#2275
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/2270
Author: @kirigayakazima
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/valu-fuzz-cli-safety📝 Commits (1)
2c0ed64valu_fuzz: prevent oracle leak, validate CLI options upfront, and add stdlib tests📊 Changes
2 files changed (+160 additions, -40 deletions)
View changed files
➕
tests/test_valu_fuzz_cli.py(+116 -0)📝
tools/valu_fuzz.py(+44 -40)📄 Description
Claimed in the coordination issue as: VALU-FUZZ-ORACLE-LEAK-CLI-VALIDATION-AND-TESTS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7191306204)
What and why
tools/valu_fuzz.pypreviously:main()with noargvparameter and openedrunner.open_oracle()before validating--show, while also omittingtry/finallyoracle cleanup acrosshw_family_skip_reason,--gfx10-word3, andshow().--keepand--negative-controlunder--model-only, and accepted empty--keep ""or a regular file path for--keep.subprocess.run(..., text=True)intranslate()andrun_gpu()withoutencoding="utf-8", errors="replace", and readindex.jsonwithout"utf-8-sig".This validates
--show,--keep, and--negative-controlupfront before opening the hardware oracle, wraps all post-open oracle usage in onetry/finallysooracle.close()always runs, uses UTF-8 (errors="replace"/utf-8-sig) intranslate()andrun_gpu(), and adds stdlibunittestCLI coverage intests/test_valu_fuzz_cli.py.Tested
python -I tests/test_valu_fuzz_cli.py -v(5 passed)upstream/mainbaseline negative control: failed withtests/test_valu_fuzz_cli.pybefore the fixpython -I tests/test_ci_registration.py,python -I tests/test_text_write_line_endings.py,python -I scripts/check_no_game_data.py,python -I -m compileall -q, andgit diff --cached --checkGPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.