mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:00:52 +01:00
[PR #1644] frexp_ldexp_f16_mods_probe: harden CLI tokens, upfront atomic JSON writes, and result count guard #1658
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#1658
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/1644
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/frexp-ldexp-f16-mods-probe-json-and-cli📝 Commits (1)
7e2c52afrexp_ldexp_f16_mods_probe: harden CLI tokens, upfront atomic JSON writes, and result count guard📊 Changes
2 files changed (+211 additions, -16 deletions)
View changed files
📝
tests/test_frexp_ldexp_f16_mods_probe.py(+74 -0)📝
tools/frexp_ldexp_f16_mods_probe.py(+137 -16)📄 Description
Item ID:
FREXP-LDEXP-F16-MODS-PROBE-JSON-AND-CLIClaim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7155228780
Summary
Harden CLI argument parsing, JSON report writing, and harness error handling in
tools/frexp_ldexp_f16_mods_probe.py:--ops/--waves/--hw-archguards: reject empty/trailing comma tokens (32,,,v_frexp_mant_f16,32,,64) while preserving whitespace-trimmed first-seen deduplication, 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_frexp_ldexp_f16_mods_probe.py): added 3 test methods covering malformed comma tokens, 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_frexp_ldexp_f16_mods_probe.py -v: 21 passed, 1 skipped (AMD clang absent)main:ran=22 failures=0 errors=11 (skipped=1)python3 -I tests/test_text_write_line_endings.py: 3/3 passedpython3 -I scripts/check_no_game_data.py tools/frexp_ldexp_f16_mods_probe.py tests/test_frexp_ldexp_f16_mods_probe.py: passedpython3 -m compileall -q tools/frexp_ldexp_f16_mods_probe.py tests/test_frexp_ldexp_f16_mods_probe.py: passed🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.