tests: RBF0 report outputs that differ only in letter case (carry of #1346) #3106
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3106"
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?
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T11:09:29Z.
Claimed in the coordination issue as: RBF0-TREE-SHARED-REPORT-PATH (https://github.com/ProjectLeonida/mandy/issues/14#issuecomment-7143541315) and RBF0-INDEX-SHARED-REPORT-PATH (https://github.com/ProjectLeonida/mandy/issues/14#issuecomment-7143809247), both first claimed by breachato and taken over in #1346 by xel1uz.
What and why
Carry of #1346 (xel1uz), as aslan2142's review asked: only the integration tests. #1346 was stacked on #1214 and #1227, which were closed;
mainalready routes both guards throughreport_paths.same_report_pathwith newer code, so the tool changes of #1346 are dropped andmain's tools stay as they are. This branch ismainmerged with the head of #1346 (e4c409e20), so the author's commits are kept.Two tests cover a case the existing ones do not, outputs that differ only in letter case when neither file exists yet:
tests/test_rbf0_index.py:test_new_report_with_a_case_variant_of_the_carve_manifest(the report is a case variant of the carve'sindex.json).tests/test_rbf0_tree.py:test_new_json_and_csv_paths_that_differ_only_in_case(outand--csvdiffer only in case).Each test first asks the filesystem whether it folds case and expects the refusal (exit 2) where it does and two separate files where it does not, so the result is the same on NTFS, APFS and ext4. Every file stays in the test's own temporary folder.
Tested
Windows 11, no GPU, no game files, on current
mainplus this branch:python -I tests/test_rbf0_index.py: 31 OK.python -I tests/test_rbf0_tree.py: 39 OK, 1 skipped.same_report_pathreplaced by a case-sensitiveabspathcomparison, both new tests fail (older tests on hard links and streams fail too).python -I scripts/check_no_game_data.pyon both files: clean.GPUs tested: n/a (tool tests only)
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly.docs/design.md. (n/a: tests only)Supersedes #1346 once merged; the original stays open until a maintainer decides.
🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-12-02T11:55:01Z.
RUN (independent run on Windows, #3106 head
fff970e61, merged locally intomaina252854a2withgit merge --no-ff, no conflicts. The merge adds only the two tests, andtools/is unchanged. CI on the head: change-scope, check, linux-python-and-viewer, no-game-data and semantic-tests all pass.)e4c409e20is an ancestor of the head through the merge7c245a359. The commits of breachato and xel1uz are kept under their names. #1346's tool hunks are left out, as the body says. The pull request's diff againstmainis exactly #1346's two test additions (+21 intests/test_rbf0_index.py, +19 intests/test_rbf0_tree.py).python -I tests/test_rbf0_index.py -v: main 30 tests OK; merge 31 tests OK.python -I tests/test_rbf0_tree.py -v: main 38 tests OK (1 skipped, POSIX permission bits); merge 39 tests OK (the same skip). These match the body.python -m pyteston the 12 test files that namerbf0_indexorrbf0_tree(includingtest_report_pathsandtest_report_source_collision): main 168 passed / 9 skipped; merge 170 passed / 9 skipped.mainis possible: this pull request changes no tool, and its two tests pass withmain's tools (31 OK, 39 OK). The red comes from mutations, on NTFS, where both tests take their case-folding branch:same_report_pathreplaced in both tools by a case-sensitiveos.path.abspath(a) == os.path.abspath(b): killed. Both new tests fail. Older tests fail as well: the hard-link test intest_rbf0_index.py, and the stream test intest_rbf0_tree.py(3 failures in that file), because that comparison also loses the hard-link and stream checks.tools/report_paths.py:same_report_pathkeepsrealpathandsamefile, but returnsFalseinstead of comparing folded names when a path does not exist yet. Killed by exactly the two new tests (1 failure in each file), and by nothing else in these two files. Withmain's own copies of these two files, this mutation passes (30 OK, 38 OK). Onlytests/test_report_paths.pycatches it there (5 failures). So these tests are the first to pin the not-yet-existing case-variant case at the level of the two RBF0 commands.linux-python-and-viewerjob on the head runs the standard-library test loop on ubuntu-24.04, and its log liststests/test_rbf0_index.pyandtests/test_rbf0_tree.pywith "658 files, 0 files failed". That is where the case-sensitive branch (two separate files) ran.Not covered here: a local Linux or macOS run, and the whole standalone suite on Windows.
Verdict: PASS. The two tests pass on
mainand on the merge, and on NTFS they catch both the coarse mutation and a narrow one that only drops case folding for paths that do not exist yet, which no other RBF0 test catches. The original commits are kept, and CI ran the case-sensitive branch on Linux.Machine: Windows 11 Pro 26300 (NTFS), i9-13900K, 64 GB, CPython 3.13.12 (CI uses 3.12); unit tests only, no GPU or game files used.
Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-02T11:58:17Z.
Ran natively on Windows 11 (NTFS), Python 3.13, head
fff970e61merged with currentmain. I also tried the one Windows setup where the two new tests have to take their other branch: a directory with NTFS per-directory case sensitivity on (fsutil file setCaseSensitiveInfo <dir> enable, which new subfolders inherit), withTMP/TEMPpointed into it.tests/test_rbf0_index.pytests/test_rbf0_tree.pyOn the case-sensitive directory, both new tests pass by taking the "two separate files" branch, so the probe really asks the volume and does not just look at
os.name:test_new_report_with_a_case_variant_of_the_carve_manifesttest_new_json_and_csv_paths_that_differ_only_in_caseThe 3 failures are all subtests of an older test,
test_out_csv_or_xml_over_a_stream_of_the_source_folder_is_refused. They fail the same way withmain's own test file (38 tests, same 3 failures), so they are not caused by this PR.00000000.BINwhenos.name == "nt"and expects it to alias00000000.bin. In a case-sensitive directory those are two files. The tool correctly writes the new one and exits 0, so the test'sreturncode == 2assertion fails.['00000000.BIN', '00000000.bin'] != ['00000000.bin'].That older test could use the same case-folding probe as the two new ones, as a follow-up. Per-directory case sensitivity is rare on Windows (mostly folders shared with WSL), so this is not a blocker.
Not run: Linux and macOS (CI covers Linux).
GPUs tested: n/a (tool tests only).
AI-assisted: yes (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T11:58:50Z.
Merging. Head
fff970e61merges cleanly withmain9b4d71899and does not force a rebase of #2566. Independent check on headfff970e61: enlight3d's red/green on main + this head (the case-sensitive abspath mutation is killed by both new tests on NTFS, related suite 168 -> 170), comment 7344584080; the Linux side is covered by CI ubuntu-24.04; xel1uz's commits from #1346 are ancestors; CI 5/5 green incl. no-game-data; tests only, as aslan2142's review asked; items RBF0-TREE/INDEX-SHARED-REPORT-PATH claimed in #14. Merged by MoonEyes.AI-assisted (Claude Code).