cvt_f16_omod_probe: harden --modes/--waves, upfront atomic JSON writes, and result count guard #1639
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1639
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/cvt-f16-omod-probe-json-and-cli"
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 successfully merged and closed
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: passedIndependent verification (Windows, Python 3.11.9
-I -W error):--modes/--wavesmalformed-token rejection, empty--hw-arch/--jsonguards, dedup, upfront atomic JSON writes, result-count guard — all match claims.test_cvt_f16_omod_probe.py16 OK (1 skip, matches body);--self-testok (36 inputs, 1440 cases/wave); hygiene checks clean. AI-assisted verification.#1639 | head
11d2b004900316331b205c3920fa531be913bfe7|python3 -I tests/test_cvt_f16_omod_probe.py -v| red: 16 run, 2 failures, 11 errors | green: 16 passed | Red → greenThe suite covers malformed CLI input, report publication, oracle result lengths and assembly checks. The merged tests passed with AMD clang available.
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.Merged, thank you @IlyassRS3! This PR (cvt_f16_omod_probe: harden --modes/--waves, 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.