sandbox_scene: stream placements when finding the automatic center #2444
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2444"
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 kirigayakazima on 2026-11-27T10:17:02Z.
Claimed in the coordination issue as: SANDBOX-SCENE-STREAM-AUTOCENTER
What and why
Finding the densest resolved cell retained every decoded placement record, including all distant and unresolved props. For regular inputs, count cells on a first streaming pass and reopen the JSONL for selection. Non-regular inputs retain the one-read behavior. The synthetic 1,201-row regression checks the center, placed count, exact selected-row count and peak storage. Traced peak was 6,871,132 bytes before and 166,116 bytes in the integrated run on this machine.
Tested
Windows, Python 3.14.7, synthetic fixtures.
python -I tests/test_sandbox_scene_build.pypython -I tests/test_sandbox_scene.pygit diff --checkpassed.GPUs tested: N/A (CPU-only).
AI-assisted: Yes.
Checklist
Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-27T15:10:56Z.
Review: COMMENTED
Verified on the PR branch: python3 -m unittest tests.test_sandbox_scene_build -v -> 9 tests OK, including the new streaming-placement/center cases (the old tests.test_sandbox_scene module also passes, 12 tests). Not approving yet: the branch is 606 commits behind current main, so a rebase is needed before reviewing the final diff.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T09:46:39Z.
#2444 | head
ab2c132233(merged cleanly with main3ca0707dd) |python -I tests/test_sandbox_scene_build.py| red on main:FAILED (failures=1)(test_auto_center_does_not_keep_distant_placement_payloads:6747050 not less than 4194304) | green on PR+main:9 tests OK(-k test_auto_center_does_not_keep_distant_placement_payloads:1 test OK) | Windows 11, Python 3.12.10 | AI-assisted: yesAudited
buildintools/sandbox_scene.py(streamingworld_build.iter_placementsfor automatic centering whenargs.entitiesis a regular file while keepinglist(rows)fallback for single-pass pipes), and verified bothPR + main(3ca0707dd) and a combined 3-waymain + #2444 + #2443 + #2442merge (0conflicts;9 tests OKintests/test_sandbox_scene_build.py,14 tests OKintests/test_sandbox_scene.py). Also passedtests/test_text_write_line_endings.py(3 OK),tests/test_runner_calls_all_tests.py(3 OK), andscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T15:12:57Z.
Red/green:
pytest tests/test_sandbox_scene_build.pyfails on main (1 failed) and passes on headab2c132233merged with main (9 passed, 2 subtests passed).Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main
d48a957bbin GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)