mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:35:53 +01:00
[PR #2272] fssm_header: support UTF-8 BOM index.json, deduplicate index paths, and match .fssm case-insensitively #2278
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#2278
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/2272
Author: @kirigayakazima
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:fix/fssm-header-safety📝 Commits (1)
9c6350efssm_header: support UTF-8 BOM index.json, deduplicate index paths, and match .fssm case-insensitively📊 Changes
2 files changed (+75 additions, -2 deletions)
View changed files
📝
tests/test_fssm_header.py(+65 -0)📝
tools/fssm_header.py(+10 -2)📄 Description
Claimed in the coordination issue as: FSSM-HEADER-BOM-CASE-GLOB-AND-STAGE-INDEX (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7191354616)
What and why
tools/fssm_header.pypreviously:index.jsonwith"utf-8"instead of"utf-8-sig", causing UTF-8 BOMindex.jsonfiles to failjson.load()silently and fall back to unknown stages.base/index.jsonandbase/../index.jsonwithout deduplicating resolved paths.name.endswith(".fssm"), skipping uppercase/mixed-case.FSSMfiles.main()beforeos.listdir().This opens
index.jsonwith"utf-8-sig", deduplicates candidate paths by normalizedrealpath, matches.fssmcase-insensitively infiles_of(), adds an upfront file-or-directory guard inmain(), and adds unit/CLI tests intests/test_fssm_header.py.Tested
python -I tests/test_fssm_header.py -v(45 passed)upstream/mainbaseline negative control: failed with the new tests before the fixpython -I tests/test_ci_registration.py,python -I tests/test_text_write_line_endings.py,python -I scripts/check_no_game_data.py,python -I -m compileall -q, andgit diff --cached --checkGPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).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.