Skip to content

fix(server): restore filename tiling after map swap reload - #573

Open
zoeyrose wants to merge 1 commit into
mainfrom
fix/map-swap-tiling-20261008
Open

zoeyrose wants to merge 1 commit into
mainfrom
fix/map-swap-tiling-20261008

Conversation

@zoeyrose

@zoeyrose zoeyrose commented Oct 9, 2026

Copy link
Copy Markdown
Member

Summary

Classic maps can lose filename-derived tiling after unloading and reloading from a temporary save. Neighboring tiles then disappear and map edges become impassable; resetting the map temporarily restores the links by loading the original source.

Implementation / behavior

Rebuild filename-derived links when loading celestial temporary maps, before validating their headers. Share the existing derivation with the original-map loader while preserving explicit tile paths, boundary policies, and MAP_NO_DYNAMIC.

Clean up links established by rejected headers and unlink reciprocal neighbor pointers only when they belong to the map being freed.

Regression fixtures exercise horizontal and vertical links, resident and swapped neighbors, reciprocal pointers, edge traversal, saved mutable objects, explicit overrides, and serialization. Failure-path coverage checks that rejected reloads leave no dangling neighbor links.

Validation

  • Pinned classic-build:1.16.0 CPU worker; fenced wrapper build server --test: 61/61 tests passed.
  • Documented Linux coverage preset: 59/59 selected tests passed; gcovr report generated.
  • ASan/UBSan preset and leak-sanitizer smoke: 60/60 selected tests passed with no compiler or sanitizer diagnostics.
  • Celestial structure suite: 31 checks passed. Running identical tests against unpatched current main produces six failing assertions, covering missing horizontal links, discarded saved state on vertical reload, and dangling backlinks after rejected loads.
  • Imported-history verification and git diff --check passed.
  • Final integrated source diff independently reviewed with no remaining blocking findings.

Limitations / follow-up

Orion's documented SSH target was unreachable from the development workspace, so live gameplay confirmation remains outstanding. This PR changes source only; it does not deploy or reset the live server.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T01:20:09.506604Z 34d6855 PR opened
🔒 Security Review ✅ Completed 2026-10-09T01:22:00.348419Z 34d6855 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.00000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/src/server/map.c 92.00% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant