anim tools: use shared report path guard #1084

Open
github-bot wants to merge 2 commits from github-bot/gh-1084 into main AGit
Owner

@⁠j-weiner on GitHub · 2026-11-24 18:05 UTC · original
j-weiner:fix/anim-clips-shared-report-path → main · +14 −17 · 3 files · 2 commits · open

Claimed in the coordination issue as: ANIM-CLIPS-SHARED-REPORT-PATH

What and why

tools/anim_clips.py and tools/anim_glb.py shared a private same_output_path helper across modules. This PR moves the guard to the common tools/report_paths.py:same_report_path implementation and updates both callers. Updating anim_glb.py is necessary because it referenced anim_clips.same_output_path; removing that helper without updating the caller caused an AttributeError when output/input checks ran. A regression covers identical, not-yet-created GLB and report paths, which must be refused before either path is created.

Tested

  • python3 -I tests/test_anim_glb.py — 37 passed.
  • python3 -I tests/test_anim_clips.py — 53 passed.
  • python3 -I tests/test_report_paths.py — 22 tests, 1 skipped.
  • python3 -I tests/test_text_write_line_endings.py — 3 passed.
  • python3 -I tools/anim_clips.py --help and python3 -I tools/anim_glb.py --help — passed.
  • python3 -I scripts/check_no_game_data.py tools/anim_clips.py tools/anim_glb.py tests/test_anim_glb.py — clean.
  • git diff --check — passed.

GPUs tested: n/a (CPU-only synthetic tests; no game files used).

AI-assisted: yes.

Checklist

  • Rebased on current main and merges cleanly.
  • One topic; the anim_glb.py change fixes a missed caller of the same shared-guard migration.
  • No game data, keys or decryption.
  • No translator rule change (not applicable).
**@⁠j-weiner** on GitHub · 2026-11-24 18:05 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1084) `j-weiner:fix/anim-clips-shared-report-path` → `main` · +14 −17 · 3 files · 2 commits · open Claimed in the coordination issue as: [ANIM-CLIPS-SHARED-REPORT-PATH](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why `tools/anim_clips.py` and `tools/anim_glb.py` shared a private `same_output_path` helper across modules. This PR moves the guard to the common `tools/report_paths.py:same_report_path` implementation and updates both callers. Updating `anim_glb.py` is necessary because it referenced `anim_clips.same_output_path`; removing that helper without updating the caller caused an `AttributeError` when output/input checks ran. A regression covers identical, not-yet-created GLB and report paths, which must be refused before either path is created. ### Tested - `python3 -I tests/test_anim_glb.py` — 37 passed. - `python3 -I tests/test_anim_clips.py` — 53 passed. - `python3 -I tests/test_report_paths.py` — 22 tests, 1 skipped. - `python3 -I tests/test_text_write_line_endings.py` — 3 passed. - `python3 -I tools/anim_clips.py --help` and `python3 -I tools/anim_glb.py --help` — passed. - `python3 -I scripts/check_no_game_data.py tools/anim_clips.py tools/anim_glb.py tests/test_anim_glb.py` — clean. - `git diff --check` — passed. GPUs tested: n/a (CPU-only synthetic tests; no game files used). AI-assisted: yes. ### Checklist - [x] Rebased on current `main` and merges cleanly. - [x] One topic; the `anim_glb.py` change fixes a missed caller of the same shared-guard migration. - [x] No game data, keys or decryption. - [x] No translator rule change (not applicable).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:37:10 +00:00
Author
Owner

@⁠veqzo on GitHub · 2026-11-24 18:43 UTC · original

Removing anim_clips.same_output_path breaks anim_glb, which still calls it from same_path at tools/anim_glb.py:622. When an output already exists, or when both an output and a report are specified, the path check raises AttributeError.

Could this PR also update anim_glb to use report_paths.same_report_path and add a regression test? I reproduced the error with synthetic paths.

AI-assisted review.

**@⁠veqzo** on GitHub · 2026-11-24 18:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1084#issuecomment-7141055413) Removing `anim_clips.same_output_path` breaks `anim_glb`, which still calls it from `same_path` at `tools/anim_glb.py:622`. When an output already exists, or when both an output and a report are specified, the path check raises `AttributeError`. Could this PR also update `anim_glb` to use `report_paths.same_report_path` and add a regression test? I reproduced the error with synthetic paths. AI-assisted review.
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 18:49 UTC · original · approved these changes

Reviewed and verified. Cleanly replaces duplicate path collision check in ools/anim_clips.py with standard ools/report_paths.py:same_report_path. Verified with est_anim_clips.py and est_report_paths.py. 100% clean-room.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 18:49 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1084#pullrequestreview-6045337450) · **approved these changes** Reviewed and verified. Cleanly replaces duplicate path collision check in ools/anim_clips.py with standard ools/report_paths.py:same_report_path. Verified with est_anim_clips.py and est_report_paths.py. 100% clean-room.
Author
Owner

@⁠j-weiner on GitHub · 2026-11-25 17:23 UTC · original

Addressed the review: anim_glb.py now imports and uses report_paths.same_report_path directly instead of calling the removed anim_clips.same_output_path. Added a synthetic regression for identical GLB/report output paths under a missing parent; it verifies the CLI refuses before creating either path. Rebased onto current main (fe1553456).

Checks: tests/test_anim_glb.py (37 passed), tests/test_anim_clips.py (53 passed), tests/test_report_paths.py (21 passed, 1 skipped), tests/test_text_write_line_endings.py (3 passed), scripts/check_no_game_data.py on all changed files (clean), and git diff --check (pass). No game files or GPU used.

**@⁠j-weiner** on GitHub · 2026-11-25 17:23 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1084#issuecomment-7169423303) Addressed the review: `anim_glb.py` now imports and uses `report_paths.same_report_path` directly instead of calling the removed `anim_clips.same_output_path`. Added a synthetic regression for identical GLB/report output paths under a missing parent; it verifies the CLI refuses before creating either path. Rebased onto current `main` (`fe1553456`). Checks: `tests/test_anim_glb.py` (37 passed), `tests/test_anim_clips.py` (53 passed), `tests/test_report_paths.py` (21 passed, 1 skipped), `tests/test_text_write_line_endings.py` (3 passed), `scripts/check_no_game_data.py` on all changed files (clean), and `git diff --check` (pass). No game files or GPU used.
Author
Owner

@⁠j-weiner on GitHub · 2026-11-25 17:31 UTC · original

Updated again to current main (b0e11f234) after new merges. The anim_glb.py shared-guard fix and regression remain intact. Re-ran test_anim_glb.py (37 passed), test_anim_clips.py (53 passed), test_report_paths.py (22 tests, 1 skipped), test_text_write_line_endings.py (3 passed), check_no_game_data.py (clean), and git diff --check (pass). CI is queued on GitHub.

**@⁠j-weiner** on GitHub · 2026-11-25 17:31 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1084#issuecomment-7169630915) Updated again to current `main` (`b0e11f234`) after new merges. The `anim_glb.py` shared-guard fix and regression remain intact. Re-ran `test_anim_glb.py` (37 passed), `test_anim_clips.py` (53 passed), `test_report_paths.py` (22 tests, 1 skipped), `test_text_write_line_endings.py` (3 passed), `check_no_game_data.py` (clean), and `git diff --check` (pass). CI is queued on GitHub.
Author
Owner

@⁠j-weiner on GitHub · 2026-11-25 17:45 UTC · original

Final base check: rebased onto current main (b9320a118). Re-ran the targeted anim/report-path tests after that rebase; all passed. The previous anim_glb.py caller issue is fixed. GitHub CI is queued, not failing.

**@⁠j-weiner** on GitHub · 2026-11-25 17:45 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1084#issuecomment-7169950737) Final base check: rebased onto current `main` (`b9320a118`). Re-ran the targeted anim/report-path tests after that rebase; all passed. The previous `anim_glb.py` caller issue is fixed. GitHub CI is queued, not failing.
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/1084/head:github-bot/gh-1084'
git switch 'github-bot/gh-1084'

Merge

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