world_interior_names: refuse a report inside another case of the carve folder (WORLD-INTERIOR-NAMES-CASE-INSIDE) #1452
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1452"
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 Dashhhhhhhh on 2026-11-25T00:31:02Z.
Claimed in the coordination issue as: WORLD-INTERIOR-NAMES-CASE-INSIDE
What and why
tools/world_interior_names.py_insidecompared the carve folder and--outwithos.path.normcase(os.path.realpath())andcommonpath. On macOS that keeps the case you typed.--outinside a folder created ascarvedbut spelledCARVEDwas accepted, so the report could be written where a later scan reads carved files.The check now uses
report_paths.path_key. Pull request #717 also edits this file, for the 20-bit block number, and does not touch this check.Tested
python -I tests/test_world_interior_names.py(28 tests) on macOS APFS. The new test refusesCARVED/r.jsonfor a folder created ascarved. No game files.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly.docs/design.md(not a translator change).Made with Cursor
Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T15:31:58Z.
Reviewed
3e5f2cc66: ranpython3 -I tests/test_world_interior_names.py(28 OK; the new test skips here, this volume keeps case), plustests/test_report_paths.py(22 OK) andtests/test_report_path_case.py(3 OK, 1 skip) for the helper now used — all on Linux arm64, no GPU or game files. Probed_inside/main()withcase_insensitive_volume()patched to its macOS-default answer: main returns rc=0 and writes the report through--out CARVED/r.json, where a later scan would read it as a carved file; this head returns rc=2 ("--out would overwrite an input") and writes nothing, while prefix siblings and unrelated paths stay allowed. Behavior on a case-keeping volume is unchanged on both trees. One candidate for the coordination issue: on Linux mounts that fold case (vfat/exFAT/CIFS) the check still letsCARVEDthrough, sincecase_insensitive_volume()is darwin-only — pre-existing, outside this change's macOS scope.AI-assisted review.
Recommendation: Merge
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:51:12Z.
Verified by OreoFR
3408969a7+ PR head3e5f2cc66python -I tests/test_world_interior_names.pyAI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T00:47:03Z.
#1452 | head
3e5f2cc66b(merged cleanly onto origin/maine66c65b950) | Windows 11 (10.0.26200.9974, NTFS), Python 3.12.10 | AI-assisted: yesIndependent Verification (Windows 11 + NTFS)
tools/world_interior_names.pyandtests/test_world_interior_names.pyupdating_inside(folder, path)to comparereport_paths.path_key(...)prefixes.python -I scripts/check_no_game_data.py tools/world_interior_names.py tests/test_world_interior_names.pypassed (rc=0).python -I tests/test_world_interior_names.py->29/29passed (OK,0skipped) on a real case-insensitive NTFS volume, executingtest_out_inside_another_case_of_the_carve_folder_is_refused(carvedvsCARVED\r.json; skipped on case-sensitive Linux filesystems in earlier reviews).carvedand an NTFS directory junctionmklink /J CarvedJunc carved, confirming_inside(carved, "...\\CARVED\\sub\\r.json") == True,_inside(carved, "...\\CarvedJunc\\r.json") == True, and sibling_inside(carved, "...\\carved2\\r.json") == False.Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T14:18:25Z.
Ready for testing: merges cleanly with
main3535eb5c4. Not inmainyet:git cherryfinds 1 commit(s) not there, and 4 of the 16 lines it adds are already present. No duplicate found: its claimWORLD-INTERIOR-NAMES-CASE-INSIDEappears in no other open pull request and in nomaincommit.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T15:44:22Z.
RUN report for #1452 (WORLD-INTERIOR-NAMES-CASE-INSIDE)
Kind: Python (
tools/world_interior_names.pyplus its testtests/test_world_interior_names.py).Heads: PR head
3e5f2cc66, based onb4b7756e8; origin/mainc22a0a732(merged locally withgit merge --no-edit --no-ff, clean, 2 files; main changed_arrayin the same file since the base, no conflict).Commands (repo root, Python 3.13.12):
python -I -B tests/test_world_interior_names.py, and the same one process per file for the other tests that importreport_pathsorworld_interior_names: test_report_paths, test_report_path_case, test_world_index, test_first_look_paths, test_first_look_shim_report, test_gamedata_index_report_paths, test_gamedata_xml_report_paths, test_manifest, test_mask_channels, test_mod_pack_output_alias, test_psin_names, test_shader_link_check, test_tex_headers_report_paths, test_wave64_graphics_scan.Results:
test_world_interior_names.py28 tests OK; the newtest_out_inside_another_case_of_the_carve_folder_is_refusedran and passed (it is not skipped: NTFS ignores case).test_world_interior_names.py; the 14 related files above all OK (test_report_path_case and test_manifest with 1 skip each).test_user_sgpr_census.pycannot run here:import pytestfails (not installed in this Python); unrelated to the PR.tools/world_interior_names.pyreverted to the PR base (test kept), the new test still passes (28 of 28 OK). Reason: on Windowsos.path.realpathreturns the on-disk case andnormcaselowercases, so the old_insidealready refusesCARVED/r.json; the bug is the macOS path rules (case kept) and needs a macOS run.os.path.normcaseto keep case,os.path.realpathtoabspath,os.path.commonpathto a case-sensitive version andreport_paths.case_insensitive_volumeto True, then ran only the new test. Old_inside: FAIL (0 != 2, the report is written inside the carve folder). PR_inside: ok. This only shows the logic difference under macOS-like rules; it is not a macOS run.Machine: Windows 11 Pro x64, RTX 3090 24 GB, NVIDIA 621.40, Python 3.13.12 (
python -I).Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T18:50:02Z.
Tested
3e5f2cc66merged (no commit) withmain7c330c76d: Python 3.12.4, Windows 11 10.0.26300, CPU only.tests/test_world_interior_names.pygives 29 tests OK (main's own: 28).tools/world_interior_names.pyback tomain, the 29 tests still pass. On Windows,main'sos.path.normcasealready folds case, and the PR's own comment says the gap was on macOS, wherenormcase(realpath())keeps the typed case. Not covered here.check_no_game_data.pyis clean.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T19:36:26Z.
Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive, NFD), Python 3.12.16, main
dd87aa405, PR head3e5f2cc66: red 1 failure / green 29 OK, 0 skippedComplements the Windows run (no red there: the gap is macOS-only).
git merge-tree); does not force a rebase of #2566.test_out_inside_another_case_of_the_carve_folder_is_refused(AssertionError: 0 != 2) — the red shows up on APFS (MEASURED n=3).test_report_paths: OK on both (1 skipped on both)._insidegoes throughpath_key(case fold + NFD on case-insensitive volumes) and compares by prefix withos.sep; the oldValueError(different Windows drives) can no longer be raised withstartswith. No game data.Verdict: READY
AI-assisted: Claude Code
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:41:58Z.
Review: APPROVED
Reviewed the diff against
main:tools/world_interior_names.py:367-379cleanly switches_inside()toreport_paths.path_keywith a regression test intests/test_world_interior_names.py:365-385. Clean-room verified. Approving; awaiting a green CI run before merge.(AI-assisted review.)