mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:25:53 +01:00
[PR #561] [MERGED] tools: close oracle in vcmp16_opsel_probe, support argv in main, and guard results (VCMP16-PROBE-GUARDS) #607
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#607
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/561
Author: @trigger337
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD
Base:
main← Head:fix/vcmp16-opsel-probe-lifecycle-and-guards📝 Commits (1)
d95facbtools: close oracle in vcmp16_opsel_probe, support argv in main, and guard results📊 Changes
2 files changed (+137 additions, -9 deletions)
View changed files
📝
tests/test_vcmp16_opsel_probe.py(+117 -0)📝
tools/vcmp16_opsel_probe.py(+20 -9)📄 Description
What and why
tools/vcmp16_opsel_probe.pyopened the hardware oracle without closing it in afinallyblock, accepted noargvargument inmain(), and indexedoracle.run()directly without verifying whether the runner returned an empty, None, or short result list.CLI /
main()invocation:argvinmain(argv=None)and forward toap.parse_args(argv).Oracle lifecycle:
try ... finally: oracle.close()block so hardware resources / device state are cleaned up on all exit paths.Runner error guards:
oracle.run()output: flag empty results,Noneresults, or result lists shorter/longer than the expected word count as harness errors with exit code 2 instead of raising unhandledIndexError/TypeError.Unit test coverage:
MainAndOracleLifecycleTestintests/test_vcmp16_opsel_probe.pycovering rule mode, hardware success, mismatch, kernel rejection, empty/None/short result lists, and runner unavailability.Claimed in the coordination issue as: VCMP16-PROBE-GUARDS (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7125854727)
Standard library and synthetic unit tests only; no GPU or game files required.
AI-assisted: yes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.