[PR #258] tools: guard malformed gfx_off and bool vertex_count in skinned GLB export #311

Open
opened 2026-11-26 20:17:28 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/258
Author: @kotekompotek
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: work/build-1532-skinned-glb


📝 Commits (1)

  • 16bca43 skinned_glb: reject malformed gfx_off and bool vertex_count (BUILD-1532)

📊 Changes

2 files changed (+36 additions, -3 deletions)

View changed files

📝 tests/test_skinned_glb.py (+24 -0)
📝 tools/skinned_glb.py (+12 -3)

📄 Description

Claimed in the coordination issue as: BUILD-1532 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149)

What and why

  • Rebased onto current main and squashed into one clean commit (691c178e2).
  • Reject bool vertex_count and malformed ("", bool, float, inf) gfx_off cleanly with SkinError in tools/skinned_glb.py, while preserving gfx_off=None / absent defaulting to 0.
  • Added regression tests (test_malformed_gfx_off_and_none_default, test_bool_vertex_count_is_rejected) in tests/test_skinned_glb.py.

Tested

  • python -I tests/test_skinned_glb.py (32 tests OK) on commit 691c178e2.
  • All 12 tests/test_docs_*.py (OK) on commit 691c178e2.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/258 **Author:** [@kotekompotek](https://github.com/kotekompotek) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `work/build-1532-skinned-glb` --- ### 📝 Commits (1) - [`16bca43`](https://github.com/ubiquitarianism/leonida/commit/16bca432e89a2d5fa3c1e75a424055f61329498f) skinned_glb: reject malformed gfx_off and bool vertex_count (BUILD-1532) ### 📊 Changes **2 files changed** (+36 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_skinned_glb.py` (+24 -0) 📝 `tools/skinned_glb.py` (+12 -3) </details> ### 📄 Description Claimed in the coordination issue as: BUILD-1532 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149) ### What and why - Rebased onto current `main` and squashed into one clean commit (`691c178e2`). - Reject `bool` `vertex_count` and malformed (`""`, `bool`, `float`, `inf`) `gfx_off` cleanly with `SkinError` in `tools/skinned_glb.py`, while preserving `gfx_off=None` / absent defaulting to `0`. - Added regression tests (`test_malformed_gfx_off_and_none_default`, `test_bool_vertex_count_is_rejected`) in `tests/test_skinned_glb.py`. ### Tested - `python -I tests/test_skinned_glb.py` (`32 tests OK`) on commit `691c178e2`. - All 12 `tests/test_docs_*.py` (`OK`) on commit `691c178e2`. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#311
No description provided.