map/archive/generated-history/FINAL_ADDITIONAL_GENERATION_FIX_NOTES.md
2026-08-08 17:41:30 +09:00

2.8 KiB
Raw Blame History

Final additional-generation stability fix

Remaining failure reproduced

After the earlier large-selection work, a position-dependent rollback still existed. A large overlapping expansion could fail with patch-large-final-seam-failed (road-portal-broken) even though the road in question never crossed from established geography into newly generated geography.

The concrete false portal was an old minorRoads segment wholly inside the already-generated map. It crossed the synthetic write/blend band, so the diagnostic system treated it as a mandatory expansion seam portal. When that unrelated old road could not be rerouted through the patch gateway, the complete multi-tile operation was rolled back and the UI showed no additional-generation preview.

Fix

Expansion transport portals are now contractual only when the pre-patch road/rail transition actually crosses generated ↔ ungenerated geography. A route whose two sides are both already generated (or both previously ungenerated) is not a user-visible expansion seam and is excluded from the hard portal contract.

The hard gate itself remains enabled. Genuine generated/ungenerated transport crossings are still audited; the change removes only false portals created by the implementation write band.

The previous large-selection stability changes are retained: bounded tiling, deferred internal-tile transport seam checks, final whole-selection repair/audit, single final administrative/terrain coherence passes, lightweight internal snapshots, and reduced duplicate per-tile work.

Final verification

  • 300×339 direct expansion: PASS, 4 tiles, seam clean.
  • 500×350 direct expansion: PASS, 4 tiles, seam clean.
  • 600×400 Worker expansion, deliberately bottom-right/off-center: PASS, 9 tiles, seam clean.
    • selected cells: 240,000
    • previously ungenerated selected cells: 192,786
    • missing after generation: 0
  • Exact position that reproduced the false road portal: PASS.
    • selected cells: 125,268
    • previously ungenerated selected cells: 106,629
    • missing after generation: 0
    • broken road portals: 0
  • Previously reported geography regressions: PASS.
    • river points on sea: 0
    • duplicate prefectural capitals: 0
    • tiny newly-generated prefectures: 0
    • administrative frontier breaks: 0
    • max established-frontier elevation jump: 0.0268
  • STEP15: PASS; expansion seam clean, no escaped footprint, unresolved road/rail portals 0.
  • STEP17: PASS; alternatives still differ, explicit render revision and one-worker-per-patch behavior retained.
  • Seam stress: 2 seeds × 4 directions = 8 cases, all seam clean; maximum observed frontier elevation jump 0.0364 vs hard limit 0.075.

Island handling

Small disconnected components are not deleted solely because they are small. Sea-separated components without a valid adjacent land prefecture can represent legitimate islands and remain preserved.