Repository navigation
world_names: join parent maps across input reports - #6766
Conversation
Count parent occurrences and collect map names across all inputs before joining; keep row multiplicity without retaining all reports.
|
Tested the cross-report parent fix at I passed 4,096 synthetic child rows with the same parent, the parent map itself, and one non-map row to
AI-assisted. |
|
Thanks @shdann for testing both file orders and measuring the 4,096 shared-parent case. The unrelated unreadable-subtree/backslash assertion also failed on the parent in your run. #5760 and #5927 already cover that specific Windows diagnostic, so I’m leaving that fix to their owners rather than changing the parent-link PR or loosening its tests. Native Windows evidence for this head: the cross-report regression passed; the module was 29/30, not all green. |
shayderrr
left a comment
There was a problem hiding this comment.
Summary
world_names.resolve_maps() now takes the full row stream and collects parent names into a collections.Counter first, resolving each parent's status once and multiplying its counts by occurrence, instead of testing parent in names against only rows already seen in the same file. _resolve() feeds it a chained generator over all --maps paths, so stats are computed in one pass and the old per-file Counter addition disappears. The new test writes child and parent map reports in both orders and asserts rows == 3, parent_links == 2, parent_links_resolved == 2 either way; docs/world_names.md documents the cross-window case.
Why merge
Joining children to parents spread across window reports now gives order-independent counts, so multi-window worlds no longer lose or double-count links.
Verdict: Approve
Summary
Why mergeJoining children to parents spread across window reports now gives order-independent counts, so multi-window worlds no longer lose or double-count links. Verdict: Approve |
Claimed in the coordination issue as: WORLD-NAMES-CROSS-REPORT-PARENTS.
What and why
resolve --mapspreviously added per-file reports, so moving a parent into a different map window removed the link from the aggregate. Collect map names and parent occurrence counts across the input stream; resolve each distinct parent once and retain the number of child rows. Non-map resources remain ineligible as link targets.Merge trials were clean against main and #5618, #5760, #5894, #5927, #6049 and #6453. #4404 already conflicts with main; the conflict hunk is unchanged with this patch.
Tested
Independent Windows 11 verification: the cross-report regression passed in both file orders and failed on the parent. The full module was 29/30 on this head; the same unreadable-subtree path-format assertion also failed on the parent (tracked separately in #5760 and #5927).
Linux x86-64, Python 3.12.13, CPU only; no GPU or driver used.
python3.12 -I tests/test_world_names.py(30 passed).git diff --checkandpython3.12 -I scripts/check_no_game_data.pyon the changed files passed.AI-assisted: yes (Codex).
Checklist