fspx_prologue_probe: handle hardware oracle Unavailable during run() #457

Merged
leonida/mandy
EdenBendheim merged 1 commit from ubiq/fspx-prologue-probe-run-unavailable into main 2026-11-24 06:58:00 +00:00

Pull request successfully merged and closed

EdenBendheim commented 2026-11-24 05:42:38 +00:00

Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123200485

What changed

  • tools/fspx_prologue_probe.py: Catch the runner's Unavailable exception when raised from oracle.run() after the oracle has already opened, closing the oracle exactly once, printing one single-line hardware oracle unavailable: ... diagnostic to stderr (no traceback, empty stdout), and exiting 77.
  • tests/test_fspx_prologue_probe.py: Synthetic tests covering oracle.run() raising Unavailable (exit 77 + single close), plus passing, mismatch, and missed negative-control runs.

Testing & Disclosure

  • AI-assisted: Implemented with Codex (gpt-6.2-sol) and reviewed with Codex (gpt-6.2-astra).
  • Environment: macOS 27.3, Apple M1 Max, Python 3.14.3 (CPU-only, synthetic oracle, zero game data).
  • Verified on ubiquitarianism/leonida main (8f481cf16): test_fspx_prologue_probe.py (6/6), --self-test (50 positive cases + 8 negative controls), check_no_game_data.py, LF check — all passed.
Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123200485 ### What changed - **`tools/fspx_prologue_probe.py`**: Catch the runner's `Unavailable` exception when raised from `oracle.run()` after the oracle has already opened, closing the oracle exactly once, printing one single-line `hardware oracle unavailable: ...` diagnostic to stderr (no traceback, empty stdout), and exiting `77`. - **`tests/test_fspx_prologue_probe.py`**: Synthetic tests covering `oracle.run()` raising `Unavailable` (exit `77` + single close), plus passing, mismatch, and missed negative-control runs. ### Testing & Disclosure - **AI-assisted:** Implemented with Codex (`gpt-6.2-sol`) and reviewed with Codex (`gpt-6.2-astra`). - **Environment:** macOS 27.3, Apple M1 Max, Python 3.14.3 (CPU-only, synthetic oracle, zero game data). - **Verified on `ubiquitarianism/leonida` `main` (`8f481cf16`):** `test_fspx_prologue_probe.py` (6/6), `--self-test` (50 positive cases + 8 negative controls), `check_no_game_data.py`, LF check — all passed.
QemmHD commented 2026-11-24 06:57:57 +00:00

Merging. Why merged: an Unavailable error from oracle.run() now exits 77 with a one-line message, and the oracle is always closed.
Why it's good: security-reviewed; tested on Windows 11 merged onto main c023a36: 5 -> 6 tests OK, and the new test errors on main.

AI-assisted (Claude Code, Claude Opus 5.5).

Merging. Why merged: an Unavailable error from oracle.run() now exits 77 with a one-line message, and the oracle is always closed. Why it's good: security-reviewed; tested on Windows 11 merged onto main c023a36: 5 -> 6 tests OK, and the new test errors on main. AI-assisted (Claude Code, Claude Opus 5.5).
Sign in to join this conversation.
No description provided.