tools: close oracle in vcmp16_opsel_probe, support argv in main, and guard results (VCMP16-PROBE-GUARDS) #561
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!561
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/vcmp16-opsel-probe-lifecycle-and-guards"
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 successfully merged and closed
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
Merging. Why merged: vcmp16_opsel_probe always closes the hardware oracle, accepts argv, and refuses empty, None or short results.
Why it's good: test_vcmp16_opsel_probe 7 -> 15 passed (8 of the new tests fail on main); clean on main 7430f59; consistency 565/0.
AI-assisted (Claude Code, Claude Opus 5.5).