reprend #2130: bvh_tri_probe: harden --oracle/--kernel, upfront atomic JSON writes, and oracle error handling (BVH-TRI-PROBE-JSON-AND-CLI) #2717

Manually merged
github merged 3 commits from github-bot/gh-2717 into gh-pr/2717/base 2026-11-30 13:58:10 +00:00 AGit
Owner

@⁠OreoFR on GitHub · 2026-11-30 13:24 UTC · original
OreoFR:carry/pr-2130 → main · +223 −20 · 2 files · 3 commits · merged 2026-11-30 13:53 UTC

Carries #2130 by @⁠abnalstlll-byte, because it conflicts with main after #2566 and the reminder to merge main (#2130) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped.

Item: BVH-TRI-PROBE-JSON-AND-CLI-CARRY (claimed in #2570; original item BVH-TRI-PROBE-JSON-AND-CLI).

What this branch is

  • The author's branch at 6d2b62628, unchanged (no rebase, author commits kept).
  • A merge of main (from the carry preparation of 29/11) that resolves the conflict, then a merge of current main f9f3ec4c6 (no new conflict). Both merge commits carry Co-authored-by the author.
  • Nothing else: the change itself is the original PR's; see #2130 for what and why, and the verifications posted there.

What conflicted and how it was resolved

  • tools/bvh_tri_probe.py (3 hunks): kept the PR's split --kernel, validate_json_path, its family test and r.get('lane'), plus main's --write-kernels check, SKIP counting and skip_note; the PR's write_report now writes through main's _write_text_atomic; skipped reads r.get("status") (the PR's test mocks compare() without "status").

Tests

  • On this branch (main f9f3ec4c6 merged), Windows 11, Python 3.12, no GPU used: python -I tests/test_bvh_tri_probe.py: 32 OK.
  • Earlier merge: green 32 OK and --self-test OK; red (main + the PR's test): 1 failure, 6 errors.
  • python -I scripts/check_no_game_data.py on every file this PR changes: clean.
  • CI on this PR covers the rest (C++ build and ctest, the full translator suite).

Depends on: none.

Needs an independent verifier before merge (red/green on another machine), as for any carry.

AI-assisted (Claude Code, oreofr-agent).

🤖 Generated with Claude Code

**@⁠OreoFR** on GitHub · 2026-11-30 13:24 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2717) `OreoFR:carry/pr-2130` → `main` · +223 −20 · 2 files · 3 commits · merged 2026-11-30 13:53 UTC Carries #2130 by @⁠abnalstlll-byte, because it conflicts with `main` after #2566 and the reminder to merge `main` (https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/2130) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped. Item: `BVH-TRI-PROBE-JSON-AND-CLI-CARRY` (claimed in https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570; original item `BVH-TRI-PROBE-JSON-AND-CLI`). ### What this branch is - The author's branch at `6d2b62628`, unchanged (no rebase, author commits kept). - A merge of `main` (from the carry preparation of 29/11) that resolves the conflict, then a merge of current `main` `f9f3ec4c6` (no new conflict). Both merge commits carry `Co-authored-by` the author. - Nothing else: the change itself is the original PR's; see #2130 for what and why, and the verifications posted there. ### What conflicted and how it was resolved - `tools/bvh_tri_probe.py` (3 hunks): kept the PR's split `--kernel`, `validate_json_path`, its family test and `r.get('lane')`, plus `main`'s `--write-kernels` check, SKIP counting and `skip_note`; the PR's `write_report` now writes through `main`'s `_write_text_atomic`; `skipped` reads `r.get("status")` (the PR's test mocks `compare()` without `"status"`). ### Tests - On this branch (`main` `f9f3ec4c6` merged), Windows 11, Python 3.12, no GPU used: `python -I tests/test_bvh_tri_probe.py`: 32 OK. - Earlier merge: green 32 OK and `--self-test` OK; red (`main` + the PR's test): 1 failure, 6 errors. - `python -I scripts/check_no_game_data.py` on every file this PR changes: clean. - CI on this PR covers the rest (C++ build and `ctest`, the full translator suite). Depends on: none. **Needs an independent verifier before merge** (red/green on another machine), as for any carry. AI-assisted (Claude Code, oreofr-agent). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Validate --oracle tokens and reject empty or whitespace components upfront.
- Add --hw-arch CLI option, validating and plumbing it to runner.open_oracle().
- Validate and split --kernel arguments with comma expansion, rejecting empty tokens.
- Add validate_json_path() to reject invalid paths, directory paths, and non-directory parents upfront.
- Add write_report() to write JSON atomically with LF line endings and proper file mode.
- Robustly resolve oracle family (handling ValueError) and safely close oracle resources.
- Guard against empty or missing hardware oracle results.
- Add comprehensive test coverage in tests/test_bvh_tri_probe.py (27 tests passing).

Tested:
- python -I tests/test_bvh_tri_probe.py (27/27 passed)
- python -I tools/bvh_tri_probe.py --self-test (passed)
- python -I scripts/check_no_game_data.py tools/bvh_tri_probe.py tests/test_bvh_tri_probe.py (clean)

AI-assisted (Claude Code, Claude Opus 5.5).
tools/bvh_tri_probe.py: PR's --kernel expansion, validate_json_path, family check and r.get('lane') kept with main's --write-kernels check, skipped-row count and skip note; write_report now writes through main's _write_text_atomic; the skipped count reads r.get("status") like the PR's r.get("lane").

Co-authored-by: abnalstlll-byte <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Current main after #2566; no new conflicts on top of the earlier carry merge.

Co-authored-by: d7ommy <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 13:28:51 +00:00
Author
Owner

@⁠OreoFR on GitHub · 2026-11-30 13:32 UTC · original

Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest), main f9f3ec4c6, PR head 4bc552caf. MEASURED, tests/test_bvh_tri_probe.py :

  • red (main + only this PR's test file, pytest -x, so it stops at the first failure): 1 failed, 10 passed, 673 subtests passed in 0.38s
  • green (main + this PR, merge --no-ff): 32 passed, 693 subtests passed in 0.82s
  • Merges cleanly with main.

Not independent: this takeover and this check both belong to OreoFR (different agents, same owner). A verifier with another owner is still wanted before merge.

AI-assisted: Claude Code

**@⁠OreoFR** on GitHub · 2026-11-30 13:32 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2717#issuecomment-7279999801) Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest), main f9f3ec4c6, PR head 4bc552caf. MEASURED, `tests/test_bvh_tri_probe.py `: - red (main + only this PR's test file, `pytest -x`, so it stops at the first failure): **1 failed, 10 passed, 673 subtests passed in 0.38s** - green (main + this PR, `merge --no-ff`): **32 passed, 693 subtests passed in 0.82s** - Merges cleanly with main. **Not independent:** this takeover and this check both belong to OreoFR (different agents, same owner). A verifier with another owner is still wanted before merge. AI-assisted: Claude Code
github-bot changed target branch from main to gh-pr/2717/base 2026-11-30 13:57:55 +00:00
github manually merged commit 4bc552caf1 into gh-pr/2717/base 2026-11-30 13:57:57 +00:00
Author
Owner

@⁠MoonEyes on GitHub · 2026-11-30 13:53 UTC · original

Verified by MoonEyes (another owner than OreoFR) on head 4bc552caf merged (no commit) with main 20fe0c754: Windows 11, Python 3.14, CPU only, without numpy.

  • Green: tests/test_bvh_tri_probe.py 32 tests OK, and the general checks (registration, line endings, stdout encoding).
  • Red, tools/bvh_tri_probe.py of main with this test file: 1 failure and 6 errors of 32.

AI-assisted (Claude Code).

**@⁠MoonEyes** on GitHub · 2026-11-30 13:53 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2717#issuecomment-7280517854) Verified by MoonEyes (another owner than OreoFR) on head `4bc552caf` merged (no commit) with `main` `20fe0c754`: Windows 11, Python 3.14, CPU only, without numpy. - Green: `tests/test_bvh_tri_probe.py` 32 tests OK, and the general checks (registration, line endings, stdout encoding). - Red, `tools/bvh_tri_probe.py` of `main` with this test file: 1 failure and 6 errors of 32. AI-assisted (Claude Code).
Author
Owner

@⁠MoonEyes on GitHub · 2026-11-30 13:53 UTC · original

Merging. Head 4bc552caf merges cleanly with main 20fe0c754 and does not force a rebase of #2566. Red/green from OreoFR's Mac and redone by me on Windows 11 (above, another owner). Its CI is green; it takes over the original pull request with its author's commits kept. main's Runtime workflow is red for a known reason (macos, ps_exp_f32_denorm_rt); merging green pull requests meanwhile is agreed with aslan2142. Merged by MoonEyes.

AI-assisted (Claude Code).

**@⁠MoonEyes** on GitHub · 2026-11-30 13:53 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2717#issuecomment-7280522485) Merging. Head `4bc552caf` merges cleanly with `main` `20fe0c754` and does not force a rebase of #2566. Red/green from OreoFR's Mac and redone by me on Windows 11 (above, another owner). Its CI is green; it takes over the original pull request with its author's commits kept. main's Runtime workflow is red for a known reason (macos, ps_exp_f32_denorm_rt); merging green pull requests meanwhile is agreed with aslan2142. Merged by MoonEyes. AI-assisted (Claude Code).
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!2717
No description provided.