smem_neg_probe: handle Unavailable/RuntimeError during oracle.run() and mask 32-bit words #1690
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!1690
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/smem-neg-probe-run-errors"
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:
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 ... OK#1690 | head b1a254502c109bcf0b141218dd3b084aacdbac93 (merged cleanly with main 4a54aedcb) |
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.Red/green:
pytest tests/test_smem_neg_probe.pyfails on main (1 failed, 11 passed, 22 subtests passed) and passes on head b1a254502c10 merged with main (12 passed, 22 subtests passed).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)