OLD-7482: restore old upstream PR 7482 - instance_lists, world_interior_names, world_lights_paths: read the block number from 20 bits #717
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!717
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/717/head"
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?
@aslan2142 on GitHub · 2026-11-24 12:50 UTC · original
aslan2142:resource-pointer-width→main· +59 −14 · 10 files · 2 commits · merged 2026-11-25 22:25 UTCClaimed in the coordination issue as: OLD-7482 #14
Restoration of my original pull request, old upstream PR 7482 in
ItsNotRexed/Leonida, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Rebased onto main at51f3160923; the two commits cherry-picked without conflicts and are unchanged.What and why
docs/psin.md,docs/ped_catalogues.md,tools/psin_data.py).instance_listsandworld_interior_namesmasked only 12 bits, asdocs/world.mdsaid. A block number of 4,096 or more would be read as the wrong block.world_lights_paths(Meta.ref) also read 12 bits. It refused any pointer with bits 12-19 set as a pool reference, so a pointer to block 4,096 or above fell through to the system-pointer path.world_index.split_pointeris now the one decoder for all three tools and forworld_indexitself, which already read 20 bits inline.docs/world.mdanddocs/world_lights_paths.mdnow give the 20-bit form.split_pointerhas its own test.old-pr/10049) touchestools/instance_lists.py,tests/test_instance_lists.pyanddocs/world.mdtoo;git merge-treefinds no conflict with it.Tested
Linux, Python 3.14, CPU only, synthetic inputs only (no game files).
mainwith only this PR's tests added: the 4 new tests fail (3 FAIL, 1 ERROR).python -I:tests/test_instance_lists.py: 17 tests OK.tests/test_world_index.py: 47 tests OK (5 skipped, as onmain).tests/test_world_interior_names.py: 28 tests OK.tests/test_world_lights_paths.py: 32 tests OK (1 skipped, as onmain).python -m compileall -q tools tests,git diff --checkandpython -I scripts/check_no_game_data.pyon the 10 changed files: clean.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)AI-assisted (Claude Code, Claude Opus 5.5).
@abnalstlll-byte on GitHub · 2026-11-24 13:25 UTC · original · approved these changes
Audited and verified. Clean-room compliant.
@aslan2142 on GitHub · 2026-11-25 22:25 UTC · original
Merged:
instance_lists,world_interior_names,world_lights_pathsread the block number from 20 bits.main, and no review point is open.test_instance_lists,test_world_index,test_world_interior_namesandtest_world_lights_pathspass onmain+ this head (Linux, CPython 3.14).main581ddba5d+0cbc40239: the semantic suite passes (492 files, 6,315 tests, 0 files failed);test_instance_lists,test_world_index,test_world_interior_names,test_world_lights_pathspass; the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 10 changed files.AI-assisted (Claude Code, Claude Opus 5.5).