leonida_mods: hash names as the pinned latin-1 joaat does #22
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/22"
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?
Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-24T01:55:52Z.
Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository has no such issue yet. No open pull request touches
tools/leonida_mods.py.Depends on: none.
What and why
tests/test_joaat_agreement.pyimports everydef joaat(intools/and compares it withtools/hashdict.py, the dictionary the rest of the pipeline is pinned to.leonida_mods.joaatis the one copy that disagrees, on every name with a non-ASCII character:It encoded the name to UTF-8 and ASCII-lowercased the bytes; the rule is
name.lower().encode("latin-1", "replace")(tools/hashdict.py:44, and whataudio_config/world_names/awc_namesdo since0a8c08a56). The consequence in the tool:parse_model_id(the only caller, forfrom_name/to_namein a swap) returns an id no package entry has when a manifest spells a name with an accent, and nothing reports it.The copy now follows the pinned rule, including
?for characters outside latin-1. ASCII names are unchanged: the two pinned expectations intests/test_leonida_mods.py(player_story000_00=0xE472B687,cs_mandy=0xD7C0CDFF) still pass.Tested
main@9ec34cdff, macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files:tests/test_joaat_agreement.pytests/test_leonida_mods.pymain@9ec34cdffFAILED (failures=6)Ran 2 tests ... OKpython -I tools/leonida_mods.py --helpstill works (exit 0). Not run: Windows, any GPU test, the translator suite.AI-assisted: yes.
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)