texoff_probe: validate oracle batch/word payloads and handle run errors #1684
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1684"
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?
Imported from ubiquitarianism/leonida. Originally posted by IlyassRS3 on 2026-11-25T08:04:15Z.
Item ID:
TEXOFF-PROBE-ORACLE-VALIDATION(claimed in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156550196)Summary
tools/texoff_probe.py):oracle.run([k])returns alist/tupleof length1, and that its non-string element is alist/tupleof exact lengthlen(rows)containing only non-boolintwords (maskingw & 0xFFFFFFFFbefore thetsharp.POISONcheck andstruct.pack("<I", ...)), returning exit2cleanly instead of crashing withIndexError/TypeError/struct.erroror accepting extra/bool words.runner.Unavailable(exit77) andRuntimeError(exit2) raised duringoracle.run()insidetry ... finally: oracle.close().tests/test_texoff_probe.py):runner.Unavailableduringrun()-> exit77, andRuntimeErrorduringrun()-> exit2, verifyingoracle.close()on every path.Checklist & Verification
python3 -I scripts/check_no_game_data.py tools/texoff_probe.py tests/test_texoff_probe.pypassed)python3 -W error -I tests/test_texoff_probe.py -v:Ran 13 tests ... OKtests/test_texoff_probe.pyagainst unpatchedmaintools/texoff_probe.py):Ran 13 tests ... FAILED (failures=8, errors=11)python3 -m compileall -q make_game.py tools tests: passedpython3 -I tests/test_text_write_line_endings.py:Ran 3 tests ... OKImported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T08:04:30Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T08:41:56Z.
Independent verification (Windows, Python 3.11.9
-I): oracle.run must return exactly-1 batch of list/tuple of non-bool ints (previouslyraw[0]could IndexError/TypeError); words masked beforetsharp.POISONpack;Unavailable->77,RuntimeError->2 inside try/finally close.test_texoff_probe.py13 OK; neighbors tex_mode_probe 37, d16_image_probe 13, image_d16_probe 22 all OK;--oracle hw->77 / bogus->exit 2; compileall + line-endings +check_no_game_dataclean. AI-assisted verification.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T14:54:20Z.
Red/green:
pytest tests/test_texoff_probe.pyfails on main (19 failed, 7 passed, 14 subtests passed) and passes on head74295d02e3merged with main (13 passed, 34 subtests passed).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
d48a957bbin GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)