mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #1639] cvt_f16_omod_probe: harden --modes/--waves, upfront atomic JSON writes, and result count guard #1653
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#1653
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/1639
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/cvt-f16-omod-probe-json-and-cli📝 Commits (1)
11d2b00cvt_f16_omod_probe: harden --modes/--waves, upfront atomic JSON writes, and result count guard📊 Changes
2 files changed (+221 additions, -13 deletions)
View changed files
📝
tests/test_cvt_f16_omod_probe.py(+90 -0)📝
tools/cvt_f16_omod_probe.py(+131 -13)📄 Description
Item ID:
CVT-F16-OMOD-PROBE-JSON-AND-CLIClaim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7155090450
Summary
Harden CLI argument parsing, JSON report writing, and harness error handling in
tools/cvt_f16_omod_probe.py:--modes/--waves/--hw-archguards: reject empty/trailing comma tokens (32,,,rne_d0_i0,32,,64), deduplicate repeated modes/waves so kernels andtotal_casesare not double-counted (and--waves 32,32does not diff wave32 against itself), and reject empty/whitespace--hw-arch.--jsonvalidation: reject empty/whitespace paths, trailing separators, directories, non-directory parent blockers, and unwritable existing targets before openinghw_oracle.write_report(): serialize upfront withallow_nan=Falseand LF endings, handle non-regular targets like/dev/nulldirectly, resolve symlinks before staging to preserve symlink targets, applyfile_mode.published_mode, and publish viareplace_retry.replace.harness_errorsentry whenlen(raw_results) != len(meta)inevaluate_results()(preventingKeyErrorafterzip()truncation), and catchValueErrorfromasm.family(oracle.arch)cleanly (exit77).tests/test_cvt_f16_omod_probe.py): added 4 test methods covering malformed/duplicate--modes/--waves, empty--hw-arch/--json, upfront blocker/trailing-sep rejection, atomic/symlink/NaN//dev/nullwrites, result count mismatch, and unknown arch family.Verification
python3 -W error -I tests/test_cvt_f16_omod_probe.py -v: 15 passed, 1 skipped (AMD clang absent)main:ran=16 failures=2 errors=11 (skipped=1)python3 -I tests/test_text_write_line_endings.py: 3/3 passedpython3 -I scripts/check_no_game_data.py tools/cvt_f16_omod_probe.py tests/test_cvt_f16_omod_probe.py: passedpython3 -m compileall -q tools/cvt_f16_omod_probe.py tests/test_cvt_f16_omod_probe.py: passed🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.