tools: check POISON and arch errors in texoff_probe, close oracle in sampler_lod_probe (OLD-5289) #574

Merged
Taffyyy-ops merged 1 commit from upstream-pr/574 into main 2026-11-24 09:27:21 +00:00
Taffyyy-ops commented 2026-11-24 08:46:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Taffyyy-ops on 2026-11-24T08:46:06Z.


Claimed in the coordination issue as: OLD-5289 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7126487215)

What and why

Carried over from the closed upstream ItsNotRexed/Leonida PR #5289 and rebased cleanly onto ubiquitarianism/leonida main (c2547f450).

  • In tools/texoff_probe.py: check for POISON and unsupported-architecture oracle errors, returning exit code 2 cleanly and closing the oracle handle on error paths (except: / finally:).
  • In tools/sampler_lod_probe.py: ensure the hardware oracle is always closed across normal, mismatch, poison, bad-calibration, kernel-rejection, and unsupported-arch paths.
  • Add mock/lifecycle regression tests in tests/test_texoff_probe.py and tests/test_sampler_lod_probe.py.

Tested

On Windows 11 with Python 3.12+ after rebasing onto 1c93c8697:

  • python -I tests/test_texoff_probe.py -v -> Ran 12 tests in 0.275s, OK
  • python -I tests/test_sampler_lod_probe.py -v -> Ran 14 tests in 1.384s, OK
  • python -m compileall -q tools/texoff_probe.py tools/sampler_lod_probe.py tests/test_texoff_probe.py tests/test_sampler_lod_probe.py -> exit 0
  • python -I scripts/check_no_game_data.py -> exit 0
  • git diff --check upstream/main..HEAD -> exit 0

GPUs tested: n/a (mocked oracle lifecycle and stdlib probe tests; no hardware RDNA2 GPU required)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5468922170 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/574). Originally posted by [Taffyyy-ops](https://github.com/Taffyyy-ops) on 2026-11-24T08:46:06Z. --- Claimed in the coordination issue as: OLD-5289 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7126487215) ### What and why Carried over from the closed upstream `ItsNotRexed/Leonida` PR #5289 and rebased cleanly onto `ubiquitarianism/leonida` `main` (`c2547f450`). - In `tools/texoff_probe.py`: check for `POISON` and unsupported-architecture oracle errors, returning exit code 2 cleanly and closing the oracle handle on error paths (`except:` / `finally:`). - In `tools/sampler_lod_probe.py`: ensure the hardware oracle is always closed across normal, mismatch, poison, bad-calibration, kernel-rejection, and unsupported-arch paths. - Add mock/lifecycle regression tests in `tests/test_texoff_probe.py` and `tests/test_sampler_lod_probe.py`. ### Tested On Windows 11 with Python 3.12+ after rebasing onto `1c93c8697`: - `python -I tests/test_texoff_probe.py -v` -> Ran 12 tests in 0.275s, OK - `python -I tests/test_sampler_lod_probe.py -v` -> Ran 14 tests in 1.384s, OK - `python -m compileall -q tools/texoff_probe.py tools/sampler_lod_probe.py tests/test_texoff_probe.py tests/test_sampler_lod_probe.py` -> exit 0 - `python -I scripts/check_no_game_data.py` -> exit 0 - `git diff --check upstream/main..HEAD` -> exit 0 GPUs tested: n/a (mocked oracle lifecycle and stdlib probe tests; no hardware RDNA2 GPU required) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
QemmHD commented 2026-11-24 09:27:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T09:27:18Z.


Merging. Why merged: sampler_lod_probe and texoff_probe close the oracle on every path, report kernel-build errors, and refuse POISON (misaligned texture) results.
Why it's good: sampler tests 7 -> 14 passed, texoff 11 -> 12; clean on main 7430f59; consistency 565/0.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7127434844 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/574#issuecomment-7127434844). Originally posted by [QemmHD](https://github.com/QemmHD) on 2026-11-24T09:27:18Z. --- Merging. Why merged: sampler_lod_probe and texoff_probe close the oracle on every path, report kernel-build errors, and refuse POISON (misaligned texture) results. Why it's good: sampler tests 7 -> 14 passed, texoff 11 -> 12; clean on main 7430f59; consistency 565/0. 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!574
No description provided.