frexp_ldexp_f16_mods_probe: harden CLI tokens, upfront atomic JSON writes, and result count guard #1644
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1644"
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 IlyassRS3 on 2026-11-25T06:52:49Z.
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: passedImported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T06:53:04Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T08:16:29Z.
Independent verification (Windows, Python 3.11.9
-I): diff reviewed —--ops/--wavestoken guards, empty--hw-arch, upfront--jsonvalidation beforehw_oracleopens, atomicwrite_reportwith symlink-preserving staging,harness_errors-> exit 2 propagation confirmed,asm.familyValueError -> exit 77 — all present.test_frexp_ldexp_f16_mods_probe.py22 tests OK (1 skip, matches body),--self-testok (1733 synthetic words), CLI probes reject bad--ops/--waves/--jsoninputs, compileall +check_no_game_dataclean. AI-assisted verification.Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-28T11:27:19Z.
#1644 | head
7e2c52a9ccc2a4752560acb4251369a06baec76f|python3 -I tests/test_frexp_ldexp_f16_mods_probe.py -v| red: 22 run, 11 errors | green: 22 passed | Red → greenThe suite covers CLI and report guards, result counts and synthetic reference cases. All 22 tests passed after the merge.
Copied the PR tests onto clean main
4a54aedcb6b66525e0c9f72a6ea10263337c9141for the baseline, then merged that main into the recorded PR head and reran those files. Ubuntu 26.04.1 (WSL2), Python 3.14.4. Unittest failure/error counts include subtests where applicable. AI-assisted with OpenAI Codex. Batch claim.Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T11:43:28Z.
Merged, thank you @IlyassRS3! This PR (frexp_ldexp_f16_mods_probe: harden CLI tokens, upfront atomic JSON writes, and result count guard) passed its own tests with main merged in during sodove's verification of this shader batch, so it went in with the batch.
AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.