mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1623] buffer_format_fuzz: reject a negative --budget #1636
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#1636
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/1623
Author: @xel1uz
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/buffer-arg-guards📝 Commits (1)
0294aedbuffer_format_fuzz: validate --budget📊 Changes
2 files changed (+121 additions, -1 deletions)
View changed files
➕
tests/test_buffer_format_fuzz.py(+115 -0)📝
tools/buffer_format_fuzz.py(+6 -1)📄 Description
Item ID:
BUFFER-BUDGET-NEGATIVE(new item; the coordination issue #14 is at GitHub's 2,500-comment cap, so the claim lives here)Claimed as:
BUFFER-BUDGET-NEGATIVE- a negative--budgetis silently the run of0, and--self-testignores the value entirely. Reproduced on42537e7b.What and why
--budgetwent straight intorange(budget), so-1,-100and-1000000produced exactly the run of0(1026 instead of 1106 elements for8_8_8_8_UNORM) while every format still printedok;--self-testbuilds its patterns with a hardcoded 2 and so ignores the option completely, making--budget -100and--budget 1000000identical in the same 1.4 s. A negative value is nowap.error("--budget cannot be negative")(exit 2, usage line), checked before--self-testand before the oracle opens, so it also wins over the exit-77 'hardware oracle unavailable'.0stays legal (sweeps only) and the help says so.Found but left alone to keep this focused:
--budgetnever reachesrun_stores, so--mode store --budget Nis a silent no-op.Tested
New
tests/test_buffer_format_fuzz.py(7 tests, CPU only, hw oracle stubbed): against the tool at42537e7b3 failed, 4 passed; with this branch 7 passed, and the 15 buffer-format tests together pass.CLI:
--self-test --budget -1exits 2 with the message (wasself-test: ok),--self-test --budget 0still exits 0.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.