Function reconcileRealtimeKeyedState

  • Experimental

    Deterministically preserve or invalidate an identity-keyed set of feature keys (a selection, or the matched-key set of an active client-side filter) across one reconciliation result:

    • result.reset (replacement snapshot, schema/source/scope change, or manual reset): every key is invalidated with reason "reset" (or "schema-changed" when that was the reset reason) and next is empty — a rebuild replaces identity wholesale, so no prior key is safe to assume still exists.
    • Otherwise: a key backed by a feature the delta deleted is invalidated with reason "feature-deleted"; every other key is preserved unchanged.

    Reused for both selection and filter membership — both are "a set of feature keys that must stay valid or be explicitly dropped."

    Parameters

    Returns RealtimeKeyedStateReconciliation