Prepare occurrence chronology keys before sorting

This commit is contained in:
2026-11-26 02:56:43 +00:00
parent 26da344f27
commit 7077cee35e
9 changed files with 109 additions and 14 deletions

View File

@@ -453,6 +453,12 @@ or stage interpreter is established by this finding.
### CAT-019 — Sorting Recomputes Invariant Evidence Keys
**Progress:** NPC and location occurrence normalizers prepare earliest valid
positions once per owned record; location kind rank is also prepared once.
Defensive comparators and genuine evidence tie comparisons remain. Literal
long-tie, non-monotonic, invalid-reference, duplicate, and existing validator
tests pass. Item and enemy-event work remains pending.
**Assessment:** Local algorithmic opportunity; original P3.
**Source:** [EFF-003](02-efficiency.md#eff-003--derive-invariant-sort-keys-once-per-normalized-record).

View File

@@ -823,6 +823,13 @@ Update relevant D&D internals/catalog.
## Stage 30 — Prepare NPC And Location Sort Keys Once
**Completed.** NPC and location normalization prepare earliest valid positions
once per owned record; location kind ranks are also prepared once. Defensive
comparators remain, and evidence ties retain their established comparison. Literal
long-tie, non-monotonic, invalid-reference, duplicate and existing permutation
coverage passes with the specified normalizer and validator suites. Item and
enemy sorting follow next.
**Coverage:** CAT-019 first families. **Prerequisites:** Stages 28–29.
Decorate owned records with earliest valid position/invariant scalars before sort,