mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:05:53 +01:00
[PR #2130] bvh_tri_probe: harden --oracle/--kernel, upfront atomic JSON writes, and oracle error handling (BVH-TRI-PROBE-JSON-AND-CLI) #2135
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#2135
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/2130
Author: @abnalstlll-byte
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:feat/bvh-tri-probe-json-and-cli📝 Commits (1)
6d2b626bvh_tri_probe: harden --oracle/--kernel, upfront atomic JSON writes, and oracle error handling (BVH-TRI-PROBE-JSON-AND-CLI)📊 Changes
2 files changed (+258 additions, -19 deletions)
View changed files
📝
tests/test_bvh_tri_probe.py(+142 -0)📝
tools/bvh_tri_probe.py(+116 -19)📄 Description
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).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.