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

3.3 KiB
Raw Blame History

Additional-generation seam continuity fix

Date: 2026-08-07

Scope

This revision addresses the remaining defect from the previous geography-integrity package: visible terrain discontinuities along the established-map / newly-generated-map frontier.

The previously reported disconnected prefecture component is not treated as an error merely because it is small. A sea-separated component can be a legitimate island. Existing component cleanup already preserves sea-isolated administrative components when there is no adjacent land region to merge into, and this revision does not add an island-erasing cleanup pass.

Changes

  1. Literal old/new frontier constraint

    • The final terrain pass now measures the actual generated-coverage transition rather than relying only on the selection rectangle or alpha feather.
    • Newly generated land cells directly touching established land are constrained to the established elevation neighborhood.
    • The established side remains unchanged.
  2. Outward gradient propagation

    • The solved contact edge is propagated up to 12 cells into the new side using coverage distance.
    • This avoids simply moving the visible seam one or two cells inward.
  3. Dedicated hard seam metric

    • maxEstablishedFrontierElevationJump measures only land/land edges where generated coverage changes from established to new.
    • Hard limit: 0.075.
    • A candidate above this limit fails with established-frontier-elevation-jump.
  4. Best-available policy split

    • Interactive preview may still show a candidate that only misses a soft terrain/human-geography quality floor.
    • A hard seam failure is never accepted as best available; it is rolled back.
  5. Diagnostic warning semantics

    • Natural cliffs inside the newly generated region no longer make the whole seam status warning merely because one cliff exists.
    • Cliff density and literal frontier continuity are evaluated separately.
    • Advanced diagnostics now show Established frontier elevation and the hard limit.

Validation

Reported-bug regression

node VALIDATE_REPORTED_PATCH_BUGS.mjs

  • river path points on sea: 0
  • duplicate prefectural-capital prefectures: 0
  • tiny generated prefectures: 0
  • municipal breaks on established frontier: 0
  • prefecture breaks on established frontier: 0
  • maximum established-frontier elevation jump: 0.0268
  • seam status: clean
  • seam gate reasons: none

Direction / seed stress validation

VALIDATE_SEAM_STRESS.mjs was run in four separate two-case processes (to avoid cumulative process runtime limits): 2 base seeds × right/left/down/up.

  • cases: 8
  • hard limit: 0.075
  • maximum independently measured frontier jump: 0.0364
  • all cases: seam hard gate PASS

See SEAM_STRESS_RESULT.json for per-case values.

Existing regression suites

STEP15_VALIDATION.mjs: PASS

  • expansion seam status: clean
  • generated-footprint escaped cells: 0
  • unresolved road portals: 0
  • unresolved rail portals: 0

STEP17_VALIDATION.mjs: PASS

  • Alternative variants differ
  • explicit render revision retained
  • single-patch Worker lifetime retained

FIX_ADDITIONAL_GENERATION_VALIDATION.mjs: PASS

  • strict quality caller still rolls back on quality failure
  • interactive preview still accepts a soft-quality best-available candidate when seam continuity passes