mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1676] sampler_lod_probe: validate oracle payloads, non-finite calibration starts, and run errors #1692
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#1692
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/1676
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/sampler-lod-probe-oracle-and-calibration📝 Commits (1)
299325csampler_lod_probe: validate oracle payloads, non-finite calibration starts, and run errors📊 Changes
2 files changed (+101 additions, -4 deletions)
View changed files
📝
tests/test_sampler_lod_probe.py(+73 -0)📝
tools/sampler_lod_probe.py(+28 -4)📄 Description
Item ID:
SAMPLER-LOD-PROBE-ORACLE-AND-CALIBRATION(claimed in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156290731)Summary
tools/sampler_lod_probe.py):oracle.run([k])returns alist/tupleof length1, and that its non-string element is alist/tupleof exact lengthlen(table)containing only non-boolintwords (maskingw & 0xFFFFFFFFbeforestruct.pack("<I", ...)), returning exit2with a clear diagnostic instead of crashing with uncaughtIndexError/TypeError/struct.erroror accepting extra/bool words.inf/NaN) calibration level starts with exit2instead of accepting+infas a valid level start when wave32 and wave64 agree.runner.Unavailable(exit77) andRuntimeError(exit2) raised duringoracle.run()insidetry ... finally: oracle.close().tests/test_sampler_lod_probe.py):+infcalibration start rejection,runner.Unavailableduringrun()-> exit77, andRuntimeErrorduringrun()-> exit2, verifyingoracle.close()on every path.Checklist & Verification
python3 -I scripts/check_no_game_data.py tools/sampler_lod_probe.py tests/test_sampler_lod_probe.pypassed)python3 -W error -I tests/test_sampler_lod_probe.py -v:Ran 15 tests ... OKtests/test_sampler_lod_probe.pyagainst unpatchedmaintools/sampler_lod_probe.py):Ran 15 tests ... FAILED (failures=9, errors=10)python3 -m compileall -q make_game.py tools tests: passedpython3 -I tests/test_text_write_line_endings.py:Ran 3 tests ... OK🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.