tools: close hardware oracle in mode_round_probe (PROBE-MODEROUND-ORACLE-CLOSE) #589

Merged
leonida/mandy
trigger337 merged 1 commit from fix/probe-moderound-oracle-close into main 2026-11-25 21:03:48 +00:00

Pull request successfully merged and closed

trigger337 commented 2026-11-24 09:19:46 +00:00

Claimed in the coordination issue as: PROBE-MODEROUND-ORACLE-CLOSE (#14)

What and why

tools/mode_round_probe.py opens runner.open_oracle() but does not call oracle.close() inside a try ... finally block, leaking hardware oracle resources if oracle.arch is not GFX10 (exit 77), on normal completion, report write errors, or probe exceptions.

This wraps the oracle usage in a try ... finally block ensuring oracle.close() is called on all exits.

Tested

  • python3 -m unittest tests/test_mode_round_probe.py: 14/14 passed (including new tests for oracle closure on normal success, non-GFX10 exit 77, and probe exceptions).
  • python3 scripts/check_no_game_data.py: clean. No game files.

AI-assisted: yes
agent: yes

Claimed in the coordination issue as: PROBE-MODEROUND-ORACLE-CLOSE (#14) ### What and why `tools/mode_round_probe.py` opens `runner.open_oracle()` but does not call `oracle.close()` inside a `try ... finally` block, leaking hardware oracle resources if `oracle.arch` is not GFX10 (exit 77), on normal completion, report write errors, or probe exceptions. This wraps the oracle usage in a `try ... finally` block ensuring `oracle.close()` is called on all exits. ### Tested - `python3 -m unittest tests/test_mode_round_probe.py`: 14/14 passed (including new tests for oracle closure on normal success, non-GFX10 exit 77, and probe exceptions). - `python3 scripts/check_no_game_data.py`: clean. No game files. AI-assisted: yes agent: yes
PierreEbele commented 2026-11-25 00:57:13 +00:00

Reviewed 87aceb8: same shape as #587. The whitespace-insensitive diff of tools/mode_round_probe.py is only the new try:/finally: oracle.close() around the body of main() (the rest of the +52/-24 is re-indentation), so the oracle's workdir is now removed on success, on a mismatch exit, on the non-GFX10 skip and when a probe raises. python3 -I tests/test_mode_round_probe.py passes on the PR (14 tests); the same file copied onto main (b4b7756e) fails exactly the three new test_oracle_closed_* tests. scripts/check_no_game_data.py is clean on both files and the branch merges cleanly into current main. Run in a network-less sandbox on Linux; no GPU paths exercised (not needed for this change). No findings.

AI-assisted review.

Recommendation: Merge

Reviewed 87aceb8: same shape as #587. The whitespace-insensitive diff of `tools/mode_round_probe.py` is only the new `try:`/`finally: oracle.close()` around the body of `main()` (the rest of the +52/-24 is re-indentation), so the oracle's workdir is now removed on success, on a mismatch exit, on the non-GFX10 skip and when a probe raises. `python3 -I tests/test_mode_round_probe.py` passes on the PR (14 tests); the same file copied onto `main` (b4b7756e) fails exactly the three new `test_oracle_closed_*` tests. `scripts/check_no_game_data.py` is clean on both files and the branch merges cleanly into current `main`. Run in a network-less sandbox on Linux; no GPU paths exercised (not needed for this change). No findings. AI-assisted review. **Recommendation:** Merge
aslan2142 commented 2026-11-25 21:03:50 +00:00

Merged, thanks! The new test fails on main and passes with this.

  • Checked on main ac50c414f + 87aceb842: the semantic suite passes (491 files, 6,312 tests, 0 files failed); test_mode_round_probe pass; the 15 docs and writer tests pass; check_no_game_data.py is clean on the 2 changed files.

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

Merged, thanks! The new test fails on `main` and passes with this. - **Checked on `main` `ac50c414f` + `87aceb842`:** the semantic suite passes (491 files, 6,312 tests, 0 files failed); `test_mode_round_probe` pass; the 15 docs and writer tests pass; `check_no_game_data.py` is clean on the 2 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
Sign in to join this conversation.
No description provided.