leonida_mods: read mod.json as the runtime does, camera section and byte-order mark included (MODS-MANIFEST-RUNTIME-RULES) #1834
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1834
Loading…
Reference in a new issue
No description provided.
Delete branch "mods-manager-camera-bom"
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 successfully merged and closed
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)I used an AI for code and text formatting and for help on the parts I could not get working
#1834 | head 4895e63a99a19f94d38b3a52b43feb852a5560cb (merged cleanly with main d48a957bb) |
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.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.
Verified by OreoFR
3408969a7+ PR head4895e63a9python -I tests/test_leonida_mods.pyAI-assisted (Claude Code, Claude Opus 5.5).