smem_neg_probe: handle Unavailable/RuntimeError during oracle.run() and mask 32-bit words #1690
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1690"
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:19:05Z.
Item ID:
SMEM-NEG-PROBE-RUN-ERRORS(claimed in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156857639)Summary
tools/smem_neg_probe.py):runner.Unavailable(exit77) andRuntimeError(exit2) raised duringoracle.run()insidetry ... finally: oracle.close()instead of crashing with unhandled tracebacks.& 0xFFFFFFFFbefore comparing with expected 32-bit words and formatting.tests/test_smem_neg_probe.py):runner.Unavailableduringoracle.run()-> exit77, andRuntimeErrorduringoracle.run()-> exit2, verifyingoracle.close()on every path.Checklist & Verification
python3 -I scripts/check_no_game_data.py tools/smem_neg_probe.py tests/test_smem_neg_probe.pypassed)python3 -W error -I tests/test_smem_neg_probe.py -v:Ran 12 tests ... OKtests/test_smem_neg_probe.pyagainst unpatchedmaintools/smem_neg_probe.py):Ran 12 tests ... FAILED (failures=1)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:19:20Z.
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 zmasi on 2026-11-28T11:25:11Z.
#1690 | head
b1a254502c(merged cleanly with main4a54aedcb) |python -I tests/test_smem_neg_probe.py| red on main:FAILED (failures=1)(1 != 0when oracle words carry high bits above bit 31, plus uncaughtrunner.Unavailable/RuntimeErrorduringoracle.run()) | green on PR+main:12 tests OK| Windows 11, Python 3.12.10 | AI-assisted: yesAudited 32-bit
w & 0xFFFFFFFFword masking andrunner.Unavailable -> exit 77+RuntimeError -> exit 2handling insidetry/finally: oracle.close()intools/smem_neg_probe.py. Also passedtests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK),tests/test_runner_calls_all_tests.py(3 OK), andscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T14:55:32Z.
Red/green:
pytest tests/test_smem_neg_probe.pyfails on main (1 failed, 11 passed, 22 subtests passed) and passes on headb1a254502cmerged with main (12 passed, 22 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)