mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:00:52 +01:00
[PR #1807] [MERGED] tools: handle corrupt XBCH zlib, case-insensitive extensions and index errors in pal_stages.py #1820
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1820
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1807
Author: @kirigayakazima
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:fix/pal-stages-safety📝 Commits (1)
abe47dftools: handle corrupt XBCH zlib, case-insensitive extensions and index errors in pal_stages.py📊 Changes
2 files changed (+61 additions, -5 deletions)
View changed files
📝
tests/test_pal_stages.py(+51 -0)📝
tools/pal_stages.py(+10 -5)📄 Description
Claimed in the coordination issue as: PAL-STAGES-ZLIB-ERROR-AND-CASE-EXTENSIONS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162211163)
What and why
zlib.errorintools/pal_stages.py'sblob_rows()so a DXBC container with a corruptXBCHzlib stream is recorded as an error row instead of aborting the entire directory run with an unhandled traceback..fssmand.dxbcextensions case-insensitively infiles_of()and deduplicate bare FSSM vs container stems withos.path.normcase.fssm_header.stage_index()inmain()againstRecursionErroron malformed/deeply nestedindex.json.tests/test_pal_stages.py.Tested
python -I tests/test_pal_stages.py -v->Ran 21 tests in 0.391s,OK(verified in a detachedupstream/mainworktree that all three new tests fail before the fix:FAILED (failures=1, errors=2)).python -I tests/test_ci_registration.py->Ran 16 tests in 4.462s,OK.python -I tests/test_text_write_line_endings.py->Ran 3 tests in 12.612s,OK.python -I scripts/check_no_game_data.py tools/pal_stages.py tests/test_pal_stages.py-> exit0.python -I -m compileall -q tools/pal_stages.py tests/test_pal_stages.pyandgit diff --check-> clean.GPUs tested: n/a (CPU/stdlib Python tests on Windows 11 x64)
AI-assisted: yes
Checklist
needs rebase).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.