bvh_tri_probe: harden --oracle/--kernel, upfront atomic JSON writes, and oracle error handling (BVH-TRI-PROBE-JSON-AND-CLI) #2130
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2130"
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 abnalstlll-byte on 2026-11-25T22:16:38Z.
Summary
Hardens
tools/bvh_tri_probe.pyargument handling, JSON reporting, and hardware oracle execution:--oraclevalidation: Rejects empty strings, whitespace, and malformed comma-separated tokens (e.g.translator,or,hw) upfront with clear diagnostic exit code 2.--hw-archplumbing: Adds--hw-archCLI parameter, validates against empty/whitespace values, and passesarchtorunner.open_oracle(arch=...).--kerneltoken sanitation: Validates repeatable--kerneloptions and comma-separated kernel lists, rejecting empty/whitespace tokens upfront and deduplicating kernel selection.validate_json_path()) to catch non-file destinations, trailing slashes, or missing/non-directory parents before running kernels. Implementswrite_report()to write JSON atomically via tempfile replacement with consistent LF line endings and proper file modes.RuntimeError, and ensures oracle resources are closed viafinally.tests/test_bvh_tri_probe.pycovering all new CLI validation paths, atomic JSON writing, and oracle error/skip paths (27/27 tests pass).Verification
Claimed in #1608 (
BVH-TRI-PROBE-JSON-AND-CLI).AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by real-rusher on 2026-11-26T12:23:55Z.
Verified on main
a73a57e1(Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly. With this PR, python -I tests/test_bvh_tri_probe.py: 27 tests OK. The PR's test file against main's tool: 1 failure and 7 errors, so the new tests fail on main and pass with the change. compileall clean.AI-assisted: yes (Claude Code)
Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T04:37:54Z.
RUN: #2130 (tests only, python -I, no build, no game, GPU not used)
Tested heads: PR head
6d2b62628, mainb6bf3aa0b(fetched 2026-11-29).Commands (from each worktree root, CPython 3.13.12):
Red: PR head with tools/bvh_tri_probe.py reverted to its merge-base version (tests kept): 27 tests, FAILED (failures=1, errors=7). Same kind of red as the PR describes (new CLI/JSON validation paths missing). The PR's test file on plain main also fails (failures=1, errors=6).
Green at head: 27 tests OK; --self-test OK.
Green merged into main: NOT RUNNABLE.
git merge pr-2130into mainb6bf3aa0bconflicts in tools/bvh_tri_probe.py (3 hunks). Main already has0a2e5d92c(#1546) touching the same file after the PR's merge base; GitHub also reports the PR as CONFLICTING. Plain main: tests/test_bvh_tri_probe.py 22 tests OK, --self-test OK.So: green at head, red verified, needs a rebase on main before it can be green merged.
Machine: Windows 11 Pro 10.0.26300, CPython 3.13.12, GPU not used.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T08:33:47Z.
@abnalstlll-byte this PR now conflicts with
main(tools/bvh_tri_probe.py). Could you mergemaininto your branch (no force-push needed)? It was verified before the conflict: https://github.com/ProjectLeonida/mandy/pull/2130#issuecomment-7250768052. If there's no update within 24 h, OreoFR may carry it in a new PR that keeps you as co-author (per the maintainers' plan). — OreoFR's agent (AI-assisted)Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T13:24:50Z.
Carried as #2717 because of the conflict with main after #2566; @abnalstlll-byte, if you come back, say so and the carry is dropped.