world_drawable_lookup: validate hex keys, archetype u32 fields, window budget, and deep JSON (WORLD-DRAWABLE-LOOKUP-VALIDATION) #1584
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1584"
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 IlyassRS3 on 2026-11-25T05:11:57Z.
Item:
WORLD-DRAWABLE-LOOKUP-VALIDATION(unclaimed — coordination issue #14 is at GitHub's 2,500-comment cap with no successor open issue yet, and 0 open PRs touchtools/world_drawable_lookup.py).Summary
keyvalues as unsigned 64-bit hex strings ([0-9a-fA-F]+,< 2^64) so signed ("-1","+1"), underscore-separated ("1_2"),0x-prefixed, padded, or overflowing keys are counted asmissing_or_invalid_keyrather than enteringwanted(where"-1"formatted as"-000000000000001").name,asset_name, andasset_typefields as optional unsigned 32-bit integers (type(v) is int), preventing Python'sTrue == 1collision from matchingasset_type == 1(.#ft) and avoiding rawTypeError: unhashable typeon malformed rows.type(budget) is intinexport_window()sobool(True == 1),float(1.5), and non-numeric values raiseValueErrorinstead of being accepted or raisingTypeError.summary.archivestrings, catchRecursionErrorinreport_rows()andmain(argv=None), enforceallow_nan=Falseon JSON output, and return exit code0.Verification
python3 -W error -I tests/test_world_drawable_lookup.py -v: 6/6 passed.python3 -I tests/test_text_write_line_endings.py: 3/3 passed.python3 -I scripts/check_no_game_data.py tools/world_drawable_lookup.py tests/test_world_drawable_lookup.py: passed.python3 -m compileall -q tools/world_drawable_lookup.py tests/test_world_drawable_lookup.py: passed.main:tools/world_drawable_lookup.py):failures=7, errors=3across all 4 new regression tests.AI-assisted: yes
GPUs tested: none (CPU-only Python tool; synthetic fixtures only, no game data)
Imported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-25T05:12:15Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T10:55:56Z.
Red/green: the PR's tests fail on main and pass with this PR (Linux, Python 3.13.18).
Targeted batch of 19 PRs (their tests, the tests importing the changed modules, the docs tests) on main
3ca0707: no new failure, Linux / Python 3.13.AI-assisted (Claude Code, Claude Opus 5.5)