mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:10:53 +01:00
[PR #1793] [MERGED] tools: guard ps_helper_probe.py empty coverage and atomic --json writes #1807
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#1807
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/1793
Author: @kirigayakazima
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:fix/ps-helper-probe-safety📝 Commits (1)
a759e1etools: guard ps_helper_probe.py empty coverage and atomic --json writes📊 Changes
2 files changed (+198 additions, -31 deletions)
View changed files
📝
tests/test_ps_helper_probe.py(+88 -0)📝
tools/ps_helper_probe.py(+110 -31)📄 Description
Claimed in the coordination issue as: PS-HELPER-PROBE-EMPTY-COVERAGE-AND-ATOMIC-JSON (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162059721)
What and why
tools/ps_helper_probe.py'sanalyze(): avoidValueError: max() iterable argument is emptyand reportFalsefor coverage-dependent checks (entry EXEC,s_wqm, quad packing, lane order, interpolation accuracy, and withouts_wqmEXEC) instead of vacuously passing on empty sets.--jsonbefore opening the GPU oracle (measure()), rejecting empty/whitespace strings, trailing directory separators, existing directories, and non-directory ancestors with exit code2.--jsonatomically (tempfile.mkstempbeside the resolved symlink target, explicitnewline="\n", trailing\n,fsync,published_mode, andreplace_retry), preserving any existing file and cleaning up staging files on failure (exit2, no traceback).tests/test_ps_helper_probe.py.Tested
python -I tests/test_ps_helper_probe.py -v->Ran 10 tests in 0.068s,OK (skipped=1)(hardware test skipped without GPU runtime build; verified in a detachedupstream/mainworktree that the new tests fail before the fix:FAILED (failures=5, errors=2, skipped=1)).python -I tests/test_ci_registration.py->Ran 16 tests in 4.522s,OK.python -I tests/test_text_write_line_endings.py->Ran 3 tests in 12.592s,OK.python -I scripts/check_no_game_data.py tools/ps_helper_probe.py tests/test_ps_helper_probe.py-> exit0.python -I -m compileall -q tools/ps_helper_probe.py tests/test_ps_helper_probe.pyandgit diff --check-> clean.GPUs tested: n/a (CPU/stdlib Python tests on Windows 11 x64)
AI-assisted: yes
Checklist
needs rebase).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.