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

2 KiB

Additional-generation geography integrity fixes

Fixed issues

  1. Multiple prefectural capitals in one prefecture

    • Re-normalizes capital flags against the final prefecture raster after patch merge.
    • Keeps at most one capital-like city per prefecture, preferring established capitals.
  2. Selection dotted outline could not be cleared

    • Added a Clear Selection button.
    • Escape also clears the active patch selection when generation is idle.
  3. Rivers appearing over sea

    • Final river raster is clipped against the final sea mask.
    • River path layers are split/removed where path points fall on final sea cells.
  4. Extremely small generated prefectures

    • Newly generated prefectures are no longer immune to administrative cleanup.
    • Tiny newly allocated prefectures are merged into the strongest adjacent prefecture.
    • Established pre-existing prefectures are never collapsed by this cleanup.
  5. Unnatural geography along generation boundaries

    • Added old/new terrain-frontier harmonization while keeping the established side fixed.
    • Added administrative-frontier continuation so municipality/prefecture borders do not terminate on the generation edge.
    • Increased expansion overlap and corner taper to avoid rectangular/clipped coastlines and terrain.
    • Added a final footprint restore so derived-field recomputation cannot leak outside the irregular generated footprint.

Regression validation

VALIDATE_REPORTED_PATCH_BUGS.mjs checks the five reported failure classes directly.

Final observed result:

  • river points on sea: 0
  • prefectures with duplicate capitals: 0
  • tiny generated prefectures in probe: 0
  • municipality breaks on established generation frontier: 0
  • prefecture breaks on established generation frontier: 0
  • maximum established-frontier elevation jump: 0.0383
  • seam status: clean

Existing STEP17_VALIDATION.mjs also passes with ok: true, preserving alternative-generation differentiation, explicit render revision, and single-patch Worker lifetime behavior.