buffer_format_fuzz: reject a negative --budget #1623
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1623"
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 xel1uz on 2026-11-25T06:11:37Z.
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.Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T17:28:06Z.
Reviewed
0294aed: ranpython -I tests/test_buffer_format_fuzz.py- 7/7 pass with the PR; copied onto main, the 3 negative-budget tests fail, so they genuinely pin the fix. A 12-case CLI probe on both trees shows main accepting--budget -1(exit 0, "self-test: ok") while the PR refuses it with exit 2 before the oracle is opened; budget 0, -0, positive and unrelated options are unchanged. compileall and check_no_game_data.py are clean on the new files. No findings.AI-assisted review.
Recommendation: Merge
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T03:03:06Z.
Hi @xel1uz, thanks for this pull request.
CONTRIBUTING.md asks contributors to claim their work in the coordination issue ("Coordinating who works on what", currently #1608) before opening a pull request: post
claiming: <ID>there, or a one-line description if the item is not listed yet, and put the ID in the pull request. I could not find a claim from you for this one.The claim matters because "it is claimed in the coordination issue by the pull request's author" is the first item on the maintainers' checklist for a mergeable pull request, and because it lets others see that the work is taken before they write it a second time.
Could you post the claim in #1608 and put its ID (or a link to it) on the pull request's "Claimed in the coordination issue as:" line? If you already claimed it in another form, a link to your comment is enough.
AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T20:31:02Z.
#1623 | head
0294aed3dd(merged cleanly with main1bc055e6c2) |python -I tests/test_buffer_format_fuzz.py| red on main:FAILED (failures=3)(--self-test --budget -1and-1000000exited0printingself-test: ok, and--oracle hw --budget -3proceeded past CLI validation instead of exiting2) | green on PR+main:7 tests OK| Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yesAudited
tools/buffer_format_fuzz.pyandtests/test_buffer_format_fuzz.pyon Windows 11, verifyinga.budget < 0raisesap.error("--budget cannot be negative")(exit2) before--self-testor--oracle hwruns while keeping--budget 0legal for deterministic sweep-only runs. Also verifiedtests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK), andscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T00:17:01Z.
Tested
0294aed3dmerged (no commit) withmain829530dbd: Python 3.12.4, Windows 11 10.0.26300, CPU only.check_no_game_data.pyis clean.tests/test_buffer_format_fuzz.py, 7 tests pass.tools/buffer_format_fuzz.pyback tomain, 3 failures (SystemExit not raised).No blocker from my side.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T11:51:52Z.
Tested green here earlier on this same head (see my comment above). The only thing missing for a merge is your claim in the coordination issue #2570.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T17:11:15Z.
Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main
4364a4fa6, PR head0294aed3d: red 3 failures / green 7 OKRe-check on the current main (earlier runs by zmasi and TheGeogeo were on older mains).
git merge-tree). Reviews: none. No game data in the diff. Skipped on the merge: none.test_absurdly_negative_budget_fails_too,test_negative_budget_fails_the_self_test_with_2,test_negative_budget_is_refused_before_the_oracle_is_opened.test_buffer_format_fuzz_cli,test_gfx11_skip,semantic/test_buffer_formats_all): 25 passed on main and merge.--budget < 0refused viaap.error. OK.Verdict: READY
AI-assisted: Claude Code
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-29T18:28:15Z.
Thank you! Merged into
mainwith a merge commit. It was verified ready on its current head (0294aed3d) by OreoFR's Mac agent (macOS, red/green on main + PR); see the verification comment above. (AI-assisted, posted for DadaCap.)