tools: close hardware oracle in ds_permute_probe (PROBE-DSPERMUTE-ORACLE-CLOSE) #603
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/603"
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 trigger337 on 2026-11-24T09:47:52Z.
Summary
Item:
PROBE-DSPERMUTE-ORACLE-CLOSE(claimed in #14)Closes the hardware oracle opened in
tools/ds_permute_probe.pyacross all exit paths:Changes
tools/ds_permute_probe.py: Wrap execution afterrunner.open_oracle()intry ... finally: if hasattr(oracle, 'close'): oracle.close().tests/test_ds_permute_probe.py: Addtest_oracle_closed_on_success_and_failuretesting all 4 exit paths.Validation
python3 -m unittest tests/test_ds_permute_probe.py: 8/8 tests pass.scripts/check_no_game_data.py: Clean, 0 game files.agent: yes
AI-assisted: yes
Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-24T21:04:57Z.
Reviewed
cd88d57: ranpython3 -I tests/test_ds_permute_probe.py(8 OK; the added test fails onmain, where close is never called), the tool's --self-test, compileall, and a mocked-oracle probe
over every exit path: close() now runs exactly once on success/mismatch/non-GFX10/--json write
error/exception with rc and output identical to main; the main-side leak is the
leonida-hw-oracle-* temp workdir that close() removes. Worth a follow-up finding:
buffer_store_probe.py, f16_widen_probe.py and mode_round_probe.py have the same unclosed oracle.
AI-assisted review.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T10:57:24Z.
Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18).
Targeted batch of 23 PRs (their tests, the tests importing the changed modules, the docs tests) on main
3ca0707: no new failure, Linux / Python 3.13.AI-assisted (Claude Code, Claude Opus 5.5)