mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:45:53 +01:00
[PR #1820] tools/psin_index: keep first LSNS section and match .bin case-insensitively #1831
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#1831
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/1820
Author: @kirigayakazima
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/psin-index-lsns-and-case📝 Commits (1)
f12a3f2tools/psin_index: keep first LSNS section and match .bin case-insensitively📊 Changes
2 files changed (+31 additions, -5 deletions)
View changed files
📝
tests/test_psin_index.py(+25 -0)📝
tools/psin_index.py(+6 -5)📄 Description
Claimed in the coordination issue as: PSIN-INDEX-DUPLICATE-LSNS-AND-CASE-BIN (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162455934)
What and why
LSNSsections intools/psin_index.pyparse()(lsns_seen) so only the firstLSNSsection is decoded and later duplicateLSNSsections cannot overwrite either an earlierLSNSerror or the first section's block/record counts, matching the existingLSCHandLENMfirst-section-only handling..bindiscovery ininput_paths()case-insensitive (name.lower().endswith(".bin")) so.BIN/.Binfiles are indexed consistently across filesystems.argv=Noneinmain(argv=None)(ap.parse_args(argv)) to support direct in-process CLI testing while preserving CLI invocation behavior.tests/test_psin_index.py(test_first_lsns_error_is_not_overwritten_by_duplicate_section,test_duplicate_valid_lsns_keeps_first_and_consistent_summary, andtest_uppercase_bin_extension_is_indexed).Tested
python -I tests/test_psin_index.py -v->Ran 36 tests in 0.688s,OK.upstream/main(0d80bc5d) detached worktree with updatedtests/test_psin_index.py->Ran 36 tests in 0.680s,FAILED (failures=3)(fails on all 3 new regression tests before the fix).python -I tests/test_ci_registration.py -v->Ran 16 tests in 4.691s,OK.python -I tests/test_text_write_line_endings.py -v->Ran 3 tests in 12.308s,OK.python -I scripts/check_no_game_data.py tools/psin_index.py tests/test_psin_index.py-> exit0.python -I -m compileall -q tools/psin_index.py tests/test_psin_index.pyandgit diff --check-> exit0.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.