CORI Provider Event Normalization and Bridge Hardening

This document governs the provider-facing bridge layer that sits between raw provider events and the normalized CORI runtime used by the full-page and popup call surfaces.

The goal is simple:

Core rule

The provider adapter is not allowed to become the UI state model.

Raw provider events must be translated into the shared normalized CORI event spine before they can affect listening posture, visible fact state, advice refresh, save readiness, or session closeout.

Normalized mapping rules

The bridge should map provider events into the shared CORI runtime event set.

Bridge-safe session phases

The bridge owns the transition rules between these phases. The UI should not infer them directly from raw provider payloads.

Session start guards

Provider-backed listening should not start unless the following are satisfied:

Duplicate and out-of-order handling

  1. Duplicate event ids should be logged and ignored after first acceptance.
  2. Out-of-order events should not replay raw intermediate UI states.
  3. Late events after terminal closeout must not reopen the session.
  4. If a stronger final fact arrives during a controlled closeout window, it may still upgrade the saved result before terminal close.

Partial transcript normalization

Transcript fragments should be normalized before they affect dispatcher-facing state.

Closeout hardening

The session should have one terminal end-state.

UI consumption rule

The full-page CORI surface and popup CORI surface must read the same normalized runtime truth. Neither surface should render raw provider payload structure directly.

Next build implication

The next controlled provider-backed session path should plug into this hardened bridge rather than bypassing it.