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

Open
github-bot wants to merge 1 commit from github-bot/gh-1434 into main AGit
Owner

@⁠Dashhhhhhhh on GitHub · 2026-11-25 00:10 UTC · original
Dashhhhhhhh:fix/skin-streams-report-path → main · +21 −10 · 2 files · 1 commits · open

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

**@⁠Dashhhhhhhh** on GitHub · 2026-11-25 00:10 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1434) `Dashhhhhhhh:fix/skin-streams-report-path` → `main` · +21 −10 · 2 files · 1 commits · open 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)
On a case-insensitive volume, normcase left two spellings of a report that has not been created as two paths. The shared report-path check folds that case, and fragment_children keeps calling the same function.

Co-authored-by: Cursor <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:51:21 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 15:24 UTC · original

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

**@⁠PierreEbele** on GitHub · 2026-11-25 15:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1434#issuecomment-7166792508) 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
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1434/head:github-bot/gh-1434'
git switch 'github-bot/gh-1434'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1434'
git switch 'github-bot/gh-1434'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1434'
git switch 'github-bot/gh-1434'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1434'
git switch 'main'
git merge --squash 'github-bot/gh-1434'
git switch 'main'
git merge --ff-only 'github-bot/gh-1434'
git switch 'main'
git merge 'github-bot/gh-1434'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.