mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:45:53 +01:00
[PR #1515] navmesh_links: pair cross-tile endpoint sector with polygon id and publish --out atomically (NAVMESH-LINKS-ENDPOINT-PAIRING-AND-IO) #1544
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1544
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1515
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/navmesh-links-endpoint-pairing📝 Commits (1)
369310enavmesh_links: pair cross-tile endpoint sector with polygon id and publish --out atomically📊 Changes
2 files changed (+146 additions, -25 deletions)
View changed files
📝
tests/test_navmesh_links.py(+86 -0)📝
tools/navmesh_links.py(+60 -25)📄 Description
Claimed in the coordination issue as: NAVMESH-LINKS-ENDPOINT-PAIRING-AND-IO (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7151504645)
What and why
verify_tile):verify_tilepreviously checkedif not ((p0 == gpi or p1 == gpi) and (s0 == c8 or s1 == c8)), decoupling each endpoint's sector ID from its polygon ID.(s1 == c8, p1 == 2)and one remote endpoint(s0 == c8 + 1, p0 == 1), if both local polygon2and spurious local polygon1listed the link in+0xB0, the check falsely passed becausep0 == 1matched the remote polygon ID whiles1 == c8matched the local sector (and the follow-upby_licheck also sawp1 == 2present).if not ((s0 == c8 and p0 == gpi) or (s1 == c8 and p1 == gpi)).scan):start >= 0andlimit >= 1(rejectingbooland invalid values) inscan()rather than only inmain().--outpublishing, strict JSON, and clean CLI error reporting (_write_json_atomic,main):--outvia a sibling temp file,file_mode.published_mode, andreplace_retry.replace, cleaning up on failure so an existing report is never truncated on error.allow_nan=Falseon both--outand stdout JSON, and catchesOSErrorinmain()to emit a singleerror:line and exit code 2 instead of a traceback.Tested
python3 -I tests/test_navmesh_links.py -v: 11/11 OK (8 existing + 3 new regression tests).main:tools/navmesh_links.py: all 3 new tests fail (FAILED (failures=9, errors=1)), including both cross-tile endpoint directions (remote_s0andremote_s1).python3 -I tests/test_text_write_line_endings.py: 3/3 OK.python3 -I scripts/check_no_game_data.py tools/navmesh_links.py tests/test_navmesh_links.py: clean.python3 -m compileall -q tools/navmesh_links.py tests/test_navmesh_links.py: clean.GPUs tested: n/a (pure Python stdlib tool, synthetic navmesh tile tests only, no GPU or game data)
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 rule changes)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.