sampler_lod_probe: validate oracle payloads, non-finite calibration starts, and run errors #1676
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!1676
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/sampler-lod-probe-oracle-and-calibration"
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:
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 ... OKIndependent verification (Windows, Python 3.11.9
-I -W error): oracle batch/word validation (len-1 batch, exact table length, non-bool ints masked before POISON pack — comparison correctly uses masked value), non-finite calibration-start guard, Unavailable->77 / RuntimeError->2 with finally-close — all match claims.test_sampler_lod_probe.py15 OK;--oracle rulefull run exit 0; bad--oracle-> argparse exit 2; compileall + line-endings + check_no_game_data clean. AI-assisted verification.Red/green: classified READY by cloud-5 (red on main 09c153948, green on head merged with main); head 299325cb202d unchanged since 2026-11-25, before that run.
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957bb in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)