leonida_mods: read mod.json as the runtime does, camera section and byte-order mark included (MODS-MANIFEST-RUNTIME-RULES) #1834
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1834"
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 RK28A on 2026-11-25T12:50:45Z.
Claimed in the coordination issue as: MODS-MANIFEST-RUNTIME-RULES
What and why
The mod manager checks
mod.jsonwith its own copy of the rules inruntime/src/mods.hand that copy was behind. It did not read thecamerasection solistsaid thatmods/first_personchanges nothing andcheckpassed camera values the runtime refuses. It refused amod.jsonthat starts with a UTF-8 byte-order mark although the runtime anddocs/modding.mdaccept it. It also accepted"archetype_swaps": nullwhich the runtime refuses.The manager now applies the same checks as
parse_modandlistshows the camera each mod sets.Tested
python -I tests/test_leonida_mods.pypasses with 13 tests and 5 of them fail without the change. I compared the manager withparse_modbuilt fromruntime/src/mods.hon 30,015 generated manifests. 17,256 decisions differed before and none after. Linux and Python 3.13.GPUs 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. (n/a: no translator change)Imported from ubiquitarianism/leonida. Originally posted by RK28A on 2026-11-25T12:55:12Z.
I used an AI for code and text formatting and for help on the parts I could not get working
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T12:04:45Z.
#1834 | head
4895e63a99(merged cleanly with maind48a957bb) |python -I tests/test_leonida_mods.py| red on main:FAILED (failures=3, errors=2)(AttributeError: 'ModInfo' object has no attribute 'camera', UTF-8 BOM rejection, and"archetype_swaps": nullacceptance) | green on PR+main:15 tests OK| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
Camera,whole_number,parse_camera,validate_manifest,manifest_text,print_report, andreport_jsonintools/leonida_mods.pyanddocs/modding.md(matchingruntime/src/mods.hrules forcamera.view_mode,first_person_value0..255,contexts0..4294967295, nullarchetype_swaps, UTF-8 BOM stripping, explicit UTF-16 diagnostics, and camera override reporting inlist/check/--json). Also verifiedtests/test_docs_encoding.py(1 OK),tests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK), andscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T20:15:32Z.
Red/green: On main test_leonida_mods.py has 3 failures and 2 errors (no camera section in ModInfo, UTF-8 BOM manifests rejected), and with the PR all 15 tests pass on Windows 11 at OreoFR's (RTX 4070).
Independent tester (OreoFR, RTX 4070, Windows 11): PR head merged with the other PRs of its batch on main
c1ecf04ed, full ctest run (485 tests, tests that launch the game excluded): no new failure compared with main.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:54:44Z.
Verified by OreoFR
3408969a7+ PR head4895e63a9python -I tests/test_leonida_mods.pyAI-assisted (Claude Code, Claude Opus 5.5).