fn should_dispatch(state: &Arc<AppState>, event: &Event) -> boolExpand description
Phase F.7 dedup gate. Returns true if the event is strictly
newer for its key and should be dispatched; false if a
higher-or-equal version was already sent.
Mirrors the renderer-side shouldDispatchLauncherEvent. Bounded
at 4096 keys with FIFO eviction so a long-running host can’t
leak unbounded state. Re-arrival of an evicted key bypasses the
host gate but the renderer guard still catches it.
Restart sentinel (codex P1 PR #722 round 1): clear the cache when the launcher’s event_version resets to 1 and any cached entry holds a higher version. Mirrors the renderer guard.