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

Merged
EdenBendheim merged 1 commit from upstream-pr/457 into main 2026-11-24 06:58:00 +00:00
EdenBendheim commented 2026-11-24 05:42:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by EdenBendheim on 2026-11-24T05:42:38Z.


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.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5466802281 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/457). Originally posted by [EdenBendheim](https://github.com/EdenBendheim) on 2026-11-24T05:42:38Z. --- 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 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T06:57:57Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7124473186 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/457#issuecomment-7124473186). Originally posted by [QemmHD](https://github.com/QemmHD) on 2026-11-24T06:57:57Z. --- 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 reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!457
No description provided.