[PR #852] leonida_mods: trim model ID whitespace (MODS-PARSE-MODEL-WHITESPACE) #890

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

📋 Pull Request Information

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

Base: main ← Head: kernelsmoker/mods-parse-model-whitespace


📝 Commits (1)

  • 43b445c leonida_mods: trim model id whitespace

📊 Changes

2 files changed (+13 additions, -0 deletions)

View changed files

📝 tests/test_leonida_mods.py (+10 -0)
📝 tools/leonida_mods.py (+3 -0)

📄 Description

Claimed in the coordination issue as: MODS-PARSE-MODEL-WHITESPACE — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7134562317

What and why

Trim surrounding whitespace before parsing or hashing a textual model ID in a mod manifest. This makes accidental spaces/tabs/newlines resolve to the intended model ID instead of silently hashing a different name. Whitespace-only values remain invalid. Hex IDs also accept surrounding whitespace.

Tested

  • python3 -I tests/test_leonida_mods.py -v: 10/10 passed.
  • python3 -I -m py_compile tools/leonida_mods.py tests/test_leonida_mods.py: passed.
  • git diff --check: passed.
  • Synthetic names and manifests only; no game files used.

GPUs tested: n/a (CPU-only parser tests)

AI-assisted: yes


🔄 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/852 **Author:** [@KernelSmoker](https://github.com/KernelSmoker) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `kernelsmoker/mods-parse-model-whitespace` --- ### 📝 Commits (1) - [`43b445c`](https://github.com/ubiquitarianism/leonida/commit/43b445ca38c62c3d1d02e319ac5855e0261ad65d) leonida_mods: trim model id whitespace ### 📊 Changes **2 files changed** (+13 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_leonida_mods.py` (+10 -0) 📝 `tools/leonida_mods.py` (+3 -0) </details> ### 📄 Description Claimed in the coordination issue as: MODS-PARSE-MODEL-WHITESPACE — https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7134562317 ### What and why Trim surrounding whitespace before parsing or hashing a textual model ID in a mod manifest. This makes accidental spaces/tabs/newlines resolve to the intended model ID instead of silently hashing a different name. Whitespace-only values remain invalid. Hex IDs also accept surrounding whitespace. ### Tested - `python3 -I tests/test_leonida_mods.py -v`: 10/10 passed. - `python3 -I -m py_compile tools/leonida_mods.py tests/test_leonida_mods.py`: passed. - `git diff --check`: passed. - Synthetic names and manifests only; no game files used. GPUs tested: n/a (CPU-only parser tests) AI-assisted: yes --- <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#890
No description provided.