mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:30:53 +01:00
[PR #1638] cvt_norm_mods_probe: upfront atomic JSON validation, RuntimeError handling, and result count guard #1652
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#1652
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/1638
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/cvt-norm-mods-probe-json-and-guards📝 Commits (1)
61949eacvt_norm_mods_probe: upfront atomic JSON validation, RuntimeError handling, and result count guard📊 Changes
2 files changed (+188 additions, -18 deletions)
View changed files
📝
tests/test_cvt_norm_mods_probe.py(+66 -0)📝
tools/cvt_norm_mods_probe.py(+122 -18)📄 Description
Item ID:
CVT-NORM-MODS-PROBE-JSON-AND-GUARDSClaim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7155043403
Summary
Harden JSON reporting, CLI validation, and harness error handling in
tools/cvt_norm_mods_probe.py:--jsonvalidation (validate_json_path): reject empty/whitespace paths, directories, trailing path separators, non-directory parent blockers, and unwritable existing files with exit2before openinghw_oracle(previously--json " "created a literal whitespace file and non-directory parent blockers only failed after running all GPU sweeps).write_json_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.--hw-archupfront (exit2).RuntimeErrorfromoracle.run()cleanly (harness error: ..., exit2) while still closing the oracle infinally.len(raw_results) != len(meta)inevaluate_results()as a harness error instead of silently truncating viazip()and reportingmismatches=0.tests/test_cvt_norm_mods_probe.py): added 3 test methods covering upfront--json/--hw-archvalidation, atomic/symlink/NaN//dev/nullwrites, result count mismatch, andRuntimeErrorhandling.Verification
python3 -W error -I tests/test_cvt_norm_mods_probe.py -v: 15 passed, 2 skipped (AMD clang / llvm-mc absent)main:ran=17 failures=1 errors=6 (skipped=2)python3 -I tests/test_text_write_line_endings.py: 3/3 passedpython3 -I scripts/check_no_game_data.py tools/cvt_norm_mods_probe.py tests/test_cvt_norm_mods_probe.py: passedpython3 -m compileall -q tools/cvt_norm_mods_probe.py tests/test_cvt_norm_mods_probe.py: passed🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.