Modules Documentation
Validation rules
Required fields, formats, ranges.
Complete
A CoverageArticle passes through four validation tiers: structural (required fields per the model), referential (parentEventId + every mentioned ID resolves), editorial (3-gate fact-check), and disclosure (sponsor-spotlight has explicit sponsor identification). The referential tier is the strictest — a single broken parentEventId fails the entire record.
Structural validation
- Required: id, slug, parentEventId, kind, title.en + title.ar, dek.en + dek.ar, bodyHtml.en + bodyHtml.ar, author.en + author.ar, publishedAt, readingTimeMinutes.
- slug is unique across the entire Coverage dataset, kebab-case, ASCII only, ≤80 chars.
- kind ∈ exactly one of the 5 CoverageKind values. No null, no free string.
- Both EN and AR variants of every BilingualText field must be authored — no fallback to EN-only.
- readingTimeMinutes is computed from bodyHtml word count (English body) and rounded up. The field is stored, not computed at render, to keep card rendering fast.
Referential validation
- parentEventId MUST resolve to an existing CalendarEvent. If the parent event is deleted, the coverage article is orphaned — admin must reassign or delete.
- parentEvent.coverageEligible must be true at the moment of publishing. The admin draft surface blocks publish if the parent event isn’t coverageEligible.
- Every mentionedFounderId resolves to an existing founder; same for startups, opportunities, files. Stale IDs are stripped at render with a console.warn in development.
- On publish, parentEvent.coverageStatus auto-flips to 'covered' (single write — even if multiple coverage articles share the same parent, the status stays 'covered').
Editorial fact-check — the 3 gates
- Gate 1 — Every named entity verified: founder names, startup names, organizer names, sponsor names, judge names. Spelling matches the canonical record (founder profile, startup page, etc).
- Gate 2 — Every quantitative claim sourced: pitch result counts, deal amounts, attendance figures, percentages. The source is either visible at the event (recorded) or confirmed in writing by organizer.
- Gate 3 — Every quotation is verbatim or paraphrased with explicit attribution. No invented quotes, no composite statements attributed to a single person.
