[PR #1346] Integration/rbf0 report paths #1376

Open
opened 2026-11-26 20:21:02 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1346
Author: @xel1uz
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: integration/rbf0-report-paths


📝 Commits (6)

  • 7e0adef rbf0_tree: ask report_paths for the report-path guard
  • 7d5fb85 rbf0_index: ask report_paths for the report-path guard
  • 2f127c1 Merge Leonida PR #1214: share the RBF0 tree report path guard
  • 5383cd8 Merge Leonida PR #1227: share the RBF0 index report path guard
  • d1d30ce Test case-variant output names in both RBF0 report commands
  • e4c409e Integrate current upstream main ahead of publication

📊 Changes

4 files changed (+49 additions, -26 deletions)

View changed files

📝 tests/test_rbf0_index.py (+21 -0)
📝 tests/test_rbf0_tree.py (+19 -0)
📝 tools/rbf0_index.py (+4 -13)
📝 tools/rbf0_tree.py (+5 -13)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1346 **Author:** [@xel1uz](https://github.com/xel1uz) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `integration/rbf0-report-paths` --- ### 📝 Commits (6) - [`7e0adef`](https://github.com/ubiquitarianism/leonida/commit/7e0adef53c6565b391e95719e856a059dc5b5674) rbf0_tree: ask report_paths for the report-path guard - [`7d5fb85`](https://github.com/ubiquitarianism/leonida/commit/7d5fb85e0a08ef437ebc243a12f5ff0f9a3e3a87) rbf0_index: ask report_paths for the report-path guard - [`2f127c1`](https://github.com/ubiquitarianism/leonida/commit/2f127c1c7971e4903048b5d7f463b4c56e7ebf22) Merge Leonida PR #1214: share the RBF0 tree report path guard - [`5383cd8`](https://github.com/ubiquitarianism/leonida/commit/5383cd88ac2d156fbc19442984f3ac03e7b07e57) Merge Leonida PR #1227: share the RBF0 index report path guard - [`d1d30ce`](https://github.com/ubiquitarianism/leonida/commit/d1d30cef246116a0b87af192b9e093ac5a538293) Test case-variant output names in both RBF0 report commands - [`e4c409e`](https://github.com/ubiquitarianism/leonida/commit/e4c409e204787ff86b2f763dc9152ce22f28efad) Integrate current upstream main ahead of publication ### 📊 Changes **4 files changed** (+49 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_rbf0_index.py` (+21 -0) 📝 `tests/test_rbf0_tree.py` (+19 -0) 📝 `tools/rbf0_index.py` (+4 -13) 📝 `tools/rbf0_tree.py` (+5 -13) </details> ### 📄 Description Claimed in the coordination issue as: [RBF0-TREE-SHARED-REPORT-PATH](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143541315) and [RBF0-INDEX-SHARED-REPORT-PATH](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143809247) (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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#1376
No description provided.