Integration/rbf0 report paths #1346

Open
github-bot wants to merge 6 commits from github-bot/gh-1346 into main AGit
Owner

@⁠xel1uz on GitHub · 2026-11-24 22:06 UTC · original
xel1uz:integration/rbf0-report-paths → main · +49 −26 · 4 files · 6 commits · open

Claimed in the coordination issue as: RBF0-TREE-SHARED-REPORT-PATH and RBF0-INDEX-SHARED-REPORT-PATH (both originally claimed by @⁠breachato).

Depends on: #1214 and #1227. This branch includes @⁠breachato's commits from both PRs.

What and why

On a case-insensitive volume mounted in Linux, rbf0_tree could accept tree.json as the JSON output and TREE.JSON as the CSV output. Both names resolved to the same file, so the CSV replaced the JSON. rbf0_index could likewise write a report to carve/INDEX.JSON, the path reserved for its index.json manifest.

#1214 and #1227 use the shared same_report_path helper in the two CLIs. This PR adds an end-to-end test for each tool. Each test starts before the output exists. On a case-insensitive filesystem the command must exit 2 before writing. On a case-sensitive filesystem the two names are valid and the test checks the resulting output.

Tested

Tested commit: e4c409e204787ff86b2f763dc9152ce22f28efad.

  • Reproduced both bugs on the original code using WSL with a Windows-backed volume (/mnt/c). Both commands returned 0 when they should have refused the paths. On the combined branch, both returned 2 and left the output absent.
  • Ran tests/test_rbf0_tree.py, tests/test_rbf0_index.py, tests/test_report_paths.py, and tests/test_rbf0_index_short_continuation.py with python -I. On Ubuntu's native filesystem, all 92 tests passed. On native Windows, 91 passed and one was skipped.
  • Both new regression tests also passed on /mnt/c. A separate existing permission-bit test on that mount expected 0644 and observed 0777; it failed on the original code and the combined branch.

GPUs tested: n/a. These are filesystem and CLI tests using synthetic input.

AI-assisted: yes, OpenAI Codex.

Checklist

  • Based on main at 0b45fdc2. Verified a clean merge against upstream main at 4a50cafc.
  • One topic: report-path collisions in the two RBF0 tools.
  • No game data, keys or decryption. scripts/check_no_game_data.py passed on all four changed files.
  • Translator contract table: n/a. This changes two report writers and their tests.
**@⁠xel1uz** on GitHub · 2026-11-24 22:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1346) `xel1uz:integration/rbf0-report-paths` → `main` · +49 −26 · 4 files · 6 commits · open Claimed in the coordination issue as: [RBF0-TREE-SHARED-REPORT-PATH](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) and [RBF0-INDEX-SHARED-REPORT-PATH](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) (both originally claimed by @⁠breachato). Depends on: #1214 and #1227. This branch includes @⁠breachato's commits from both PRs. ### What and why On a case-insensitive volume mounted in Linux, `rbf0_tree` could accept `tree.json` as the JSON output and `TREE.JSON` as the CSV output. Both names resolved to the same file, so the CSV replaced the JSON. `rbf0_index` could likewise write a report to `carve/INDEX.JSON`, the path reserved for its `index.json` manifest. #1214 and #1227 use the shared `same_report_path` helper in the two CLIs. This PR adds an end-to-end test for each tool. Each test starts before the output exists. On a case-insensitive filesystem the command must exit 2 before writing. On a case-sensitive filesystem the two names are valid and the test checks the resulting output. ### Tested Tested commit: `e4c409e204787ff86b2f763dc9152ce22f28efad`. - Reproduced both bugs on the original code using WSL with a Windows-backed volume (`/mnt/c`). Both commands returned 0 when they should have refused the paths. On the combined branch, both returned 2 and left the output absent. - Ran `tests/test_rbf0_tree.py`, `tests/test_rbf0_index.py`, `tests/test_report_paths.py`, and `tests/test_rbf0_index_short_continuation.py` with `python -I`. On Ubuntu's native filesystem, all 92 tests passed. On native Windows, 91 passed and one was skipped. - Both new regression tests also passed on `/mnt/c`. A separate existing permission-bit test on that mount expected `0644` and observed `0777`; it failed on the original code and the combined branch. GPUs tested: n/a. These are filesystem and CLI tests using synthetic input. AI-assisted: yes, OpenAI Codex. ### Checklist - [x] Based on `main` at `0b45fdc2`. Verified a clean merge against upstream `main` at `4a50cafc`. - [x] One topic: report-path collisions in the two RBF0 tools. - [x] No game data, keys or decryption. `scripts/check_no_game_data.py` passed on all four changed files. - Translator contract table: n/a. This changes two report writers and their tests.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:48:13 +00:00
Author
Owner

@⁠whoalin1 on GitHub · 2026-11-24 23:40 UTC · original

Verified on Windows host (AI-assisted review), commit e4c409e20.

  • python -I tests/test_rbf0_index.py: 29 tests OK (includes the new case-variant manifest-vs-report test — on NTFS the case-folding branch is real, not skipped).
  • python -I tests/test_rbf0_tree.py: 39 tests OK, 1 skip (pre-existing).
  • compileall on tools/rbf0_index.py, tools/rbf0_tree.py, tools/report_paths.py clean.
  • The change is a pure refactor: both tools drop their local same_output_path copies and call the shared tools/report_paths.same_report_path (already on main). Behaviour on Windows is covered by the new tests since NTFS folds case.

Verdict: LGTM, no issues found.

**@⁠whoalin1** on GitHub · 2026-11-24 23:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1346#issuecomment-7147670361) Verified on Windows host (AI-assisted review), commit e4c409e20. - `python -I tests/test_rbf0_index.py`: 29 tests OK (includes the new case-variant manifest-vs-report test — on NTFS the case-folding branch is real, not skipped). - `python -I tests/test_rbf0_tree.py`: 39 tests OK, 1 skip (pre-existing). - `compileall` on tools/rbf0_index.py, tools/rbf0_tree.py, tools/report_paths.py clean. - The change is a pure refactor: both tools drop their local `same_output_path` copies and call the shared `tools/report_paths.same_report_path` (already on main). Behaviour on Windows is covered by the new tests since NTFS folds case. Verdict: LGTM, no issues found.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1346/head:github-bot/gh-1346'
git switch 'github-bot/gh-1346'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1346'
git switch 'github-bot/gh-1346'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1346'
git switch 'github-bot/gh-1346'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1346'
git switch 'main'
git merge --squash 'github-bot/gh-1346'
git switch 'main'
git merge --ff-only 'github-bot/gh-1346'
git switch 'main'
git merge 'github-bot/gh-1346'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.