Skip to content

StormTrust pipelines

Last updated View as MarkdownAgent index

StormTrust processing connects raw weather to decisions and outcomes. The repository currently implements the NOAA MRMS ingestion-through-revision slice. Property intersection, impact scoring, action planning, campaigns, outcomes, and attribution remain target capabilities.

Implemented MRMS slice

AWS object listing
   ↓
Versioned source asset in D1
   ↓
At-least-once ingestion Queue
   ↓
Bounded download and GRIB2 validation
   ↓
Raw R2 object + rendered map layer
   ↓
Complete two-product event revision
   ↓
Immutable manifest + D1 outbox
   ↓
Revision Queue + event Durable Object
   ↓
Frontend revision read

Target end-to-end flow

Raw weather
   ↓
Ingestion
   ↓
Normalization
   ↓
Evidence fusion
   ↓
Event derivation
   ↓
Property intersection
   ↓
Impact scoring
   ↓
Action planning
   ├──────────────┐
   ↓              ↓
Alerts      Campaign eligibility
   │              │
   └───────┬──────┘
           ↓
        Outcomes
           ↓
      Attribution

The polling and trigger reference owns implemented schedules, cursor behavior, retries, cleanup, and recovery gaps.

Ingestion

Ingestion discovers source objects, creates records, deduplicates, fetches, validates, stores raw objects when appropriate, enqueues downstream work, and records success or failure.

Normalization

Normalization decompresses and decodes inputs, maps source schemas, normalizes units and timestamps, attaches source metadata, preserves missing-value semantics, and creates normalized evidence.

Evidence fusion

Evidence fusion combines compatible signals without erasing independent sources:

MESH
POSH
Radar quality
NWS alert
Ground report
      ↓
Evidence set
      ↓
Derived event revision

Event derivation

Event derivation identifies coherent phenomena, correlates frames, handles split and merge behavior, derives boundaries, assigns stable identities, and produces revisions.

Property intersection

Property intersection selects relevant properties, intersects geometry, calculates exposure, preserves source resolution, and avoids false precision.

Impact scoring

Impact scoring combines weather severity, confidence, property context, damage-likelihood estimates, opportunity, eligibility, and priority. Scoring versions remain reproducible.

Action planning

Action planning prioritizes geography, considers capacity, creates zones, suggests assignments, identifies audience candidates, and explains its rationale.

Campaign eligibility

Eligibility resolves the channel, checks contact data, evaluates consent, suppression, jurisdiction, and provider licensing, then returns a decision with reasons.

Report generation

The first Storm Report uses a bounded analysis scope, weather-exposure ranking, and reviewed work areas. Its pinned inputs are:

report request
    ↓
analysis scope + evidence window
evidence manifest and retained source revisions
county/work-area geometry versions
ranking snapshot + rule version
template version
branding version
    ↓
render
    ↓
artifact

A property snapshot becomes an input only for a later property report. Review, publication, delivery, and acknowledgment have separate checkpoints under the report release contract.

Attribution

Attribution correlates event, action, cost, campaign, property, lead, opportunity, and revenue.

Replay and backfills

Storm Replay is a read-only view of selected retained evidence. Playback does not run ingestion, recompute rankings, publish reports, or send notifications. Algorithm reruns are separate retrospective analyses with pinned inputs and their own result identity. The History and Replay contract owns time modes and isolated regression testing.

Backfills process missed, corrected, newly supported, historically unavailable, or intentionally reprocessed data without overwhelming live ingestion.

Idempotency

Cloudflare Queues uses at-least-once delivery. Consumers assume duplicate delivery. The implemented source identity includes the source version so a corrected object becomes a new input rather than an accidental duplicate:

source: noaa-mrms-aws
product: MESH
source key: CONUS/MESH_00.50/20260818/...
source version: last-modified + size + ETag
event: mrms-conus

→ stable processing key

Failure recovery

StormTrust classifies failures as transient, unavailable source, invalid input, decoding error, downstream rate limit, policy rejection, or permanent unsupported data. Retries are bounded. Permanent failures enter a dead-letter or review state.