mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #1634] buffer_swizzle_probe: upfront atomic JSON validation, CLI guards, and translator wave parity #1648
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#1648
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/1634
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/buffer-swizzle-probe-json-and-cli📝 Commits (1)
deae588buffer_swizzle_probe: upfront atomic JSON validation, CLI guards, and translator wave parity📊 Changes
2 files changed (+221 additions, -19 deletions)
View changed files
📝
tests/test_buffer_swizzle_probe.py(+102 -0)📝
tools/buffer_swizzle_probe.py(+119 -19)📄 Description
Item ID:
BUFFER-SWIZZLE-PROBE-JSON-AND-CLIClaim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7154914906
Summary
Harden CLI validation, JSON report writing, and result classification in
tools/buffer_swizzle_probe.py:--jsonvalidation (validate_json_path): reject empty/whitespace paths, directories, trailing path separators, non-directory parent blockers, and unwritable existing files with exit2before running translator or GPU sweeps (previously--json ""was silently ignored,--json " "created a literal whitespace file, and directory/parent failures only errored after running all sweeps).write_json_report): serialize upfront withallow_nan=Falseand LF endings, handle non-regular targets like/dev/nulldirectly, preserve symlink targets by resolving links before staging, applyfile_mode.published_mode, and publish viareplace_retry.replace.--groupand--hw-archupfront (exit2), deduplicate unknown group diagnostics, check string harnessERRORs before wave comparisons so a compile failure in one wave reportsERRORinstead ofWAVE_DIFF, and enforce wave32/64 parity (WAVE_DIFF/WAVE_SAME) in--oracle translatormode as well as hardware mode.tests/test_buffer_swizzle_probe.py): added 4 test methods covering upfront--jsonvalidation, atomic/symlink/NaN//dev/nullwrites, empty--group/--hw-arch, translator wave parity, and error precedence.Verification
python3 -W error -I tests/test_buffer_swizzle_probe.py -v: 12/12 passedmain:ran=12 failures=3 errors=7python3 -I tests/test_text_write_line_endings.py: 3/3 passedpython3 -I scripts/check_no_game_data.py tools/buffer_swizzle_probe.py tests/test_buffer_swizzle_probe.py: passedpython3 -m compileall -q tools/buffer_swizzle_probe.py tests/test_buffer_swizzle_probe.py: passed🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.