1.0 KiB
Raw Blame History

Validation rules

Reject an import atomically if any error rule fails:

  1. Exact documented headers; UTF-8; unique, non-empty stable keys.
  2. Unique normalised names; trimmed display values; controlled enum/boolean values.
  3. Every relationship endpoint and every usage foreign key resolves.
  4. No self-relationships or duplicate (from, to, type) relationships.
  5. All numeric weights are finite and in [0,1].
  6. Male and female weights total 1 within 0.0002.
  7. Every name/locale has exactly five ordered, contiguous, non-overlapping bands covering 1900–2026.
  8. No ownership columns or project-specific aliases enter the reference package.
  9. Package version and import outcome are recorded transactionally.

Behavioural invariants:

  • Unknown name → no dictionary evidence, never “not a person”.
  • Relationship → candidate/explanation/warning, never automatic identity merge.
  • Gender prior → ranking hint, always subordinate to manuscript evidence.
  • Used-name status → computed from project/book/series character data at query time.