skin_streams: ask report_paths for the report-path guard (SKIN-STREAMS-SHARED-REPORT-PATH) #1434

Closed
Dashhhhhhhh wants to merge 1 commit from upstream-pr/1434 into main
Dashhhhhhhh commented 2026-11-25 00:10:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Dashhhhhhhh on 2026-11-25T00:10:38Z.


Claimed in the coordination issue as: SKIN-STREAMS-SHARED-REPORT-PATH

What and why

tools/skin_streams.py compared report paths with os.path.normcase, which does not fold case on macOS, and os.path.samefile, which only answers when both paths already exist. Two spellings of a report that has not been created are one file on APFS, and the private check treated them as different.

The tool now uses tools/report_paths.py. fragment_children.py calls skin_streams.same_output_path, so that name stays.

Tested

python -I tests/test_skin_streams.py TestCli (8 tests) and python -I tools/skin_streams.py --help, on macOS APFS. The new test treats Reports/out.json and reports/out.json as one path before either file exists. No game files.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • A new translator rule is in the contract table of docs/design.md (not a translator change).

Made with Cursor

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5482566379 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1434). Originally posted by [Dashhhhhhhh](https://github.com/Dashhhhhhhh) on 2026-11-25T00:10:38Z. --- Claimed in the coordination issue as: SKIN-STREAMS-SHARED-REPORT-PATH ### What and why `tools/skin_streams.py` compared report paths with `os.path.normcase`, which does not fold case on macOS, and `os.path.samefile`, which only answers when both paths already exist. Two spellings of a report that has not been created are one file on APFS, and the private check treated them as different. The tool now uses `tools/report_paths.py`. `fragment_children.py` calls `skin_streams.same_output_path`, so that name stays. ### Tested `python -I tests/test_skin_streams.py TestCli` (8 tests) and `python -I tools/skin_streams.py --help`, on macOS APFS. The new test treats `Reports/out.json` and `reports/out.json` as one path before either file exists. No game files. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. - [ ] A new translator rule is in the contract table of `docs/design.md` (not a translator change). Made with [Cursor](https://cursor.com)
PierreEbele commented 2026-11-25 15:24:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T15:24:24Z.


Reviewed 97b1ac4: skin_streams now delegates same_output_path to report_paths.same_report_path, upgrading fragment_children in place.
Ran on both branch and origin/main (PR test copied in): tests/test_skin_streams.py (42 OK, skipped=1 on this case-sensitive volume), tests/test_fragment_children.py (22 OK), tests/test_report_paths.py (22 OK), and compileall pass on both; test_anim_glb (36 OK), test_anim_skel_match (8 OK), test_report_path_case (4 OK, skipped=1), and test_report_source_collision (8 OK) pass on the branch.
Under test_report_paths.py's darwin(0) patch, missing case/accent variants (Reports/out.json vs reports/out.json, OUT.JSON, NFC/NFD) return True on the branch and False on main, with controls matching.
Beyond the shared contract and pinned test, resolving realpath before samefile closes a real fragment_children bypass: --json missing/../<case-or-hardlink> bypassed main's raw samefile check while write_json_report wrote to realpath(path) (main rc=0, replacing a hard link on Linux or overwriting the archive on a folding volume; branch rc=2, intact).
Pre-existing side notes: fragment_children never compares --records with --json (even identical paths overwrite --records with --json), and skin_streams is not yet listed in SHARED in tests/test_report_paths.py.

AI-assisted review.

Recommendation: Merge

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7166792508 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1434#issuecomment-7166792508). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T15:24:24Z. --- Reviewed 97b1ac4: `skin_streams` now delegates `same_output_path` to `report_paths.same_report_path`, upgrading `fragment_children` in place. Ran on both branch and `origin/main` (PR test copied in): `tests/test_skin_streams.py` (42 OK, skipped=1 on this case-sensitive volume), `tests/test_fragment_children.py` (22 OK), `tests/test_report_paths.py` (22 OK), and `compileall` pass on both; `test_anim_glb` (36 OK), `test_anim_skel_match` (8 OK), `test_report_path_case` (4 OK, skipped=1), and `test_report_source_collision` (8 OK) pass on the branch. Under `test_report_paths.py`'s `darwin(0)` patch, missing case/accent variants (`Reports/out.json` vs `reports/out.json`, `OUT.JSON`, NFC/NFD) return `True` on the branch and `False` on main, with controls matching. Beyond the shared contract and pinned test, resolving `realpath` before `samefile` closes a real `fragment_children` bypass: `--json missing/../<case-or-hardlink>` bypassed main's raw `samefile` check while `write_json_report` wrote to `realpath(path)` (main `rc=0`, replacing a hard link on Linux or overwriting the archive on a folding volume; branch `rc=2`, intact). Pre-existing side notes: `fragment_children` never compares `--records` with `--json` (even identical paths overwrite `--records` with `--json`), and `skin_streams` is not yet listed in `SHARED` in `tests/test_report_paths.py`. AI-assisted review. **Recommendation:** Merge
OreoFR commented 2026-11-28 21:50:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:50:36Z.


Verified by OreoFR

  • Base: main 3408969a7 + PR head 97b1ac40b
  • Test: python -I tests/test_skin_streams.py
  • Red on main: 42 OK
  • Green with the PR: 42 OK
  • Verdict: NO RED
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246313780 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1434#issuecomment-7246313780). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:50:36Z. --- **Verified by OreoFR** - Base: main `3408969a7` + PR head `97b1ac40b` - Test: `python -I tests/test_skin_streams.py` - Red on main: 42 OK - Green with the PR: 42 OK - Verdict: NO RED - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
zmasi commented 2026-11-29 00:55:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T00:55:22Z.


#1434 | head 97b1ac40b0 (merged cleanly onto origin/main a3484ceebc) | Windows 11 (10.0.26200.9974, NTFS), Python 3.12.10 | AI-assisted: yes

Independent Verification (Windows 11 + NTFS)

  • Diff & safety audit: Inspected 100% of the diff across tools/skin_streams.py and tests/test_skin_streams.py delegating same_output_path to report_paths.same_report_path (with sys.path.insert for python -I execution). python -I scripts/check_no_game_data.py tools/skin_streams.py tests/test_skin_streams.py passed (rc=0).
  • Native Windows 11 NTFS execution:
    • python -I tests/test_skin_streams.py -> 42/42 passed (OK, 0 skipped) on a real case-insensitive NTFS volume, including test_case_only_spelling_of_a_missing_report_is_one_path (Reports\out.json vs reports\out.json before out.json exists).
    • Live NTFS directory junction + missing-report probe: Created Reports and an NTFS directory junction mklink /J ReportsJunc Reports, confirming same_output_path("...\\Reports\\out.json", "...\\ReportsJunc\\OUT.JSON") == True and same_output_path("...\\Reports\\out.json", "...\\Reports\\other.json") == False.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248443424 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1434#issuecomment-7248443424). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T00:55:22Z. --- #1434 | head 97b1ac40b0b091a9a85535d17d2fafc56d34828c (merged cleanly onto origin/main a3484ceebc) | Windows 11 (10.0.26200.9974, NTFS), Python 3.12.10 | AI-assisted: yes ### Independent Verification (Windows 11 + NTFS) - **Diff & safety audit**: Inspected 100% of the diff across `tools/skin_streams.py` and `tests/test_skin_streams.py` delegating `same_output_path` to `report_paths.same_report_path` (with `sys.path.insert` for `python -I` execution). `python -I scripts/check_no_game_data.py tools/skin_streams.py tests/test_skin_streams.py` passed (`rc=0`). - **Native Windows 11 NTFS execution**: - `python -I tests/test_skin_streams.py` -> **`42/42` passed (`OK`, `0` skipped)** on a real case-insensitive NTFS volume, including `test_case_only_spelling_of_a_missing_report_is_one_path` (`Reports\out.json` vs `reports\out.json` before `out.json` exists). - **Live NTFS directory junction + missing-report probe**: Created `Reports` and an NTFS directory junction `mklink /J ReportsJunc Reports`, confirming `same_output_path("...\\Reports\\out.json", "...\\ReportsJunc\\OUT.JSON") == True` and `same_output_path("...\\Reports\\out.json", "...\\Reports\\other.json") == False`.
TheGeogeo commented 2026-11-29 14:17:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T14:17:21Z.


Correction: not in main. Its squash commit 63c9b3af8 landed on 2026-11-27, but 00131bb85 ("main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia") restored tools/skin_streams.py and tests/test_skin_streams.py the same day, so main does not have this change. I took the earlier verdict from the history (git cherry and the squash title), not from the tree. Re-checked on main c22a0a732: git merge-tree --write-tree of main and this branch gives a tree that still differs from main in tools/skin_streams.py and tests/test_skin_streams.py.

New verdict: ready for testing. It merges cleanly with main c22a0a732.

This pull request was closed on the basis of our earlier, wrong verdict. Its change is not on main, so the author or a maintainer can reopen it.

AI-assisted (Claude Code).


Earlier comment, superseded by the correction above:

Already in main: squashed as 63c9b3af8 (2026-11-27, "PR #1434: skin_streams: ask report_paths for the report-path guard (SKIN-STREAMS-SHARED-REPORT-PATH)"), which is in main 3535eb5c4. git cherry finds this branch's commit there, so nothing is left to merge here.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257187020 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1434#issuecomment-7257187020). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T14:17:21Z. --- **Correction: not in `main`.** Its squash commit `63c9b3af8` landed on 2026-11-27, but `00131bb85` ("main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia") restored `tools/skin_streams.py` and `tests/test_skin_streams.py` the same day, so `main` does not have this change. I took the earlier verdict from the history (`git cherry` and the squash title), not from the tree. Re-checked on `main` `c22a0a732`: `git merge-tree --write-tree` of `main` and this branch gives a tree that still differs from `main` in `tools/skin_streams.py` and `tests/test_skin_streams.py`. New verdict: ready for testing. It merges cleanly with `main` `c22a0a732`. This pull request was closed on the basis of our earlier, wrong verdict. Its change is not on main, so the author or a maintainer can reopen it. AI-assisted (Claude Code). --- *Earlier comment, superseded by the correction above:* Already in main: squashed as `63c9b3af8` (2026-11-27, "PR #1434: skin_streams: ask report_paths for the report-path guard (SKIN-STREAMS-SHARED-REPORT-PATH)"), which is in `main` `3535eb5c4`. `git cherry` finds this branch's commit there, so nothing is left to merge here. AI-assisted (Claude Code).
MoonEyes commented 2026-11-29 14:30:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T14:30:21Z.


Closing: this landed on main as 63c9b3af8 ("PR #1434: skin_streams: ask report_paths for the report-path guard"), checked in main just now. Thanks!

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257354809 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1434#issuecomment-7257354809). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T14:30:21Z. --- Closing: this landed on main as 63c9b3af8 ("PR #1434: skin_streams: ask report_paths for the report-path guard"), checked in main just now. Thanks!
MoonEyes commented 2026-11-29 14:58:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T14:58:09Z.


Correction: I closed this as already on main, and that was wrong. Its commit did land, but 00131bb85 (27/11, "main keeps its own runtime, tools and tests") removed those lines again, so main does not have this change today. I tried to reopen it, but GitHub refuses: you are at this repository's open pull request limit. You can reopen it yourself once one of your PRs is merged or closed, or say here if you want a maintainer to carry it forward with your commits. Sorry for the noise.

AI-assisted: yes (checked line by line against current main)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257715782 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1434#issuecomment-7257715782). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T14:58:09Z. --- Correction: I closed this as already on main, and that was wrong. Its commit did land, but 00131bb85 (27/11, "main keeps its own runtime, tools and tests") removed those lines again, so main does not have this change today. I tried to reopen it, but GitHub refuses: you are at this repository's open pull request limit. You can reopen it yourself once one of your PRs is merged or closed, or say here if you want a maintainer to carry it forward with your commits. Sorry for the noise. AI-assisted: yes (checked line by line against current main)

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!1434
No description provided.