anim_skel_match: report JSON write errors (ANIM-SKEL-REPORT-ERROR) #1142

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

@⁠Taffyyy-ops on GitHub · 2026-11-24 19:10 UTC · original
Taffyyy-ops:fix/anim-skel-report-error → main · +62 −2 · 2 files · 1 commits · open

Item ID: ANIM-SKEL-REPORT-ERROR

Handles filesystem/I/O failures cleanly when writing the --json report in tools/anim_skel_match.py:main().

Changes

  • tools/anim_skel_match.py (main): Wraps writing the --json output file in try ... except OSError, printing a clear diagnostic to stderr (anim_skel_match: cannot write <path>: <err>) and returning exit code 2 instead of an unhandled traceback.
  • tests/test_anim_skel_report_error.py: Adds synthetic tests verifying clean stderr diagnostics and exit code 2 on failed JSON writes, plus normal exit 0 on valid writes.

Verification

  • AI-assisted; synthetic tests only, no game data (python -I scripts/check_no_game_data.py).
**@⁠Taffyyy-ops** on GitHub · 2026-11-24 19:10 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1142) `Taffyyy-ops:fix/anim-skel-report-error` → `main` · +62 −2 · 2 files · 1 commits · open Item ID: `ANIM-SKEL-REPORT-ERROR` Handles filesystem/I/O failures cleanly when writing the `--json` report in `tools/anim_skel_match.py:main()`. ### Changes - **`tools/anim_skel_match.py` (`main`):** Wraps writing the `--json` output file in `try ... except OSError`, printing a clear diagnostic to `stderr` (`anim_skel_match: cannot write <path>: <err>`) and returning exit code `2` instead of an unhandled traceback. - **`tests/test_anim_skel_report_error.py`:** Adds synthetic tests verifying clean `stderr` diagnostics and exit code `2` on failed JSON writes, plus normal exit `0` on valid writes. ### Verification - AI-assisted; synthetic tests only, no game data (`python -I scripts/check_no_game_data.py`).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:40:01 +00:00
Author
Owner

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

Reviewed and verified. Wraps JSON report writing in tools/anim_skel_match.py with try...except OSError, printing clean diagnostics to stderr and returning exit code 2 on failure without unhandled tracebacks. Verified with tests/test_anim_skel_report_error.py. 100% clean-room.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 19:13 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1142#pullrequestreview-6045698874) · **approved these changes** Reviewed and verified. Wraps JSON report writing in `tools/anim_skel_match.py` with `try...except OSError`, printing clean diagnostics to stderr and returning exit code 2 on failure without unhandled tracebacks. Verified with `tests/test_anim_skel_report_error.py`. 100% clean-room.
Author
Owner

@⁠Deedlyy on GitHub · 2026-11-24 20:13 UTC · original

Recommendation: [MERGE]

Reasoning: anim_skel_match reports JSON write errors cleanly instead of tracebacking. Tiny tool fix with a synthetic test; minimal PR description. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main. Merge once the queued checks are green.

Impact level: 2/10

**@⁠Deedlyy** on GitHub · 2026-11-24 20:13 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1142#issuecomment-7143221305) **Recommendation:** [MERGE] **Reasoning:** `anim_skel_match` reports JSON write errors cleanly instead of tracebacking. Tiny tool fix with a synthetic test; minimal PR description. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. Merge once the queued checks are green. **Impact level:** 2/10
Author
Owner

@⁠Taffyyy-ops on GitHub · 2026-11-25 10:45 UTC · original

@⁠abnalstlll-byte @⁠Deedlyy Thanks for the review and [MERGE] recommendation! Updated the PR description with a full summary of the --json write error handling in tools/anim_skel_match.py and tests/test_anim_skel_report_error.py.

**@⁠Taffyyy-ops** on GitHub · 2026-11-25 10:45 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1142#issuecomment-7160124205) @⁠abnalstlll-byte @⁠Deedlyy Thanks for the review and `[MERGE]` recommendation! Updated the PR description with a full summary of the `--json` write error handling in `tools/anim_skel_match.py` and `tests/test_anim_skel_report_error.py`.
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/1142/head:github-bot/gh-1142'
git switch 'github-bot/gh-1142'

Merge

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