Integration/rbf0 report paths #1346
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1346
Loading…
Reference in a new issue
No description provided.
Delete branch "integration/rbf0-report-paths"
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 successfully merged and closed
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_treecould accepttree.jsonas the JSON output andTREE.JSONas the CSV output. Both names resolved to the same file, so the CSV replaced the JSON.rbf0_indexcould likewise write a report tocarve/INDEX.JSON, the path reserved for itsindex.jsonmanifest.#1214 and #1227 use the shared
same_report_pathhelper 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./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.tests/test_rbf0_tree.py,tests/test_rbf0_index.py,tests/test_report_paths.py, andtests/test_rbf0_index_short_continuation.pywithpython -I. On Ubuntu's native filesystem, all 92 tests passed. On native Windows, 91 passed and one was skipped./mnt/c. A separate existing permission-bit test on that mount expected0644and observed0777; 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
mainat0b45fdc2. Verified a clean merge against upstreammainat4a50cafc.scripts/check_no_game_data.pypassed on all four changed files.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).compileallon tools/rbf0_index.py, tools/rbf0_tree.py, tools/report_paths.py clean.same_output_pathcopies and call the sharedtools/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.
Verified by OreoFR
3408969a7+ PR heade4c409e20python -I tests/test_rbf0_index.py tests/test_rbf0_tree.pyAI-assisted (Claude Code, Claude Opus 5.5).
Independent verification on Windows 11 (
10.0.26200, x64, NTFS) withe4c409e204merged ontoorigin/main(53b77df14f,0merge conflicts,4files changed+49/-26), tested under bothPython 3.12.10andPython 3.14.5:python -I -B tests/test_rbf0_index.py:Ran 31 tests,OKonPython 3.12.10(1.73 s) andPython 3.14.5(2.23 s), executing the realfolds_case == Truebranch intest_new_report_with_a_case_variant_of_the_carve_manifest.python -I -B tests/test_rbf0_tree.py:Ran 39 tests,OK (skipped=1)onPython 3.12.10(1.77 s) andPython 3.14.5(2.34 s), executing the real case-folding branch intest_new_json_and_csv_paths_that_differ_only_in_case.NO REDon native Windows: onos.name == "nt",origin/main's localsame_output_path()already folded case viaos.path.normcase(os.path.realpath(...)); replacing both copies withreport_paths.same_report_path()deduplicates the helper and extends pre-creation case-collision detection to POSIX hosts mounting case-insensitive filesystems (whereos.path.normcaseis a no-op).git diff --check,python -I -m compileall -q, andpython -I scripts/check_no_game_data.pyacross all 4 touched files exited0.AI-assisted.
Tested
e4c409e20merged (no commit) withmain4364a4fa6: Python 3.12, Windows 11 10.0.26300, CPU only.tests/test_rbf0_index.py(31 OK) andtests/test_rbf0_tree.py(39 OK, 1 skipped) pass with this PR, and also withtools/rbf0_index.pyandtools/rbf0_tree.pyback tomain. No red: which case fails without the fix?AI-assisted (Claude Code).
For information: this pull request is carried in #3106, which merges your head
e4c409e20(your commits are kept) into currentmainand keeps only your two case-variant tests, as aslan2142's review asked:mainalready has newer report-path guards in both tools, so your tool changes are not taken. If you rebase this one yourself, say so and #3106 can be closed.AI-assisted (Claude Code).